8552 Commits

Author SHA1 Message Date
Colomban Wendling
f69c72f486 Improve HTML rendition of some annotations 2016-02-28 01:58:04 +01:00
Colomban Wendling
2b8cfb3f84 Use %NULL, %FALSE and %TRUE in the GtkDoc output 2016-02-28 01:02:52 +01:00
Colomban Wendling
d57ca1daef Fix inclusion of spurious @s in the GtkDoc header
Apparently Doxygen doesn't like `\<type>only` tags when not preceded by
another command.  But use a no-op instead of `\a`.
2016-02-28 00:03:12 +01:00
Jiří Techet
86cb9aeac0 Make the use of TMParserType private
Or semi-private by removing the docstring.
2016-02-26 01:40:37 +01:00
Jiří Techet
833921e6ee Install tm_parser.h
Included now in other headers and needed for successful plugin compilation.
2016-02-26 01:29:50 +01:00
Jiří Techet
292383c197 Some more uses of TMParserType instead of int 2016-02-26 01:11:53 +01:00
Jiří Techet
00cb498ebc Don't use ctags types inside Geany
We should isolate ctags from Geany completely and use separate types. At
the moment langType is shared by both Geany and ctags. For Geany redefine
it as TMParserType (which was currently used as the name of the enum and
was unused) and use everywhere in Geany. At the same time convert some
ints to TMParserType where they denote the parser.

This is strictly speaking an API change but no plugin uses langType at the
moment so its renaming doesn't cause any problems.

The only remaining visible ctags type is tagEntryInfo - it is however
used only inside tagmanager (and can be later removed quite easily too
by slightly reorganizing TM source files).
2016-02-26 01:10:00 +01:00
Jiří Techet
d1a5ceac42 Don't pass multiple copies of identical type name to scintilla for colorization
For instance for the boost library this makes the resulting string passed
to scintilla 6x shorter. Because scintilla goes through this list more
or less linearly for every single word in the document, this can bring
significant reductions of time spent when recolorizing.
2016-02-26 01:10:00 +01:00
Jiří Techet
cb307e5b92 Use the langs_compatible() function when passing typenames to scintilla
This requires making the function public and tm_tag.c seems to be a better
place for the function than tm_workspace so move there and add the prefix.
2016-02-26 01:09:59 +01:00
Jiří Techet
5030f7f3da Cleanup NONE/AUTO filetype definitions
At the moment the Geany code uses arbitrary combination of the following
synonyms

TM_PARSER_NONE / LANG_IGNORE / -2
TM_PARSER_AUTO / LANG_AUTO / -1

Especially using just the numbers makes things very confusing.

In the Geany code this patch replaces all occurrences of -2 and LANG_IGNORE
with TM_PARSER_NONE. It also removes LANG_IGNORE from the header which
isn't needed any more.

In addition, TM_PARSER_AUTO/LANG_AUTO shouldn't be used at all. We want
filetype detection based on Geany's definitions and not based on the
hard-coded ctags definitions. Remove it completely.

Finally, as it's clearer now what the constants mean, the patch fixes the
implementation of langs_compatible() (tag or file can never be of type
AUTO but we should rather check for NONE filetypes which we should
consider incompatible between each other).
2016-02-26 01:09:59 +01:00
Jiří Techet
77f6e98de8 Add scope completion for namespaces
Pop up scope completion dialog for namespaces too; e.g. for

boost::

show all symbols defined in the namespace. Determine whether the namespace
scope completion should be used based on whether user typed a scope
separator. If so, perform completion for namespaces before normal scope
completion - this seems to work better e.g. for Scintilla where

Scintilla::

would otherwise pop up the varible sci instead of showing everything
in the namespace (might be more questionable for languages where
the scope separator is identical to the dereference operator like
Java's "." but we have to make some choice anyway).

The performance seems to be reasonable - for the completion all tags
have to be walked but after testing with big C++ projects like
boost and Mozilla, the completion takes only something like 0.2s
which is acceptable as the delay happens only on typing the scope
completion separator and feels kind of expected.

Also tested with linux kernel sources which normally lack any scope
information by hacking TM a bit and injecting 10-character scope for
each tag - then the completion takes something over 0.5s.
2016-02-26 01:09:59 +01:00
Jiří Techet
b46e183cbc Move the popup 1px further so it isn't below mouse pointer
Otherwise the mouse pointer highlights a wrong value if the popup is
large enough to extend above the mouse pointer.
2016-02-26 00:05:22 +01:00
Colomban Wendling
c8dd52eb46 Position the popup at the very click position if any 2016-02-26 00:05:22 +01:00
Colomban Wendling
653990c011 Pass the actual event button to gtk_menu_popup()
In case it's actually useful.  Also properly free the GdkEvent returned
by gtk_get_current_event().
2016-02-26 00:05:22 +01:00
Jiří Techet
a168f69887 Make sure the mouse cursor is out of the popup
The x coordinate is now taken from the scintilla caret position. However,
when performing ctrl+click, we have to distinguish two cases:

1. the click happens in the second half of a letter - in this case the caret
is placed behind the letter and the popup appears behind it - no problem

2. the click happens in the first part of a letter - caret is placed before
the letter and the popup appears before the position where the click
happened - this means that the mouse cursor is above the popup which causes
that the mouse cursor highlights the item at the position of the cursor
instead of having the first item in the menu highlighted.

The patch calculates offset between caret and the mouse click event
position and uses this value to adjust the popup positioning so it's
outside the mouse cursor.
2016-02-26 00:05:22 +01:00
Colomban Wendling
848a123f00 Improve placement of the goto tag popup 2016-02-26 00:05:22 +01:00
Jiří Techet
1f9bfdf65f Set push_in parameter to false
This behaves a bit strangely when the list is long and when clicked at the
bottom of the screen (the top part of the popup is empty).
2016-02-26 00:05:22 +01:00
Jiří Techet
61582a42f9 Always select the first item for better keyboard manipulation
Even when the user Ctrl+clicks to perform goto tag definition, it should
be possible to select the item from the list using keyboard (and have
the first item automatically selected so ctrl+click plus enter afterwards
always gets you somewhere).
2016-02-26 00:05:22 +01:00
Colomban Wendling
943bfa52c5 Re-implement goto tag popup with a poped-up GtkMenu 2016-02-26 00:05:22 +01:00
Jiří Techet
4c0c76e6f4 If more tags are found during tag definition/declaration goto, let user select which one to use
If only a single tag is found, just perform the goto. If more tags are found,
show them in a popup. Try to help the user find the right file by
putting the "best" tag at the first position and emphasizing it.

Thanks to Colomban Wendling for various improvements of this patch.
2016-02-26 00:03:45 +01:00
Thomas Martitz
1f53552007 Undo removal of "can be NULL" remark
Also remove a unecessary empty line.
2016-02-25 14:50:25 +01:00
Thomas Martitz
3d51d8f6a6 GeanyFiletypeGroupID shall be gir-only 2016-02-25 14:49:18 +01:00
Colomban Wendling
725083ffe7 Small update of the French translation 2016-02-25 02:07:46 +01:00
Thomas Martitz
17e4a604c5 plugin api: export editor_set_indent_width()
Plugins can now change the indentation width of an editor.

Closes #903.
2016-02-25 00:45:47 +01:00
Colomban Wendling
269980ca45 Merge pull request #914 from eht16/update_doc_images
Update images/screenshots in the manual for 1.27
2016-02-25 00:40:13 +01:00
Colomban Wendling
8bce6031b5 Avoid use of deprecated API from core plugins 2016-02-24 23:08:48 +01:00
Colomban Wendling
7af832da80 Avoid confusing Doxygen with function attributes 2016-02-24 23:03:35 +01:00
Frank Lanitz
77324b5e7d Update of German translation 2016-02-24 22:14:49 +01:00
Colomban Wendling
409fe1a323 Try and avoid meaningless deprecation warnings from GLib and GTK
Avoid deprecation warnings from GLib and GTK versions newer than what
we currently require by default.

To undo this and get all deprecation warnings back, undefine
`GLIB_VERSION_MIN_REQUIRED` and `GDK_DISABLE_DEPRECATION_WARNINGS` on
the command line (e.g. using `-U...` in `CFLAGS`).
2016-02-24 22:06:14 +01:00
Frank Lanitz
3654b8f6f1 Small update of NEWS to reflect latest translation updates 2016-02-24 21:27:04 +01:00
Frank Lanitz
417a096356 Update of Spanish translation 2016-02-24 21:26:30 +01:00
Frank Lanitz
3b2174b3f7 Merge pull request #915 from crayxt/master
Update of Kazakh translation
2016-02-24 21:22:15 +01:00
Frank Lanitz
231814ad1f Merge pull request #909 from giuspen/master
Updated language Italian
2016-02-24 21:20:14 +01:00
Colomban Wendling
3973892e29 Move deprecated setptr() macro inside GEANY_DISABLE_DEPRECATED guards 2016-02-24 19:29:44 +01:00
Baurzhan Muftakhidinov
95f0c6a752 Update of Kazakh translation 2016-02-24 15:03:38 +05:00
Enrico Tröger
9b627f4e3a Update images/screenshots in the manual for 1.27 2016-02-23 01:03:57 +01:00
Colomban Wendling
b22fbe734c Mark deprecated API so GCC can warn about it
Also suggest replacement when appropriate.
2016-02-21 02:09:45 +01:00
Colomban Wendling
b4c3d6a737 Move deprecated declarations inside GEANY_DISABLE_DEPRECATED guards
Not all deprecated declarations were guarded this way, making it harder
to catch them.
2016-02-21 01:57:35 +01:00
Giuseppe Penone
04c58ffe19 Updated language Italian 2016-02-20 21:54:15 +00:00
Colomban Wendling
7f9129c938 Mark private fields as private in the GtkDoc header 2016-02-20 22:45:53 +01:00
Thomas Martitz
2280ca4303 project: fix build with old glib versions 2016-02-20 22:44:13 +01:00
Giuseppe Penone
21dfbd0edf Merge branch 'master' of https://github.com/geany/geany 2016-02-20 21:34:39 +00:00
Colomban Wendling
91daa9f9db Fix handling of some GtkDoc annotations 2016-02-19 00:03:30 +01:00
Colomban Wendling
3e9eb359ea Install python-lxml on Travis for the GtkDoc header generation 2016-02-18 23:55:10 +01:00
Colomban Wendling
66c3323afb Force enable GtkDoc header on distcheck
This allows to make sure this is tested, and part of the distribution.c
2016-02-18 23:39:43 +01:00
Colomban Wendling
91a8bb6c6a Don't generate GtkDoc header stuff if GtkDoc header will not be built 2016-02-18 23:38:54 +01:00
Colomban Wendling
240b5903be Fix distcheck
We need to distribute the GtkDoc header generation script.

We need not to distribute the generated header, otherwise the VPATH
lookup would find the distributed one in $(srcdir) and try to update
it; but touching $(srcdir) is a bad thing.
2016-02-18 23:19:24 +01:00
Colomban Wendling
e9e2ddf581 Add an option to control GtkDoc header generation
This allows explicit activation or deactivation of the GtkDoc header
generation.

This might allow to e.g. force enable it on distcheck.
2016-02-18 22:51:30 +01:00
Colomban Wendling
2f55540f75 Merge pull request #582 from techee/tags_are_symbols
Use the word "symbol" instead of "tag" in the UI and documentation
2016-02-17 22:54:55 +01:00
Jiří Techet
9b686871de Use the word "symbol" instead of "tag" in the UI and documentation
For users a tag is <this> so the naming can be confusing.

The only exception where we probably shouldn't use the word symbol is the
"tags file" (*.tags) containing global tags - this has already the "tags"
extension and is more related to ctags and using "symbols file" is a bit
strange in this case.

As a result, the only places where this patch leaves the word "tag" are:

* phrase "tags file(s)"
* phrase "tags parser(s)"
* documentation mentioning the "tags" directory
* documentation mentioning the *.tags extension

and of course where it means the HTML/XML markup <thing>. The rest of the
uses of the word "tag" is replaced with "symbol".

Documentation is updated accordingly.

Fixes #579.
2016-02-17 22:38:00 +01:00