9086 Commits

Author SHA1 Message Date
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
Colomban Wendling
c03af5b434 Python: Remove obsolete lexer property 2017-07-19 22:08:19 -07:00
Mark O'Donovan
75a69aad93 Added option to auto reload files changed on disk (#1246)
When option is enabled geany automatically reloads files which
have changed on disk but have no changes in the buffer.
When the option is disabled (default) geany shows the reload
dialog as before.

Tested @vfaronov
2017-07-17 17:44:54 +10:00
Enrico Tröger
2d9f97debd Post release version bump
Say hello to Geany 1.32 "Bemos"!
2017-07-16 15:29:55 +02:00
Enrico Tröger
4af55534c5 Set release date 2017-07-16 12:58:13 +02:00
Colomban Wendling
b2b81359c3 Python: Don't highlight sub-identifiers as keywords
For example, highlight `file` as a builtin when appearing by itself,
but not in a construct like `obj.file`.

Fixes #1542.
2017-07-15 21:03:53 -07:00
Enrico Tröger
30f23bb847 Add recently merged PRs to NEWS 2017-07-15 12:57:19 +02:00
Enrico Tröger
e185f4784f Merge pull request #1536 from vfaronov/fix-color-chooser
Fix converting color to hex for insertion
2017-07-15 12:37:12 +02:00
Vasiliy Faronov
7027377998 Update HTML keywords (#1530)
* Add newly standardized HTML elements to filetypes.html

To enable highlighting them as keywords in HTML documents, add
the following elements defined in W3C HTML 5.1
(https://www.w3.org/TR/html51/fullindex.html#index-elements):

- menuitem
- picture
- rb
- rtc
- template

as well as the following elements defined in WHATWG HTML Living Standard
(https://html.spec.whatwg.org/multipage/indices.html#elements-3):

- math
- slot
- svg

* Add newly standardized HTML attributes to filetypes.html

To enable highlighting them as keywords in HTML documents, add
30 attributes defined in W3C HTML 5.1
(https://www.w3.org/TR/html51/fullindex.html#attributes-table)
and a further 15 attributes defined in the WHATWG HTML Living Standard
(https://html.spec.whatwg.org/multipage/indices.html#attributes-3).

* Sort the list of HTML keywords
2017-07-12 09:44:53 +10:00
Colomban Wendling
71b8fea91d Update NEWS 2017-07-10 18:49:21 -07:00
Vasiliy Faronov
4f1b2a0313 Fix converting color to hex for insertion
Fixes #1527.

In win32_show_color_dialog, utils_scale_round is not necessary at all
because Get{R,G,B}Value [1] already return 0..255, which we can immediately
render as hex.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/dd144923.aspx
2017-07-08 18:46:01 +03:00
Frank Lanitz
35a5d457f4 Update of Lithuanian translation 2017-07-02 18:49:29 +02:00
Frank Lanitz
1d100ae457 Update of Japanese translation 2017-07-02 18:49:29 +02:00
Yan Pashkovsky
4406ccf970 Cmake and Csharp Keywords (#1315)
* cmake cs keywords

* cs and cmake keywords update

c sharp keywords https://msdn.microsoft.com/en-us/library/x53a06bb.aspx

* reviewed cmake keywords

reviewed cmake keywords according to https://cmake.org/cmake/help/v3.0/manual/cmake-commands.7.html

* public private interface

* cmake alphabetical kws

* comments
2017-06-27 17:15:30 +10:00
Frank Lanitz
174fac750c Update po-files for string freeze of Geany 1.31 2017-06-25 11:02:09 +02:00
Giorgioggì
fbe6106216 Fix comment/uncomment keyboard shortcut for Arduino filetype (#1510) 2017-06-23 18:52:43 +02:00
Samsul Ma'arif
1305b43a98 Update Indonesian translation (#1501)
Signed-off-by: Samsul Ma'arif <hay@samsul.web.id>
2017-05-25 10:20:15 +02:00
Colomban Wendling
8425371477 Haxe: Update keywords (#1216)
Update keywords with https://haxe.org/manual/expression.html#keywords.

`trace` is kept although it's not a keyword, because it was already
there and http://try.haxe.org/ highlights it identically to some other
keywords.
2017-05-02 13:46:28 +10:00
Vasiliy Faronov
fefc3a51b9 Explain the behavior of search keybindings regarding word boundaries (#1478)
Fixes #1467.
2017-05-02 08:42:59 +10:00
Jacob H. Pratt
9f4407ca29 Add require_relative in ruby syntax highlighting (#1472) 2017-04-29 11:20:38 +10:00
Vasiliy Faronov
dbcf456031 Update HACKING (#1479)
* Update obsolete references to GLib 2.27/28 in HACKING

Fixes #1476.

* Replace obsolete gcc -W option with -Wextra in HACKING

According to gcc --help=warnings, -W is a deprecated option
and -Wextra should be used instead.
2017-04-25 18:09:40 +10:00
yurayko
c296efed64 fix typo in russian translation (#1474) 2017-04-23 19:07:29 +02:00