4189 Commits

Author SHA1 Message Date
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
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
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
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
64a47b9cb6 Allow to switch message window orientation to place it on the right 2012-10-01 21:38:56 +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
Lex Trotman
9ef34bbe0c Fix pointer warning
GCC 4.7.1 gives a incompatible pointer warning because gtk_adjustment_new
returns a GObject* not a GtkAdjustment* (new compiler default).
2012-09-22 16:05:51 +10:00
Lex Trotman
5ef6e1627c Fix multiline comments at end of file
Multiline comments did not work at end of file because there is no
style there so also check if at end of file as well as style.
Closes #3026691
2012-09-22 14:13:14 +10:00
Lex Trotman
fbb89f523a Remove illegal signal handling
The SIGTERM handler called the standard exit callback which uses
functions that are illegal in signal handlers.  Commented out as
a prelude to full removal if no use case can be made.
2012-09-22 13:40:33 +10:00
Lex Trotman
e5e3760157 Use faster squiggle underlining
Geany performance suffered with a lot of error underlining visible.
Matthew Brush developed an improved implementation that was accepted
into Scintilla, this selects that implementation.
2012-09-22 12:47:29 +10:00
Colomban Wendling
8289e8f962 Report scope including classes, namespaces and alike
Don't only match the current function as the current scope, but also
classes, namespaces and others containers.

Closes #1996778.
2012-09-17 22:51:36 +02:00
Colomban Wendling
491a45f614 Improve symbols_get_current_function() a lot and make it more flexible
Finding the current function now better handles the case the current
line is after a function but outside its scope, and many other issues
the scope reporting had.
2012-09-17 22:50:32 +02:00
Colomban Wendling
9d2dab8fcf Fix an off-by-one issue in sci_get_position_from_line()
Scintilla counts lines from 0 but TagManager from 1, so convert them.
2012-09-17 20:22:52 +02:00
Colomban Wendling
afb1eaaa01 Remove improper caching of the current function
The code assumed that if both old and new fold levels were above the
minimal function fold level the function couldn't have been changed,
which is wrong if a function can appear both inside and outside another
fold level (e.g. inside or outside a class).
2012-09-17 14:44:33 +02:00
Colomban Wendling
adbd162c7b Also consider tags up to date if realtime parsing is active
This makes symbols_get_current_function() more accurate by using TM
data even on a modified file if realtime tag parsing is enabled, thus
if the data has reasonable chances to be correct.
2012-09-17 14:44:33 +02:00
Colomban Wendling
df3d35dab1 No need to update GdkDragContext:action
Updating GdkDragContext:action is not needed and this field is private
anyway.
2012-09-16 00:28:46 +02:00
Colomban Wendling
b58995c9fc Don't access private field GtkNotebook::event_window 2012-09-16 00:26:43 +02:00
Frank Lanitz
987c13e26f Added Basque translation provied by Asier Iturralde Sarasola 2012-09-15 19:10:53 +02:00
Colomban Wendling
faeeaf4bd2 Check the VTE library we're loading actually have all symbols we need
This prevents a crash if the VTE library we happen to load lacks a
symbol we need, which can happen e.g. if the user passed an improper
library to the --vte-lib command-line option or if the VTE library is
loadable but broken.
2012-09-13 16:34:18 +02:00
Colomban Wendling
da5bb7f0e1 Don't access GtkColorSelectionDialog fields directly
Also don't hack around and handle clicks on the dialog's buttons but
rather simply handler the dialog's response.
2012-09-13 16:34:18 +02:00
Colomban Wendling
72db3a711e Don't use deprecated GtkObject 2012-09-13 16:34:18 +02:00
Colomban Wendling
96afed1e9c Don't access GtkFontSelectionDialog fields directly
Also don't hack around and handle clicks on the dialog's buttons but
rather simply handler the dialog's response.
2012-09-13 16:34:18 +02:00
Colomban Wendling
49f6ebbd0a Don't use gtk_widget_hide_all(), deprecated in 2.24 2012-09-13 16:34:18 +02:00
Colomban Wendling
926744b4b7 Don't use pre-GObject types and macros 2012-09-13 16:34:18 +02:00
Colomban Wendling
8b181f7c79 Don't access GtkSelectionData fields directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
593fef7fa0 Don't access GtkWidget:parent directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
c7f6997361 Don't access GtkNotebook fields directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
2d878c8a5d Don't use deprecated GtkNotebookPage 2012-09-13 16:34:18 +02:00
Colomban Wendling
4d16735380 Don't access GtkDialog fields directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
5ada77df70 Don't use deprecated gtk_box_pack_start_defaults() 2012-09-13 16:34:18 +02:00
Enrico Tröger
8171af611f Don't set the focus to the editor widget when clicking a symbol while holding Control
When clicking a symbol in the Symbols sidebar and holding the Control modifier key, don't
set the focus to the editor widget so further navigation in the Symbols sidebar with keys
is possible.
2012-09-09 16:05:58 +02:00
Colomban Wendling
49dafc8536 Use namespaces icon for Ruby modules
It's not perfect but better than nothing since other tags have icons.
2012-09-06 20:43:49 +02:00
Colomban Wendling
8f0ddfe4ef Merge branch 'printing-with-scintilla'
Closes #3475444, #2804000 and #2629121.
2012-09-06 18:45:26 +02:00
Nick Treleaven
00714db69c Improve collapsing fold behaviour when start point is offscreen
When collapsing a fold range whose starting line is offscreen,
scroll the starting line to display at the top of the view.
Otherwise it can be confusing when the document scrolls down to hide
the folded lines.
2012-09-05 17:13:34 +01:00
Lex Trotman
f53f37c578 Save encoding in session as text
Since reading locale and reading encodings from within files by regex
can find encodings not on the Geany list, saving as text ensures that
any encoding found can be saved in the session, otherwise a file can
be opened but will not re-open because the encoding cannot be saved
in the session.  Since numeric encoding names exist prefix the text
name by 'E' so they can be distinguished from saved numeric indexes.
2012-09-03 18:36:39 +10:00
Miguel Sánchez de León Peque
e469aa27e0 Update VHDL parser to display blocks in the symbols list 2012-09-02 19:42:25 +02:00
Colomban Wendling
66b93d2d8d Fix "mark all" search feature when using regular expressions
Use the proper, full-featured, regular expression engine we use
everywhere else rather than Scintilla's stripped-down one.

Closes #3564132.
2012-09-02 14:47:07 +02:00
Colomban Wendling
69d8295c5e Don't try to unref NULL regex 2012-09-02 14:17:34 +02:00
Colomban Wendling
b82134e021 printing: Fix line number margin border position 2012-08-27 21:28:46 +02:00
Frank Lanitz
2b163c367d Adding Hebrew translation 2012-08-25 17:11:52 +02:00
Colomban Wendling
ce742b45dd Remove spurious semicolons 2012-08-24 20:20:09 +02:00
Colomban Wendling
d80bc7ce56 Update FSF address
Closes #3557875.
2012-08-24 19:25:57 +02:00