6570 Commits

Author SHA1 Message Date
Nick Treleaven
e9e41ee47b Move D, Vala unique keyword aliases out of keywordTable
Instead put them in initialize*Parser().
2012-11-15 13:39:53 +00:00
Colomban Wendling
523e0d7c11 Fix reStructuredText comment marker
Closes #3585377.
2012-11-08 15:55:00 +01:00
Nick Treleaven
a742ff3546 Parse scope for D nested template blocks (#3582833) 2012-11-05 16:18:43 +00:00
Nick Treleaven
7d4ffb1e45 Fix parsing D 'static assert' (#3582833) 2012-11-03 16:08:35 +00:00
Colomban Wendling
4423de1a72 Printing: fix improper margins when printing to a physical device
We were improperly adding the printing device margins to the area
where we print, leading to wider margins on physical outputs than
on PDF or preview outputs (which have no hard margins), as well as
wasting space and not respecting user's settings.

Closes #3580269.
2012-11-02 21:48:49 +01:00
Colomban Wendling
9f32fdd1a4 Printing: draw the vertical separator line more accurately
Use the dimensions and offsets used by Scintilla to position our
separator line, since its position depends on where Scintilla drawn.

Closes #3580268.
2012-11-02 21:48:49 +01:00
Colomban Wendling
55b8c7af3f Printing: fix text resolution
Scintilla doesn't respect the context resolution, so we need to scale
its draws ourselves.
2012-11-02 21:48:48 +01:00
Colomban Wendling
75cb789eb5 Fix a c-format typo in the Turkish translation leading to a crash 2012-10-30 23:44:47 +01:00
Colomban Wendling
2109677781 JavaScript parser: fix scope of functions nested inside methods 2012-10-28 18:55:48 +01:00
Colomban Wendling
4dafe0d8d3 JavaScript parser: properly parse regular expression literals
This prevents a regex pattern from fooling the parser if it contains
some recognized constructs, like comment or string literal starts.

Closes #2992393 and #3398636.
2012-10-26 16:59:21 +02:00
Nick Treleaven
3cfd8fa8b1 Clear search markers on Mark All keybinding when already set 2012-10-26 14:37:31 +01:00
Colomban Wendling
318b49ab78 Merge branch 'scintilla-update' 2012-10-25 17:17:25 +02:00
Colomban Wendling
f7f47af085 Update NEWS 2012-10-25 17:09:55 +02:00
Colomban Wendling
4ffd446c43 Update for new PO styles 2012-10-25 17:09:55 +02:00
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