4784 Commits

Author SHA1 Message Date
Colomban Wendling
67329f2b98 Update for new Scintilla styles
The new C styles escapesequence and taskmarker are currently mapped
conservatively, and may benefit from a more visible mapping.
2014-05-17 22:17:44 +02:00
Colomban Wendling
b1f93c2977 Add Zephir filetype 2014-05-15 17:03:56 +02:00
Colomban Wendling
c1aba3862d Handle PHPSCRIPT like HTML but for markup cases 2014-05-15 16:37:22 +02:00
Colomban Wendling
a6b1433e66 Fix modulo by zero, resulting in FPE
Fix modulo zero error resulting in floating point exception, and then
crash. This was introduced in fd6ce2da11e9f2d20cb96236753662c23feaecb4.

Closes #265.
2014-05-07 16:00:49 +02:00
Colomban Wendling
de57548a71 Fix a few unlikely corner-case leaks
Fix a few leaks that can only happen in case of programming error.

Thanks to Pavel Roschin and his cppcheck for spotting them!
2014-05-05 16:03:25 +02:00
Colomban Wendling
f366150f7a Fix return with no value within a function returning non-void (oops) 2014-05-05 14:52:05 +02:00
Colomban Wendling
1e405ce88e Keep exact menu item string as keybinding label
Using the exact same string avoids duplicate translation, and here only
mnemonic changes were introduced with commit
95306ac8db4fc38ad7ba7e172328cef5117efaf0.
2014-05-05 05:09:13 +02:00
Colomban Wendling
1e50962de2 Fix some conflicting mnemonics in the menus 2014-05-05 05:09:13 +02:00
Matt Copperwaite
e61bba1bc3 Reword "replace by tabs/spaces" as "replace with" 2014-05-05 05:09:13 +02:00
Igor Shaula
007d5395c2 Disable commenting out blank lines by 'Toggle line commentation' 2014-05-04 01:05:09 +02:00
Colomban Wendling
fd6ce2da11 Fix UI updating after loading a project
When loading a project and focusing the last document, the UI wouldn't
get properly updated for the displayed file -- because for performance
reasons we disable notebook page switch handlers when loading session
files.  Fix this by synthesizing a notebook page switch event when done
loading.
2014-05-03 00:52:23 +02:00
Colomban Wendling
cc64ee7578 Merge branch 'plugin-dialog-cleanup' 2014-05-01 15:12:42 +02:00
Colomban Wendling
a13b033d42 Hide column headers in plugin manager dialog
They are not very useful and waste both vertical (the headers
themselves) and horizontal (first column wider because of title)
screen space.
2014-05-01 03:18:04 +02:00
Nick Treleaven
5ff38b4daa Fix document pointer documentation
Improve clarity and remove wrong documentation about using `is_valid` to
check if a document still exists.
2014-04-28 12:34:13 +01:00
Colomban Wendling
5eb526f9d0 Improve implementation of utils_str_equal() 2014-04-27 22:36:25 +02:00
Colomban Wendling
63a2f075f6 Merge branch 'ntrel/doc-macro-examples' 2014-04-27 18:06:01 +02:00
Nick Treleaven
916b65b661 Fix sign comparison warning 2014-04-27 16:38:37 +01:00
Nick Treleaven
5758b9ca67 Add foreach_document(), documents[] examples 2014-04-27 16:14:09 +01:00
Colomban Wendling
bc4e76582b Merge branch 'scriptum/sidebar-middle-button-close' 2014-04-27 02:43:20 +02:00
Pavel Roschin
b28e5db7ce Close documents in sidebar with middle mouse button 2014-04-26 23:02:38 +04:00
Colomban Wendling
605ec0b02e Cleanup Plugin Manager dialog
Merge "Name" and "Description" columns, and move plugin details to
tooltips.
2014-04-25 18:46:14 +02:00
Colomban Wendling
5217d683ca Reword "Detect from file extension" from the open dialog
We don't actually detect from file extension only, and other references
of the feature always use "Detect from file", so use it also in the
open dialog.
2014-04-15 15:58:08 +02:00
Colomban Wendling
bb61dfcdc3 Add a translation context to the open dialog's "View" button
The "View" button string is the same as the View menu one, but one is
an action (verb) and the other a noun, and as such might need to be
translated differently.
2014-04-15 15:58:04 +02:00
Colomban Wendling
45f193a17a Merge branch 'cleaner-filetype-combo-box' 2014-04-15 15:57:26 +02:00
Colomban Wendling
aeab183ef2 Merge branch 'unified-encoding-combo-boxes' 2014-04-15 15:57:13 +02:00
Colomban Wendling
420891ae81 Group filetypes in the Open dialog filetype combo box
Display the filetypes in the Open dialog filetype combo box grouped,
as they are in the filetypes menu.

This makes it easier to select a filetype, because they are better
sorted and follows the filetypes menu layout.
2014-04-15 15:52:59 +02:00
Colomban Wendling
8c5e198cf1 Unify encoding combo boxes
Make all encoding combo box display a list with encodings grouped by
categories into sub-menus, making it easier to find the appropriate
encoding than in a big single-level list.

This is what was used in the Open dialog, but not in the Preferences
dialog or the Find in Files dialog.  This also makes the encoding
combo boxes behave more like the encoding menus.
2014-04-15 15:51:49 +02:00
Colomban Wendling
1abee90434 Plug a memory leak 2014-04-14 20:27:35 +02:00
Colomban Wendling
3ec0369f47 Merge branch 'wip/configurable-mime-type--gicon' into wip/configurable-mime-type-gicon 2014-04-14 20:27:20 +02:00
Colomban Wendling
9a41f919c1 Update mappings for new Scintilla 2014-04-14 16:36:05 +02:00
Colomban Wendling
b81c35e4e3 Fix const promotion with updated Scintilla 2014-04-14 16:34:19 +02:00
Colomban Wendling
d32ae83202 Apply filetype-specific indentation settings for newly opened files
Fix the check enabling filetype-specific indentation settings to also
pass if the document has no filetype set yet, e.g. when opening it.
2014-04-14 02:46:11 +02:00
Colomban Wendling
8f713377c4 Merge branch '1.25/safer-plugin_signal_connect' 2014-04-13 20:07:26 +02:00
Colomban Wendling
75542c6d3c Add defensive checks on plugin_signal_connect()'s sensitive arguments 2014-04-13 19:59:37 +02:00
Colomban Wendling
27a073f1a6 Make plugin_signal_connect() safe on any object
Watch the lifetime of objects referenced in plugin->signal_ids and
remove our references to them if they get destroyed.  This avoids
possibly trying to disconnect signals on destroyed objects when the
plugin is unloaded.

Supporting this case is safer, and is useful for objects that may or
may not outlive the plugin (like ScintillaObjects), because in such
cases plugin_signal_connect() is handy to make sure the signals are
disconnected if the object is still alive, but used to crash if the
object was destroyed.
2014-04-13 19:59:37 +02:00
Colomban Wendling
24f2363fb7 Post release version bump
Say hello to Geany 1.25 "Veed"!
2014-04-13 19:33:23 +02:00
Colomban Wendling
187e06bcb1 Use proper argument lists 2014-04-13 16:19:32 +02:00
Colomban Wendling
8fe9fa68c1 Update displayed copyright years 2014-04-13 15:51:06 +02:00
Enrico Tröger
e802194ad3 Re-add the previous workaround to remember the directory Geany was started from
My previous fix (e1ce9cfbec) didn't fix all possible use cases (opening
files from CLI when starting Geany). This one should close the gap.
2014-04-13 15:14:35 +02:00
Colomban Wendling
148283356d Fix a missing cast (oops) 2014-04-12 16:17:52 +02:00
Colomban Wendling
3cf35f24c5 Fix possible crash on quit
When quitting, we still have to destroy the Scintilla widget to avoid
any possibility for us to receive signals from it after we destroyed
the associated editor and/or document (used in signal handlers).

I myself don't suffer from the issue, but it is theoretically possible
for Scintilla to emit signals anytime before it is destroyed, so it is
safer like this anyway.  And an user on IRC suffered from crashes on
quit because of this issue, so it seems to actually happen in some
situations.
2014-04-12 16:14:15 +02:00
Colomban Wendling
95edb95a38 Add a warning about using plugin_signal_connect() on short-lived objects 2014-04-11 23:23:35 +02:00
Enrico Tröger
e1ce9cfbec Change the working directory on Windows properly
On Windows we need to change the working directory on startup to not
lock the directory Geany was started from (bug #2626124).
However we can't change the directory to late in the startup process
otherwise plugins maybe unable to load resources from the installation
directory.

Though we also can't change it too early otherwise opening files given
with relative paths in Geany from the command line won't work anymore
(bug #3613096).

This change should fix both issues by changing the working directory after
command line file handling happened and before plugins will be loaded.
2014-04-10 22:24:15 +02:00
Colomban Wendling
e135da8a79 Fix replacing colors with "0x" prefix with length different than 6
We used to assume that if the selected text started with "0x" when
inserting a color, we had to replace exactly 6 bytes after the "0x"
prefix.  Although this is generally the case as most color formats use
6 hexadecimal digits, it still would erase either too many or too few
characters if actually replacing something shorter (i.e. "0xfff") or
longer (i.e. "0xffffffffffff").

It could even partially override multi-byte characters if the 8th byte
after the selection start was in the middle of a character, as the
length was in bytes and not characters.

Fix this by honoring the actual selection end.
2014-04-09 03:06:49 +02:00
Enrico Tröger
bd811b96ca Change include order on Windows
As suggested by a preprocessor warning from winsock2.h
(i686-w64-mingw32/include/winsock2.h:15:2: warning: #warning Please
include winsock2.h before windows.h).
2014-04-06 21:52:17 +02:00
Enrico Tröger
d9fca40de3 Include missing header
It seems this header is necessary on Windows 7 or newer gcc versions
(not sure which one requires it) but according to the docs, it is
necessary anyways.
2014-04-06 21:40:56 +02:00
Steven Valsesia
1d0fc64ce8 Add the choice to use Windows or Gtk color chooser dialog
Modification of the string "Use Windows File Open/Save dialogs" to
"Use Windows native dialogs".

Signed-off-by: bestel <steven.valsesia@gmail.com>
Signed-off-by: Colomban Wendling <ban@herbesfolles.org>
2014-03-30 20:40:12 +02:00
Colomban Wendling
4a8910fc4a Fix GTK 2.16 support (oops) 2014-03-12 14:26:04 +01:00
Colomban Wendling
bd6db90e29 Windows: add default extension to native save dialogs
Fixes bug #1021.

Based on an initial work by Steven Valsesia, thanks!
2014-03-11 15:50:39 +01:00
Colomban Wendling
9ae0790562 Merge branch 'bestel74/add_apply_button_color_chooser'
Closes PR #223.
2014-03-07 22:12:04 +01:00