Branch: refs/heads/gtk3-support
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 08 Oct 2012 18:08:07 UTC
Commit: 3ae884c13f0eddd5a8533fefddda8a566196ad24
https://github.com/geany/geany/commit/3ae884c13f0eddd5a8533fefddda8a566196a…
Log Message:
-----------
Make X11 backend specific code GTK3-proof
Modified Paths:
--------------
src/socket.c
Modified: src/socket.c
10 files changed, 8 insertions(+), 2 deletions(-)
===================================================================
@@ -663,12 +663,18 @@ gboolean socket_lock_input_cb(GIOChannel *source, GIOCondition condition, gpoint
if (popup)
{
#ifdef GDK_WINDOWING_X11
+ GdkWindow *x11_window = gtk_widget_get_window(window);
+
/* Set the proper interaction time on the window. This seems necessary to make
* gtk_window_present() really bring the main window into the foreground on some
* window managers like Gnome's metacity.
* Code taken from Gedit. */
- gdk_x11_window_set_user_time(gtk_widget_get_window(window),
- gdk_x11_get_server_time(gtk_widget_get_window(window)));
+# if GTK_CHECK_VERSION(3, 0, 0)
+ if (GDK_IS_X11_WINDOW(x11_window))
+# endif
+ {
+ gdk_x11_window_set_user_time(x11_window, gdk_x11_get_server_time(x11_window));
+ }
#endif
gtk_window_present(GTK_WINDOW(window));
#ifdef G_OS_WIN32
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/gtk3-support
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Tue, 09 Oct 2012 11:24:42 UTC
Commit: 6c942c1436fa91c715cc90ce0d046627e75e3306
https://github.com/geany/geany/commit/6c942c1436fa91c715cc90ce0d046627e75e3…
Log Message:
-----------
Prevent plugins built against GTK2 Geany from loading in GTK3 Geany
Modified Paths:
--------------
src/plugindata.h
Modified: src/plugindata.h
9 files changed, 8 insertions(+), 1 deletions(-)
===================================================================
@@ -57,12 +57,19 @@
*/
#define GEANY_API_VERSION 216
+/* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins
+ * with GTK3-linked Geany leads to crash */
+#if GTK_CHECK_VERSION(3, 0, 0)
+# define GEANY_ABI_SHIFT 8
+#else
+# define GEANY_ABI_SHIFT 0
+#endif
/** The Application Binary Interface (ABI) version, incremented whenever
* existing fields in the plugin data types have to be changed or reordered.
* Changing this forces all plugins to be recompiled before Geany can load them. */
/* This should usually stay the same if fields are only appended, assuming only pointers to
* structs and not structs themselves are declared by plugins. */
-#define GEANY_ABI_VERSION 69
+#define GEANY_ABI_VERSION (69 << GEANY_ABI_SHIFT)
/** Defines a function to check the plugin is safe to load.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/gtk3-support
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 08 Oct 2012 18:08:06 UTC
Commit: 5ec0eb477d51c1ccfa67f1bad606eb6eb18c82eb
https://github.com/geany/geany/commit/5ec0eb477d51c1ccfa67f1bad606eb6eb18c8…
Log Message:
-----------
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.
Modified Paths:
--------------
src/gtkcompat.h
Modified: src/gtkcompat.h
8 files changed, 8 insertions(+), 0 deletions(-)
===================================================================
@@ -31,6 +31,14 @@
G_BEGIN_DECLS
+/* GtkDialog */
+/* GTK 2.22 deprecated dialog separators and 3.0 removed them
+ * We keep those however in case 2.16 has separators by default */
+#if GTK_CHECK_VERSION(3, 0, 0)
+# define gtk_dialog_set_has_separator(dialog, setting) /* nothing */
+# define GTK_DIALOG_NO_SEPARATOR 0
+#endif
+
/* GtkWidget */
#if ! GTK_CHECK_VERSION(2, 18, 0)
# define compat_widget_set_flag(widget, flag, enable) \
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).