5287 Commits

Author SHA1 Message Date
Colomban Wendling
8e6e3037ba Always show icons in the go to symbol popup
This uses a menu and is thus subject to the menu icons visibility
setting, but here it should reflect the view from the symbols list,
and thus show the icon in all cases.
2018-11-26 15:32:26 +01:00
elextr
653b06e07a
Fix line breaking with multibyte characters (#1960)
Fixes #1958 

Also replace GDK_space with ASCII space, its searching for that, not the keycode (which just happens to have the same value, lucky).
2018-11-18 19:29:54 +10:00
Colomban Wendling
939dab08e0 Process files in the order they are listed when generating a tags file 2018-11-12 11:33:58 +01:00
Colomban Wendling
fc6a9bb9cb tm: Cleanup include lookup
Don't use the files inode as the hash.  Although it looks like a good
idea for de-duplicating links as well, it has several issues, including
non-uniqueness of inodes across file systems.
The way it was done hashing the inode but comparing the file name
string pointers also made the hash mostly irrelevant, as it just stored
filenames sharing the same inode in the same hash bucket but without
actually doing any de-duplication, making the whole thing a convoluted
way of converting to a list.

Instead, hash and compare the filenames themselves, which, even though
it doesn't handle links de-duplication, is better than the
non-functional previous code.

Also, directly build the list and only use the hash table as a way for
checking for duplicates, which is both faster and gives a stable
output.
2018-11-12 10:22:29 +01:00
Colomban Wendling
0b75601ac8 Merge pull request #1914 from b4n/scintilla/update-3-10-0
Update Scintilla to version 3.10.0

Fixes #1421.
2018-09-19 22:22:24 +02:00
Colomban Wendling
3f20ad363a Don't beep if there is no next snippet cursor
Now the keybinding can be overridden (e.g. using Tab for it as well as
normal behavior), beeping when there is no next cursor is more annoying
than useful.

Part of #1554.
2018-08-04 16:23:09 +02:00
Colomban Wendling
ea47c6c713 Update Diff styles for new Scintilla version
The new styles are for "diff of a diff", e.g. lines starting with `++`,
`+-`, `-+` and `--`.  Those are currently mapped conservatively keeping
the previous display behavior, until we have good style matches for
them.
2018-08-01 14:53:30 +02:00
Colomban Wendling
3fa7576e13 Update Scintilla to version 3.10.0
Scintilla 3.7.6/4.0.0 deprecated `SCE_*STYLEBITS*` and moved it to
deprecated features that require a build-time flag to be available.

Thus, drop use of those (as they are now no-ops anyway) and bump the
ABI (so plugins depending on those don't build mistakenly load) and API
(so a developer can guard use of those if wanted) version accordingly.
2018-08-01 14:51:52 +02:00
LarsGit223
63eaf257de keybindings: Added missing "Strip Trailing Spaces" (#1806)
Fixes #395.
2018-07-16 07:53:01 +10:00
Colomban Wendling
8cdf1d1ee8 Make a local function static 2018-06-15 23:08:54 +02:00
Deimos715
592c68b123 Update some links to HTTPS
See also b10b2a716784d7fa3fd953ebde55982c39878313 (PR #1840)

Closes #1868
2018-06-02 15:02:14 -07:00
Colomban Wendling
b778e4b56f Merge pull request #1843 from b4n/smooth-scroll-bug
Fix horizontal and page scroll on GTK3
2018-05-26 12:17:11 -04:00
Jiří Techet
38a0e4f5b0 Allow plugins to process keypress events before Geany (#1829)
In addition, the signal allows plugins swallow the event so it's not
processed by Geany.
2018-05-22 09:35:44 +10:00
Colomban Wendling
604eac9f06 Fix horizontal and page scroll on GTK3
Our custom scroll handler for horizontal (Shift+Scroll) and page
(Alt+Scroll) scroll didn't properly check the scroll direction and
assume that if it's not down it's up.  This was mostly not a problem
because the other types only were left and right scroll events, which
are a lot less common.

However, it became a lot more problematic with GTK 3.4 that introduced
"smooth scrolling", and thus a new scroll type that can happen for
events in any direction.  We then would scroll up (as we assume "not
down" is up) regardless of the actual direction of the event.

It's still not clear why we'd get smooth scroll events on X11 as no
code I can find asks for it and we generally don't get those, but
sometimes a Scintilla widget starts receiving them, leading to the bug.
On Wayland on the other hand, Scintilla asks for smooth scroll events,
so we need to have a fix for it in any case.
2018-04-24 19:19:56 -03:00
Paul Menzel
b10b2a7167 Use HTTPS URL for domain www.geany.org
Replace all occurrences with the command below.

    git grep -l 'http://www.geany.org' | xargs sed -i 's,http://www.geany.org,https://www.geany.org,g'
2018-04-23 17:11:37 +02:00
Colomban Wendling
1611e3f949 Merge pull request #1748 from kugel-/msgwin-api
Add GI-compatible msgwin_*_add()

Closes #1748.
2018-04-05 15:47:30 -04:00
Colomban Wendling
bec3832359 Bump API version 2018-04-05 15:44:44 -04:00
Thomas Martitz
78644a8260 msgwin: improve doxygen comments
Make the brief text be distinct between msgwin_*_add and msgwin_*_add_string().
Also add @see directives where appropriate. Lastly, add @since to
msgwin_status_add() for completeness.
2018-04-05 15:44:43 -04:00
Thomas Martitz
cb179943ad msgwin: beautify doxygen comments a bit 2018-04-05 15:44:43 -04:00
Thomas Martitz
d3417b7b37 api: add non-variadic variants of msgwin_*_add to the API
The variadic variants cannot be gobject-introspected, i.e. are not available
in  Peasy.

In fact, msgwin_compiler_add_string() and msgwin_msg_add_string() already
existed and have just been exported. msgwin_status_add_string() is new but
msgwin_status_add() becaume a wrapper around it in the same fashion as the
other two pairs.
2018-04-05 15:44:43 -04:00
Colomban Wendling
4d252c7a19 Merge pull request #1799 from b4n/plugin-manager/selection-on-double-click
Fix PM button desynchronization and possible crash
2018-04-03 17:52:19 -04:00
Colomban Wendling
11da5557a0 Skip the format specifier when loading a global tag file
This prevents loading a spurious tag for the format specifier line, as
well as fixing loading of CTags format with a format specifier line.

Before this change, the file pointer was rewound after reading a format
specifier line; but this had various unwanted side effects depending on
the recognized format:

* For TagManager and Pipe formats, it led to loading a tag named after
  the format specifier (e.g. a literal "# format=tagmanager").  This
  was fairly harmless and only introduced a spurious tag seldom even
  used because "#" isn't usually considered for looking up completions.
* For CTags format, having an explicit specifier led to failure to load
  the file in most cases because the specifier line would be parsed but
  doesn't usually follow the format's requirements, leading to early
  abortion loading that file.  On some very specific specifier lines
  actually following CTags format, it could have led to loading a
  spurious tag instead.

Fixes #1814 and closes #1816.
2018-03-23 00:48:18 -04:00
LarsDW223
7fd73a06a7 keyfile: Output unescaped filename if session file cannot be opened
Fixes #779.
2018-03-13 18:55:01 -07:00
LarsDW223
08a60e3c7e spawn: Changed confusing macro name, fixes #1256 2018-03-13 20:04:53 +01:00
Colomban Wendling
373852c737 Fix plugin manager UI synchronization on double click
When toggling a plugin, we temporarily set the tree store's row entry
for the plugin pointer to NULL as we destroy and reload the selected
plugin, and its pointer would be invalid in the meantime.  This results
in the filter we use to display search results to temporarily hide the
row, changing the actual number of rows and thus, depending on timing,
this will or will not change the selected row (it will when double
clicking, not when single-clicking), in a seemingly more or less random
fashion as we use a sorted model.

Finally, as we manually update the buttons visibility for the toggled
plugin (as we otherwise do only for changing selection, which should
not happen in this case -- well, most of the time as you can see), this
can lead to the buttons to be updated for a now unselected row, getting
those out of sync.

The fix here is not to actually hide rows with a NULL plugin, because
it can only happen in 2 cases, where we actually want to see it:

1. while toggling a plugin, as explained above, in which case it had to
   match the search already.
2. when there is no plugins and we want to display a "No plugins
   available" message, and the search should not affect this.

This incidentally also fix the "No plugins available" so it's actually
visible, instead of always hidden.

Fixes #1781.
2018-03-10 17:37:31 -05:00
Colomban Wendling
99150b0cca Check plugin actually has a help function before invoking it
This should not be needed in normal operation, but is safer if the UI
gets out of sync for some reason.
2018-03-10 17:23:29 -05:00
Colomban Wendling
175e45ab47 spawn: Add debugging information when switching to timeout source 2018-03-09 19:55:04 -05:00
Colomban Wendling
29d14b1c99 Merge pull request #1461 from zhekov/master
Handle continuous G_IO_IN-s without any data.

This fixes spawn clients using recursive sources, like the Scope
plugin.
2018-03-09 19:53:00 -05:00
Colomban Wendling
5a2f4b4010 Remove a double space in a string
Part of #1789
2018-03-01 16:45:45 -06:00
scootergrisen
65a156f0bc Remove a space (#1790)
Should there not only be one space here?
2018-02-28 17:46:47 +01:00
Frank Lanitz
51d815ff44 Add missing space in string. Fixes #1789 2018-02-28 17:23:45 +01:00
Enrico Tröger
824b2cb660 Update copyright years 2018-02-25 15:47:55 +01:00
Enrico Tröger
6c531e7143 Post release version bump
Say hello to Geany 1.34 "Keong"!
2018-02-25 15:47:14 +01:00
Matthew Brush
16020ddc6c Add cast to GtkWidget* to match previous behaviour
This fixes minor problem which affected C++ plugins since
3e649dddef93723ebc2487d30023fc5f62d894ca where they would have to add
a the cast themselves.
2018-01-26 17:13:41 +01:00
Matthew Brush
cc035ab99d Merge branch 'gcc-warnings' 2018-01-12 14:07:49 -08:00
Matthew Brush
6622574172 Fix double context menu in Terminal tab
This was introduced in 1f71ccd because the VTE widget's existing
button-press handler didn't return `TRUE` and so the event propogated
up to the notebook showing both of their context menus.
2018-01-12 13:55:07 -08:00
Matthew Brush
7e1ab31c18 Return GdkColor via out parameter rather than return value
For some reason the TravisCI build has `-Waggregate-return` enabled as
an error even though it's completely valid code. Also constify the
input `color_name` argument to `load_color` function.
2018-01-12 13:45:38 -08:00
Matthew Brush
6b973bc70b Theme improvements (#1382)
* Improve GTK+3 theme loading

- Merge geany-3.0.css into geany.css
- Load geany-3.20.css to override if runtime version dictates
- Load geany.css from app->configdir if it exists.

* Add initial documentation for GTK+ CSS theming

* Add geany.css file to the `Tools->Configuration Files` menu

Also mark such config files as changed if they don't already exist to
force the user to save or discard any newly created config files.

* Allow customizing message window using GTK+ themes

* Improve GTK+3 CSS docs a bit

State which classes are meant to be overridden by themes.

* Go back to conditionally loading geany-3.0.css

It can't be merged into geany.css since GTK+ CSS parser doesn't ignore
invalid properties when prefixed with vendor extension (ie. -Gtk).

* Don't mark unedited config files as changed

They probably should be marked as changed since they don't exist on
disk yet, but for the time being leave it how it was.

* Fix misuse of CSS ID vs class in manual

* Minor colour value tweaks

Based on feedback from @b4n
2018-01-13 06:46:50 +10:00
Colomban Wendling
385fff7b27 Merge pull request #1642 from LarsGit223/NoActionCmd
Show status message on attempt to execute empty context action.
2018-01-11 22:18:16 -08:00
LarsDW223
01b0fc6a53 Show status message on attempt to execute empty context action.
If a user selects "context action" from the context menu then now the status message
'No context action set.' will be shown. Closes #1641.
2018-01-05 09:41:56 +01:00
Matthew Brush
681c13841a Work around potentially uninitialized variable warning
Simply zero-initializes the variable.

Requires -O3 optimization level to trigger.
2017-12-20 18:59:16 -08:00
Matthew Brush
c61bc6784b Work around a -Wformat-overflow warning
Requires -O3 optimization level to trigger the warning.

Discussed in and fixes #1683
2017-12-20 18:58:49 -08:00
Matthew Brush
fce58626b1 Add 'fall through' comments and fix actual bug
To document when switch cases fall through intentionally, hiding the
warning by GCC at the same time.

Moved the break statement outside of the if conditional in keybindings.c
as I believe this was an actual bug found by GCC's warnings.
2017-12-20 17:22:51 -08:00
Matthew Brush
1b5deea612 Fix comparison between signed and unsigned integers
Where an enumerator was treated as signed.
2017-12-20 17:22:51 -08:00
Matthew Brush
36f44741b5 Remove some unused variables
These were introduced in #1470 and a fix was also provided in #1554.
2017-12-20 17:22:51 -08:00
Colomban Wendling
69a537dbd0 Merge pull request #1598 from b4n/symbols/more-robust-hierarchy
Fix the symbols tree hierarchy when several tags have the same name
2017-12-20 16:34:41 -08:00
Colomban Wendling
f5fe073586 Merge pull request #1706 from b4n/document-items-tooltip
Add a tooltip showing the full path on menu items representing documents
2017-12-03 23:12:18 -08:00
Colomban Wendling
4a304e983c Fix critical when right-clicking on the document notebook outside a tab 2017-12-03 18:22:52 -08:00
Colomban Wendling
419550ab05 Add a tooltip showing the full path on menu items representing documents 2017-12-03 18:05:00 -08:00
Enrico Tröger
ca16aff4c5 Post release version bump
Say hello to Geany 1.33 "Gorgon"!
2017-11-19 13:57:22 +01:00