4425 Commits

Author SHA1 Message Date
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
Colomban Wendling
c2dcec7107 Don't use G_LIKELY() in macros commonly used in g_return_if_fail()
g_return_if_fail() puts itself its condition in a G_LIKELY() clause,
and nested G_LIKELY() lead to warnings about shadowed variables, as
well as not being of any use.

Also, hiding G_LIKELY() in a macro may lead to unexpected use of it
which may hint the compiler incorrectly.
2014-01-22 17:38:29 +01:00
Colomban Wendling
7473e4b1d9 Add defensive checks for function receiving a GeanyDocument argument
Always check the passed-in GeanyDocument argument is a valid one, not
to possibly work on an invalid document.
2014-01-22 17:38:29 +01:00
elextr
5d62030667 Fix "leaks" of geany_run_script (bug 975)
In build_run_cmd() the script was not deleted when any one of
several errors occurred.  The errors are not related to script
contents so it makes no sense to leave the script.

Also fixes failure to delete script if a working dir was set.
2014-01-22 09:15:25 +11:00
Colomban Wendling
7c6f48e4f5 Workaround a slowness in multi-column combo boxes under GTK3
Always set the combo boxes' wrap-width after their models are fully
filled to work around dramatic slowness described in GTK bug
https://bugzilla.gnome.org/show_bug.cgi?id=722388
2014-01-18 03:13:05 +01:00
SiegeLord
828df0ab5f Add shebang filetype detection for Rust 2014-01-14 12:50:38 -05:00
SiegeLord
3d7ade4e02 Integrate the Rust lexer with the rest of Geany's functionality 2014-01-14 12:50:38 -05:00
SiegeLord
a085573212 Use :: as the context separator for Rust 2014-01-14 12:50:37 -05:00
dobkeratops
b17b4be126 Added the Rust filetype 2014-01-14 12:50:37 -05:00
Colomban Wendling
1a5554c41c Add our stock icons manually
Although GtkIconFactory implements GtkBuildable properly and works just
fine, Glade can't handle it and keeps removing it upon save.  So, drop
the automatic setup to a manual one so the UI description is editable
with Glade again, and which also has the small advantage of not
repeating the stock ID strings.
2014-01-10 18:33:04 +01:00
Colomban Wendling
17a7469b68 Avoid a few unnecessary widget lookups 2014-01-09 17:50:30 +01:00
Colomban Wendling
680a556fff Find when activating the find entry in the replace dialog 2014-01-09 17:34:50 +01:00
Dimitar Zhekov
625c7b829d fix unexisting keys assigned to "Send selection to -> ..." 2014-01-09 15:27:51 +01:00
Colomban Wendling
4c8d2fb928 Fix handling of --list-documents when no other instance are running
Properly exit when passed --list-documents, even if no other instance
were already running.  This makes this option behave the same in any
case, making it easier to use in e.g. scripts.
2013-12-19 20:45:25 +01:00
Colomban Wendling
0eec7764af Fix truncation of the data retrieved with --list-documents
Do not truncate the document list to the size of the buffer used for
communication.

Since we now read multiple times, we need to make sure to always send
ETX so a reader don't hang reading the next chunk if the data sent had
exactly the size of the buffer.
2013-12-17 16:17:21 +01:00
Colomban Wendling
98b82550a8 Plug a few possible small memory leaks 2013-12-05 21:39:59 +01:00
Colomban Wendling
ddf67a8586 VTE: properly use the default value for invalid configured colors 2013-12-05 20:18:27 +01:00
Colomban Wendling
4aff511b01 Remove unnecessary allocation for VTE color settings 2013-12-05 20:16:54 +01:00
Colomban Wendling
69f1cc7136 Remove useless rotate_rgb() 2013-12-04 15:49:47 +01:00
Colomban Wendling
4ce6409e89 Remove useless utils_invert_color() 2013-12-04 15:46:05 +01:00
Colomban Wendling
8980970630 Unify color parsing
Change utils_parse_color() to use gdk_color_parse() and follow its
syntax, additionally supporting our "0x" prefix as a synonym for the
"#" prefix;  and use this everywhere.

Also add utils_color_to_bgr() and utils_parse_color_to_bgr() to provide
conversion to the 24 bits BGR format used by Scintilla.
2013-12-04 15:31:17 +01:00
Colomban Wendling
1590007862 Remove an unnecessary allocation 2013-12-04 14:59:05 +01:00
Colomban Wendling
3522e81d73 Merge branch 'wip/color-parsing-improvements' 2013-12-03 03:09:41 +01:00
Colomban Wendling
f07b5457d6 Simplify fold toggling code using higher-level Scintilla API 2013-12-02 23:19:44 +01:00
Colomban Wendling
3759562d7c Simplify reading highlighting colors with new utils_parse_color()
Drop redundant code converting # and short formats to hex colors now
utils_parse_color() can parse them.
2013-12-02 22:58:54 +01:00
Colomban Wendling
ebde42617a Accept colors with only 1 digit per channel in utils_parse_color()
AKA short HTML color notation.
2013-12-02 22:53:35 +01:00
Colomban Wendling
11a2f0ee91 Properly validate input in utils_parse_color() 2013-12-02 22:44:40 +01:00
Colomban Wendling
507005ca54 Rename utils_strtod() to utils_parse_color()
Rename the function to a more sensible name, and remove unnecessary
arguments.  Now, format (# or 0x) is auto-detected.
2013-12-02 22:38:11 +01:00