Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Tue, 24 Apr 2018 22:19:56 UTC
Commit: 604eac9f06e506a2b8a1e2cc04992f32cf3bb426
https://github.com/geany/geany/commit/604eac9f06e506a2b8a1e2cc04992f32cf3bb…
Log Message:
-----------
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.
Modified Paths:
--------------
src/editor.c
Modified: src/editor.c
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -4748,6 +4748,10 @@ on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_d
{
GeanyEditor *editor = user_data;
+ /* we only handle up and down, leave the rest to Scintilla */
+ if (event->direction != GDK_SCROLL_UP && event->direction != GDK_SCROLL_DOWN)
+ return FALSE;
+
/* Handle scroll events if Alt is pressed and scroll whole pages instead of a
* few lines only, maybe this could/should be done in Scintilla directly */
if (event->state & GDK_MOD1_MASK)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Sat, 26 May 2018 16:17:11 UTC
Commit: b778e4b56f7cda19da0f9970d8e9f584e19a4732
https://github.com/geany/geany/commit/b778e4b56f7cda19da0f9970d8e9f584e19a4…
Log Message:
-----------
Merge pull request #1843 from b4n/smooth-scroll-bug
Fix horizontal and page scroll on GTK3
Modified Paths:
--------------
src/editor.c
Modified: src/editor.c
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -4748,6 +4748,10 @@ on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_d
{
GeanyEditor *editor = user_data;
+ /* we only handle up and down, leave the rest to Scintilla */
+ if (event->direction != GDK_SCROLL_UP && event->direction != GDK_SCROLL_DOWN)
+ return FALSE;
+
/* Handle scroll events if Alt is pressed and scroll whole pages instead of a
* few lines only, maybe this could/should be done in Scintilla directly */
if (event->state & GDK_MOD1_MASK)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: elextr <elextr(a)gmail.com>
Date: Mon, 21 May 2018 23:35:44 UTC
Commit: 38a0e4f5b01ac2ed6ad91de8724cd769c0cfab37
https://github.com/geany/geany/commit/38a0e4f5b01ac2ed6ad91de8724cd769c0cfa…
Log Message:
-----------
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.
Modified Paths:
--------------
doc/pluginsignals.c
src/geanyobject.c
src/geanyobject.h
src/keybindings.c
src/plugindata.h
Modified: doc/pluginsignals.c
20 lines changed, 20 insertions(+), 0 deletions(-)
===================================================================
@@ -270,3 +270,23 @@ signal void (*update_editor_menu)(GObject *obj, const gchar *word, gint pos, Gea
*/
signal gboolean (*editor_notify)(GObject *obj, GeanyEditor *editor, SCNotification *nt,
gpointer user_data);
+
+/** Sent whenever a key is pressed.
+ *
+ * This signal allows plugins to receive key press events before they are processed
+ * by Geany. Plugins can then process key presses before Geany and decide,
+ * whether Geany should receive the key press event or not.
+ *
+ * @warning This signal should be used carefully. If multiple plugins use this
+ * signal, the result could be unpredictble depending on which plugin
+ * receives the signal first.
+ *
+ * @param obj a GeanyObject instance, should be ignored.
+ * @param key The GdkEventKey corresponding to the key press.
+ * @param user_data user data.
+ * @return @c TRUE to stop other handlers from being invoked for the event.
+ * @c FALSE to propagate the event further.
+ *
+ * @since 1.34
+ */
+signal gboolean (*key_press)(GObject *obj, GdkEventKey *key, gpointer user_data);
Modified: src/geanyobject.c
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -229,6 +229,15 @@ static void create_signals(GObjectClass *g_object_class)
0, NULL, NULL, g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
G_TYPE_KEY_FILE);
+
+ /* Key press signal */
+ geany_object_signals[GCB_KEY_PRESS_NOTIFY] = g_signal_new (
+ "key-press",
+ G_OBJECT_CLASS_TYPE (g_object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, boolean_handled_accumulator, NULL, NULL,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
}
Modified: src/geanyobject.h
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -57,6 +57,7 @@ typedef enum
GCB_BUILD_START,
GCB_SAVE_SETTINGS,
GCB_LOAD_SETTINGS,
+ GCB_KEY_PRESS_NOTIFY,
GCB_MAX
}
GeanyCallbackId;
Modified: src/keybindings.c
6 lines changed, 6 insertions(+), 0 deletions(-)
===================================================================
@@ -38,6 +38,7 @@
#include "callbacks.h"
#include "documentprivate.h"
#include "filetypes.h"
+#include "geanyobject.h"
#include "keybindingsprivate.h"
#include "main.h"
#include "msgwindow.h"
@@ -1350,10 +1351,15 @@ static gboolean on_key_press_event(GtkWidget *widget, GdkEventKey *ev, gpointer
GeanyDocument *doc;
GeanyKeyGroup *group;
GeanyKeyBinding *kb;
+ gboolean key_press_ret;
if (ev->keyval == 0)
return FALSE;
+ g_signal_emit_by_name(geany_object, "key-press", ev, &key_press_ret);
+ if (key_press_ret)
+ return TRUE;
+
doc = document_get_current();
if (doc)
document_check_disk_status(doc, FALSE);
Modified: src/plugindata.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -59,7 +59,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously
* @c GEANY_API_VERSION was defined as an enum value, not a macro.
*/
-#define GEANY_API_VERSION 236
+#define GEANY_API_VERSION 237
/* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins
* with GTK3-linked Geany leads to crash */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: FMuro <fmuro(a)us.es>
Committer: Frank Lanitz <frank(a)frank.uvena.de>
Date: Sat, 05 May 2018 18:36:08 UTC
Commit: af158988239e806be1b93268c9dfb387b689b1f7
https://github.com/geany/geany/commit/af158988239e806be1b93268c9dfb387b689b…
Log Message:
-----------
Fix boldface and italics (#1837)
Before, **boldface** or *italics* (also _italics_) would not generally show as that, definitely not with the default color scheme. After this change, they appear with the same color as normal text but with that typography, in all color schemes.
Modified Paths:
--------------
data/filedefs/filetypes.markdown
Modified: data/filedefs/filetypes.markdown
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -2,8 +2,8 @@
[styling]
# Edit these in the colorscheme .conf file instead
default=default
-strong=string_3
-emphasis=string_4
+strong=default,bold
+emphasis=default,italic
header1=keyword_1
header2=keyword_1
header3=keyword_1
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).