9400 Commits

Author SHA1 Message Date
Colomban Wendling
958974338d Remove redundant and erroneous file patterns from Doxygen 2017-10-16 00:33:01 -07:00
Matthew Brush
960a0d5aae Improve CLI argument help 2017-10-14 23:58:17 -07:00
Colomban Wendling
9185395c40 Merge pull request #1636 from techee/kb_osx_fix
Make sure GDK_MOD2_MASK is cleared when getting modifiers.
2017-10-12 15:14:11 -07:00
Frank Lanitz
deff041a66 Make translation of a string consistent in German translation Fixes #390 2017-10-12 23:29:51 +02:00
Jiří Techet
83e8ae1737 Make sure GDK_MOD2_MASK is cleared when getting modifiers
gtk_accelerator_get_default_mod_mask() behaves differently on OS X under
GTK 3 when compared to GTK 2. On GTK 2 it used to clear the GDK_MOD2_MASK
bit while on GTK 3 it's preserved. We need to clear it ourselves
otherwise e.g. <Command>S leads to <Commands><Mod2>S and none of the
keybindings work under GTK 3.
2017-10-12 19:27:56 +02:00
Jiří Techet
3fb94c235c Use non-symlinked VTE libraries on macOS (#1625)
* Try non-symlinked VTE libraries on macOS before the symlinked ones

Plugins using VTE such as multiterm or debugger are linked against the
non-symlinked version of the library like libvte.9.dylib and not
libvte.dylib. When a bundle is created, all symlinks are replaced by
a copy of the symlinked file. This means there are both libvte.dylib
and libvte.9.dylib in the bundle both containing the same code. When
Geany loads libvte.dylib and plugins load libvte.9.dylib the same code
gets loaded twice and when the same type gets registered by GTK, it fails
and the whole application freezes.

This problem doesn't exist on linux or when running from the command line
on macOS because the operating system detects it's the same library
because of the symlink and it's loaded only once.

Loading the same library as the one used by plugins fixes the issue with
macOS bundle. The original symlinked name is still used as a fallback.

The patch also adds #ifdef __APPLE__ around the Apple-specific library
names which also prevents unnecessary retries on other platforms. Loading
*.so libraries is still kept as a fallback on Apple as these are legal too
and could in theory be used on OS X as well.

* Try loading newer VTE versions before older ones on GTK 2
2017-10-07 10:48:47 +10:00
Frank Lanitz
b4415b16da Update of Swedish translation 2017-10-06 15:52:33 +02:00
Frank Lanitz
0e26c726e3 Update of German translation 2017-10-03 10:21:30 +02:00
Colomban Wendling
05fce1a2ee Move some functions from tm_tag to tm_parser namespace
Those don't actually work on tags, so it makes more sense to have them
in the parser namespace.
2017-09-23 12:53:59 -07:00
Colomban Wendling
198a0cf2ba Update a comment to better reflect the internal data changes 2017-09-23 11:59:20 -07:00
Colomban Wendling
fda8b97ea6 Keep the current tab when closing documents to the right of another tab 2017-09-18 12:54:23 -07:00
Frank Lanitz
87b7e3cf42 Add Latvian translation 2017-09-12 11:10:09 +02:00
Colomban Wendling
b1e0d0948c Fix a typo (#1597) 2017-09-02 08:57:42 +02:00
Colomban Wendling
6522332ba9 Fix the symbols tree hierarchy when several tags have the same name
Fix the symbols tree hierarchy by considering the whole scope when
adding a tag, avoiding choosing the wrong parent when several tags have
the same name.  Until now, to avoid such misbehavior we only used to
choose the parent candidate that appeared last (line-wise) before the
child.  It works in most typical situations as generally tag names are
fairly unique, and children appear right after their parent.

However, there are cases that are trickier and cannot be handled that
way.  In the following valid C++ snippet, it is impossible to know
whether `function` should be listed under the namespace `A` or the
class `A` without looking at its full scope:

```C++
namespace A {
    namespace B {
        class A {
            void method() {}
        };
    };
    void function() {}
};
```

And it is a real-world problem for some parsers like the JSON parser
that generates numeric indices for array elements name, often leading
to several possibly close duplicates.

Additionally, to prevent trying to set a tag as its own parent, the
code guarded against accepting a parent if the child had the same name,
lading to incorrect hierarchy for `method` in cases like this:

```C++
namespace A {
    class A {
        void method() {}
    };
};
```

So to fix this, consider the whole hierarchy of a tag for choosing its
parent, when that information is available from the parser.

Fixes #1583.
2017-09-01 17:31:56 -07:00
Matthew Brush
76c69a9bac Add GNU assembler extensions
Closes #904
2017-08-31 18:31:29 -07:00
Frank Lanitz
0dc1e4c6d3 Change wordorder on Russian translation to fit with actual meaning of button
Closes #1589
2017-08-28 10:07:41 +02:00
LarsGit223
f1b84c995b Mention G_GNUC_UNUSED macro. (#1582)
Mention G_GNUC_UNUSED as an alternative to `-Wno-unused-parameter`.
2017-08-22 09:38:31 +10:00
Colomban Wendling
3ffc5773a0 Mark a local function static 2017-08-19 17:16:21 -07:00
kloun
adc22a453b bash may not found in the system (#1574)
exampe openbsd.
2017-08-08 14:40:58 +10:00
Matthew Brush
44f96d08a8 Mark tm_get_real_path with G_DEPRECATED_FOR
This will allow the compiler to notify any callers that it's deprecated.
The macro is guarded-out for when Geany is compiling so it won't cause
warnings when tagmanager uses it internally and for the utils_ wrapper.
2017-08-04 03:44:31 -07:00
Matthew Brush
4a60cdd127 Add utils_get_real_path() and use it
This is a wrapper around tm_get_real_path() but is in a more suitable
namespace/module.
2017-08-04 03:31:25 -07:00
Matthew Brush
7261742f81 Allow plugins to get the data they set 2017-08-04 02:33:40 -07:00
Matthew Brush
a108f9162c Re-enable SIGTERM handling
Now that a new enough GLib is available the signal can be
handled cleanly on the main loop using the GSource for Unix signals.
This replaces the illegal SIGTERM handling that was disabled in
fbb89f523af47b35e238678d348cfa98e56c760a.

Closes #1255
2017-08-04 02:22:04 -07:00
Matthew Brush
fd38a49b55 Add note about data types to HACKING
Closes #1282
2017-08-04 02:09:45 -07:00
Matthew Brush
092f2a936a Fixups 2017-08-04 02:09:37 -07:00
Matthew Brush
ea217b7d4d Update HACKING for best practices (C99) 2017-08-04 02:09:37 -07:00
Matthew Brush
a40823084e Add "Close Documents to the Right" feature
Similar to applications like Firefox and Chromium.
2017-08-04 01:55:43 -07:00
Jiří Techet
3e864317ba filebrowser: Don't change directory on project save
This behavior might be unwanted when changing project settings which
is unrelated to project base path and also fixes filebrowser behavior
with the updated way project-save signal is emitted.

The patch also handles the situation where "realized" is called after
project-save is called and overrides file browser's path (which is
something we don't want).
2017-08-04 01:34:23 -07:00
Jiří Techet
e43c8d8314 Always emit the project-save signal when writing project file
For some reason "project-save" isn't emitted when closing project - see
write_config(FALSE) in project_close(). This means that in this case
plugins cannot save their configuration into the config file. This doesn't
even correspond to the documentation of the signal

"Sent when a project is saved (happens when the project is created, the
 properties dialog is closed or Geany is exited)"

as the signal isn't emitted when exiting Geany because at this point Geany
closes the project.

The comment seems to indicate that the reason is that "project-save"
shouldn't be emitted when "project-close" is emitted but I don't see any
reason why.

Bump API so plugins can rely on the changed behavior.
2017-08-04 01:30:21 -07:00
Thomas Martitz
180e1da427 api: the commits 745f424 and 169feae should have incremented the API version, do so now
Increment one time for both, and fix the corresponding doc comments.
The comment for keybindings_load_keyfile() is reflowed to split into
brief/detail sections properly.
2017-08-04 01:13:11 -07:00
delt
38147b2590 Added an option to save/reload either window position or
size, but optionally not both.
2017-08-04 01:05:15 -07:00
Jiří Techet
745f424b77 Export keybindings_load_keyfile() for plugins
This allows plugins to reload keybindings later during their execution.
For more info see the comment in the commit.

Closes #1430
2017-08-04 00:37:19 -07:00
Thomas Martitz
169feae90e api: export tm_tag_get_type()
This indicates that TMTag is GBoxed-derived, and can be copied/ref'd.

This helps plugins that must store a tag pointer for later usage while the
tagmanager might let it go in the meantime (can happen quickly if the user
comments a function out when starting a doxygen-comment).

Closes #1465
2017-08-04 00:17:11 -07:00
Matthew Brush
bc7e64f78f Fix message formatting string 2017-08-03 23:48:30 -07:00
Matthew Brush
f90ebafe56 Improve Scintilla status messages output 2017-08-03 23:48:30 -07:00
Matthew Brush
6d663cbb0e Change all scintilla_send_message calls to use SSM macro 2017-08-03 23:48:30 -07:00
Matthew Brush
6c6eccd994 Check Scintilla status in debug builds
In the future, this could be moved to release-mode runtime errors which
try and pop-up a dialog message and/or recover gracefully.
2017-08-03 23:48:30 -07:00
Matthew Brush
371810181d Remove redundant SSM macros 2017-08-03 23:48:30 -07:00
Jiří Techet
b7c4bb0b4d Create correct path for filetype config files
Since filedef config files are now stored under the "filedef" subdirectory
of app->datadir, we need to add the subdirectory name when creating path
from the corresponding app->configdir otherwise the file isn't found.

Closes #1482
2017-08-03 23:41:21 -07:00
sinpowei
08e2714c1c Add an editor option to enable IME's candidate window display inline,
fix the issue that candidate window can't follow cursor.

Closes #1514
2017-08-03 23:23:42 -07:00
Enrico Tröger
59e6a8c75f Add missing string and comment styles for various lexers (#1502)
* Add missing string and comment styles for various lexers

A bunch of string and comment styles were missing and so Geany could not
detect the corresponding styles in code.

* Add more string styles

* Add regex styles as string styles
2017-08-03 23:03:50 -07:00
Franz König
df2a99f275 a little typo in the list of translators (#1565) 2017-07-29 16:43:23 +02:00
Colomban Wendling
03e5bb9fac Fix crash if plugin manager is opened more than once (#1564)
Do not allow more than one plugin manager dialog at a time.  It doesn't
make sense and the code is not fully re-entrant and leads to a crash
toggling plugins in both dialogs.

Fixes #1563.
2017-07-27 21:15:55 -07:00
Thomas Martitz
18d524525d editor: fix incorrect variable reference
The variable used for setting the cursor isn't used anymore and
was used uninitialized. It's simply deleted now and the correct var is used.

This was only a problem if editor_insert_text_block() was used directly,
the snippet code path doesn't reach to it.
2017-07-26 22:39:02 +02:00
Colomban Wendling
18360460ab Update Scintilla to version 3.7.5 (#1503)
* Update Scintilla to version 3.7.5

This now requires a C++11-capable compiler.

Closes #1308.

* Test using newer dist on Travis

Since Scintilla needs C++11

* Add debugging code for when configure fails

* Workaround a pkg-config-corsswrapper bug on Ubuntu 14.04

See https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1327242
2017-07-25 09:24:05 +10:00
Thomas Martitz
b2668dae67 Better snippets (#1470)
* snippets: Allow keybinding overloading of snippet-next-cursor.

This allows to use the same key as for inserting snippets, or plugins to
map something to the same keybinding (e.g. if they implement a similar facility).

* snippets: Remove cursor position at the end of constructs.

This is not consistently done for all languages, and hard to get right
e.g. for python. It's probably not terribly useful either.

* snippets: Use Scintilla indicators for cursor posititons
* api: Increment API version.
* snippets: restore behavior of cursor-less snippets
* snippts: use ascii character for the placeholder.

Do not require documents to be UTF-8 for using snippets.

* snippets: fix start/end detection, when searching for the next cursor

Tested @vfaronov
2017-07-21 16:42:58 +10:00
klaxian
e0dd1ee109 Added missing PHP keywords, especially for PHP 7.x. (#1547) 2017-07-21 16:02:56 +10:00
Vasiliy Faronov
2abf72a178 Push current position to navqueue before navigating back (#1537) 2017-07-21 15:59:36 +10:00
Colomban Wendling
088aaefea0 Merge pull request #1544 from b4n/python/sub-identifiers
Python: Don't highlight sub-identifiers as keywords
2017-07-20 21:32:49 -07:00
Colomban Wendling
8b25d09978 Cython: Inherit lexer properties from the Python filetype 2017-07-19 22:08:24 -07:00