6606 Commits

Author SHA1 Message Date
Colomban Wendling
2874357a97 Add new PO lexer to the build system 2012-10-25 17:09:55 +02:00
Colomban Wendling
7acc68ea00 Refresh our Scintilla patch for the new lexers 2012-10-25 17:09:55 +02:00
Colomban Wendling
4d16754267 Update Scintilla to version 3.2.3
Closes #2909124, #3094431 and #3233160.
2012-10-25 17:09:34 +02:00
Nick Treleaven
d7e285d00e Fix parsing colons in D (#3577788) 2012-10-25 13:54:52 +01:00
Nick Treleaven
00c2cc20ea Fix gcc missing field initializer warning 2012-10-24 17:43:26 +01:00
Nick Treleaven
a3664fae9e Fix spawning [synchronous] commands on Windows
Build command spawning failed sometimes when there were several
pages of errors. In these cases the process would block for 30s and
then abort. (Some hangs were also experienced).

This fix does cause a console window to be shown for the duration of
the spawned process. This seems acceptable compared with the old
broken behaviour, and can be useful to abort the build command by
closing the console window.

Note: If 'env' is passed, the old broken spawning is used.
2012-10-24 17:35:19 +01:00
Colomban Wendling
8855c146cc Fix a use of non-const variable to hold a string literal 2012-10-22 22:40:19 +02:00
Colomban Wendling
6c7f69578d Parse C++11 classed enums
Part of #3578557.
2012-10-22 22:39:04 +02:00
Colomban Wendling
f2f22d34ab Parse C++11 enums with type specifier
Part of #3578557.
2012-10-22 22:38:12 +02:00
Colomban Wendling
a77785e378 Set style for SCE_C_STRINGRAW (C++11 raw strings)
Part of #3578557.
2012-10-20 14:07:13 +02:00
Colomban Wendling
f04df056cd Fix parsing of C++11 final classes
Closes #3577559.
2012-10-19 21:39:38 +02:00
Colomban Wendling
b626cc93e3 ReStructuredText: fix parsing of titles containing UTF-8 characters
If a title contained multi-byte UTF-8 characters, it wasn't properly
recognized due to the title being longer (in bytes) than the underline.
So, fix the title length computation to properly count the characters,
not the bytes.

Note that this fix only handles ASCII, one-byte charsets and UTF-8, it
won't help with other multi-bytes encodings.  However, the whole parser
expects ASCII-compatible encoding anyway, and in most situations it
will be fed the Geany's UTF-8 buffer.

Closes #3578050.
2012-10-18 17:15:17 +02:00
Colomban Wendling
6e8e0c7bfb Fix display of non-ASCII tags in the symbols tree for non-UTF-8 files
We used to convert the tags from the file encoding to UTF-8, but since
we parse directly from our UTF-8 buffer, all tags are UTF-8, which lead
to an improper conversion.
2012-10-18 16:55:33 +02:00
Matthew Brush
49d88f0cd5 Don't ignore custom M4 files in m4/ directory 2012-10-16 16:58:32 -07:00
Lex
306eaab391 Alter default and document icon setting
Previous default value prevented the preceding commit from working
(by default), oops.
2012-10-15 11:56:03 +11:00
Lex
6897cd49c6 Make use of theme icon a various pref.
Some users want the theme icon, some dislike the icon provided by
their theme and want the traditional Geany icon.

This makes that choice a various pref.  Used a standalone global
to avoid impacting the plugin interface and CommandLineOptions
and GeanyStatus didn't make sense.
2012-10-14 13:05:11 +11:00
Matthew Brush
4c7ca69be0 Prefer to use Geany icon from theme over inline one
Note that no attempt is made to handle when the icon theme is changed
to update Geany's window icon (ex. using the style-set signal).
2012-10-13 15:37:00 -07:00
Colomban Wendling
220ace841c Fix uncommenting multi-line comments when cursor is on a delimiter
If the cursor was inside one of the comment's delimiters, the code used
to look for another delimiter, leading to removing previous comment's
start.  Moreover, the code assumed the delimiter will always be found,
leading to improper deletions if a delimiter could not be found (either
because of the above problem or because the comment wasn't terminated).

Also, the code used document_find_text() which, if the searched text
cannot be found on the requested direction, either wraps or asks the
user whether to wrap.  Wrapping is wrong if there is more than one
single comment in the file, and the dialog is confusing for the use
since she didn't ask for it.

So, rework the code for it to correctly find the delimiters, and not
to wrap search or ask the user.  It is also simpler by reusing some
already existing code.
2012-10-12 20:40:38 +02:00
Matthew Brush
206c39cb6a Fix reshowing calltip after autoc list closed
Using default priority causes Geany's reshowing idle handler to run
before Scintilla's, changing priority to low in hopes of making it
run after.
2012-10-11 23:07:02 -07:00
Colomban Wendling
5bb0ca5a83 Fix cursor position after comment toggling with no selection
The implementation drops the non-selection code paths and simply makes
sure both caret and anchor are placed at the same position if there
was no selection.  This avoids having two completely different code
paths for things that are very similar -- and alternative code paths
were buggy.

Closes #3576431.
2012-10-12 00:15:29 +02:00
Colomban Wendling
1f244e0d54 Set the primary-toolbar CSS class on the main toolbar under GTK3
This makes the main toolbar look like other GTK3 application ones.
2012-10-09 13:25:12 +02:00
Colomban Wendling
f735e6800b Add GTK3 version of our custom styles
Although GTK3 still have gtk_rc_parse_string(), it doesn't work anymore
for our overrides, so register proper CSS for them.
2012-10-09 13:25:12 +02:00
Colomban Wendling
7d0adef31b Use GtkFontChooserDialog on GTK >= 3.2 for consistency
GtkFontButton uses GtkFontChooserDialog on GTK 3.2 so the UI is more
consistent if we use it explicitly too, and GtkFontSelectionDialog
is somewhat broken on 3.4.
2012-10-09 13:25:12 +02:00
Colomban Wendling
d6fba7ac82 Make GeanyWrapLabel work with GTK3
Although theoretically GtkLabel from GTK3 should be able to replace
GeanyWrapLabel altogether, a bug [1] with it makes it use way too much
space in our about dialog (and possibly other places), making it not
really usable.

So, port the GeanyWrapLabel hack to GTK3, with the appropriate
additional hacks for it to work.  At least it looks good and don't
seem to have resizing issues now.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=657621
2012-10-09 13:25:12 +02:00
Colomban Wendling
caf207c36a Don't use old GTK1-style typesystem
This fixes the SCINTILLA_CLASS() and IS_SCINTILLA() macros on GTK3.
No harm on GTK2, those macros are available since 2.0.

This also makes those macros more consistent with the SCINTILLA()
macro that already uses the proper GObject calls.

Backported from Scintilla HG: 9cd7cf1d9af73d50b0423ed34a6693bbf7f57ac8
2012-10-09 13:25:12 +02:00
Colomban Wendling
1839451363 Fix a packing issue on GTK3
GTK3 changed the default for expand and fill, so explicitly set them.
2012-10-09 13:25:12 +02:00
Colomban Wendling
6c942c1436 Prevent plugins built against GTK2 Geany from loading in GTK3 Geany 2012-10-09 13:24:42 +02:00
Lex Trotman
42b3629aaf Fix sign comparison warnings
GTK uses a signed page_nr parameter to callback draw_page despite
describing it as 0 based, cast it to unsigned for comparisons to
array len which is also unsigned.
2012-10-09 13:56:13 +11:00
Colomban Wendling
394f223b49 Load GTK3 version of the VTE library when built against GTK3 2012-10-08 20:08:07 +02:00
Colomban Wendling
3ae884c13f Make X11 backend specific code GTK3-proof 2012-10-08 20:08:07 +02:00
Colomban Wendling
c5985f0cd1 Add ::draw handler for GTK3 where we have ::expose-event handlers 2012-10-08 20:08:07 +02:00
Colomban Wendling
fa5a00b48b Map GeanyWrapLabel to GtkLabel on GTK3
The GTK3 version of GtkLabel provides what GeanyWrapLabel is for given
the appropriate settings are set, so no need to our own widget -- that
would require being updated to support GTK3 anyway.
2012-10-08 20:08:07 +02:00
Colomban Wendling
3e649dddef Prevent most GTK3 deprecation warnings that can't be fixed on GTK2
Map the various horizontal and vertical deprecated constructors
to their GtkOrientation-based equivalents on GTK3 to prevent most
deprecation warnings.
2012-10-08 20:08:07 +02:00
Colomban Wendling
6409840d4a Get rid of GtkComboBoxEntry API and use GtkComboBoxText API
Use the GtkComboBoxText API and the GtkComboBoxEntry replacement API
and map those to the old equivalents if not available.

This changes the type exposed by ui_combo_box_add_to_history() from
GtkComboBoxEntry to either GtkComboBox (under GTK2) or GtkComboBoxText
(under GTK3).  This should not be too much of an issue since
GtkComboBoxEntry and GtkComboBoxtext are subclasses of GtkComboBox,
but this will still emit warnings when when the calling code passes
a GtkComboBoxEntry pointer to ui_combo_box_add_to_history().

However, this requires the calling code to use the same mapping as we
do (GtkComboBoxText = GtkComboBox on GTK2, even on 2.24), or things
will blow and it'll be hard to understand why.  This wouldn't be an
issue if the calling code includes our gtkcompat.h header everywhere
it deals with combo boxes, which will be the case if it includes the
Geany headers everywhere but probably won't otherwise.  Oh dear.

A possible kind of workaround may be for ui_combo_box_add_to_history()
to do type-checking on its argument and use the actually correct API
for that type.
2012-10-08 20:08:06 +02:00
Colomban Wendling
5ec0eb477d Guard removed dialog separators on GTK3
GtkDialog separators sere deprecated on GTK 2.22 and remove on 3.0,
so define them to dummy values on GTK3.

We don't get rid of them altogether because GTK 2.16 we depend on
probably has separators enabled by default and we want to remove them.
2012-10-08 20:08:06 +02:00
Colomban Wendling
c54639c0e1 Include keysyms compatibility header on GTK3 2012-10-08 20:08:06 +02:00
Colomban Wendling
a763e307f7 Don't access GtkWidget fields directly
Since many accessor are new in GTK versions we don't depend on, add
a header that defines them to the direct access if they aren't
available.
2012-10-08 20:08:06 +02:00
Colomban Wendling
484cc3adac Add configure flag --enable-gtk3 to build against GTK 3.x 2012-10-08 20:08:06 +02:00
Colomban Wendling
eeddd6f720 Move custom styles to a resource file 2012-10-08 17:51:19 +02:00
Colomban Wendling
3070738df8 Make wordchars have precedence over whitespacechars
This makes the "wordchars" setting from filetypes.common and each
specific filetype override filetype.common's "whitespace_chars"
setting, rather than it overriding filetype-specific "wordchars".

This makes the it easy to chose filetype-specific "wordchars", where
before user had not only to update this setting, but also the
filetype.common "whitespace_chars" setting if it listed one or more of
the new characters for the change to actually have an effect -- and
changing "whitespace_chars" for every filetype.

Closes #3429368.
2012-10-06 01:32:54 +02:00
Colomban Wendling
565c917688 Consider dash (-) when looking for the word to complete for CSS 2012-10-06 00:55:03 +02:00
Colomban Wendling
2297badbd7 Use "scala" extension for Scala
Closes #3574723.
2012-10-05 12:43:10 +02:00
Colomban Wendling
64a47b9cb6 Allow to switch message window orientation to place it on the right 2012-10-01 21:38:56 +02:00
trongthanh
474e60b6fa Add more CSS3 keywords 2012-09-30 11:13:43 -07:00
trongthanh
85cb6d527c Improve CSS highlighting 2012-09-30 11:08:13 -07:00
trongthanh
e70d9e5e05 Fix JavaScript ident/keyword highlighting in HTML filetype 2012-09-30 10:57:38 -07:00
Colomban Wendling
2c6c210c6f Fix detection of keywords when followed by a semicolon
Closes #2130612.
2012-09-30 15:46:59 +02:00
Colomban Wendling
c1a7b1b475 Fix various packing issue affecting GTK3 but compatible with GTK2 2012-09-28 18:06:58 +02:00
Colomban Wendling
972b34e49a Keep caret and anchor position upon indent and unindent
Closes #3167355.
2012-09-28 16:19:06 +02:00
Frank Lanitz
d6bbdab166 Update of Basque translation 2012-09-26 21:07:59 +02:00