4605 Commits

Author SHA1 Message Date
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
Colomban Wendling
77b82845ed Fix color chooser button order 2014-03-07 22:09:40 +01:00
Steven Valsesia
dbf9061a52 Feature request #686 : Add apply button on Gtk color chooser
feature request : http://sourceforge.net/p/geany/feature-requests/686/

Signed-off-by: Steven Valsesia <steven.valsesia@gmail.com>
2014-03-07 15:27:18 +01:00
Colomban Wendling
717f8e1b13 Windows: fix possible buffer overflows
Fix improper use of MultiByteToWideChar() that could have led to
buffer overflows.
2014-03-06 15:01:38 +01:00
Colomban Wendling
2f120d73c9 Fix typo in "deque" include name
Fixes bug #1027.
2014-02-27 14:33:45 +01:00
Colomban Wendling
8930ba80eb Merge branch 'fortran/improvements' 2014-02-23 20:30:11 +01:00
Colomban Wendling
ef4c72501e Fortran: generate fake tags for anonymous structures, interfaces and enums
This allows both to show those anonymous elements, as well as giving a
parent to their children, fixing display in the symbols tree.
2014-02-23 20:02:55 +01:00
Colomban Wendling
044120e87c Windows: properly initialize errno before checking it
errno is never reset to 0 by the system libraries, so if we test
its value we need to reset it to 0 before the call that may change
it to something else.
2014-02-19 15:56:24 +01:00
Colomban Wendling
0ebf6ab82e Windows: convert the spawned command to locale encoding
Converting to locale encoding is required to allows non-ASCII
characters in the command, e.g. in the file names.
2014-02-19 15:54:51 +01:00
Colomban Wendling
6af27eeb7a Windows: add a debug to show the command as it is run 2014-02-19 15:53:25 +01:00
Colomban Wendling
5c893e9b0e Windows: fix spawning commands with spaces
Fix spawnning command under Windows when they contain spaces in both
the executable and the arguments.  Apparently system() quoting is
unexpected, and doesn't work properly if there is more than 2 quotes
in the whole command.

To work this around, spawn the command through `cmd.exe /S /C`.
2014-02-19 15:53:25 +01:00
Colomban Wendling
29336ffed0 Fortran: display components 2014-02-18 19:11:47 +01:00
Colomban Wendling
362a5cc654 Fortran: properly report scope for programs, subroutines and types
To do this we change the internal types to only use types matched by
symbols_get_current_scope().  This is a bit of a hack, but the tag
types were already questionable and simply mapped to ones the
TagManager know.

This however merges Functions and Subroutines under the same top-level
item in the symbol list.
2014-02-18 19:04:37 +01:00
Dimitar Zhekov
20f12872e2 re-fix regex error message parsing (match count returns # of subgroups) 2014-02-15 11:46:23 +11:00
Dimitar Zhekov
df9a1b15c6 fix regex error message parsing (GRegex indexes subgroups, not matches) 2014-02-14 10:08:15 +11:00
Colomban Wendling
b1d6291f7d Fix unused warning when building without VTE support 2014-02-11 18:15:43 +01:00
elextr
5d3b2f6269 Fix crash if document closed while custom command is executing
Custom command callback never checked that the doc was still valid.
Can still paste in the wrong doc if user closes and opens while
the command is running, but not crash.
2014-02-10 12:19:45 +11:00
Enrico Tröger
3d9908df8c Set tag kind for Python imports to externvar and map them in the symbol list.
This fixes 'Go to Tag definition' for parsed Python imports as before the import
statement was chosen as the definition while we prefer the class definition as
target.
2014-02-08 10:26:08 +01:00
Enrico Tröger
c4b0f0f74d Add new symbol list category "Extern variables"
This is a requirement for an upcoming Python parser fix. This new category
will be currently only used by Python, C and D parsers. Before this change,
in C & D extern variables were sorted into the category "Other", now they
have their own category.
2014-02-08 10:23:30 +01:00
Matthew Brush
986c59aecb Use GeanyFiletypeGroupID enum in a few places
Also move the `group_menus` global variable to the top of the file
with the other globals.
2014-01-28 17:16:50 -08:00
Colomban Wendling
6a85a50d21 Replace bare CTags parser ID numbers with an enumeration
Avoid using magic numbers in the source for better readability and
easier maintenance.
2014-01-29 01:34:26 +01:00
Matthew Brush
576be4ca3b Reformat builtin filetype initialization code into tabular format
* Add an initialization function ft_init()
* Add a function-like macro to call ft_init() with shorter arguments
* Search and replace old code with FT_INIT() usage
* Layout into columns and add documentation above
2014-01-28 15:32:08 -08:00
Matthew Brush
c674f0660a Cleanup filetype_make_title() a bit and use it more
* Adds TITLE_NONE, TITLE_SCRIPT and TITLE_DOCUMENT.
* Only a few filetype titles were tweaked but we should review the
  rest as we could use TITLE_SCRIPT and TITLE_DOCUMENT a lot more
  probably.
* Make filetype_make_title() not care about GeanyFiletype type and
  return result instead of internally setting ft state.
2014-01-28 15:20:03 -08:00