From 769105c59b94713674e09638fd5aaa0a27108883 Mon Sep 17 00:00:00 2001 From: foudfou Date: Fri, 7 Feb 2014 11:36:07 +0100 Subject: [PATCH] attempt to use gtk3 --- src/modules/ctypes/linux/gdk.jsm | 2 +- src/modules/ctypes/linux/gtk.jsm | 6 +++--- src/modules/linux/FiretrayWindow.jsm | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/ctypes/linux/gdk.jsm b/src/modules/ctypes/linux/gdk.jsm index ee11087..29d5736 100644 --- a/src/modules/ctypes/linux/gdk.jsm +++ b/src/modules/ctypes/linux/gdk.jsm @@ -39,7 +39,7 @@ var EXPORTED_SYMBOLS = [ "gdk" ]; -const GDK_LIBNAME = "gdk-x11-2.0"; +const GDK_LIBNAME = "gdk-3"; const GDK_ABIS = [ 0 ]; const Cu = Components.utils; diff --git a/src/modules/ctypes/linux/gtk.jsm b/src/modules/ctypes/linux/gtk.jsm index fc70953..51243a5 100644 --- a/src/modules/ctypes/linux/gtk.jsm +++ b/src/modules/ctypes/linux/gtk.jsm @@ -2,7 +2,7 @@ var EXPORTED_SYMBOLS = [ "gtk" ]; -const GTK_LIBNAME = "gtk-x11-2.0"; +const GTK_LIBNAME = "gtk-3"; const GTK_ABIS = [ 0 ]; const Cu = Components.utils; @@ -17,8 +17,8 @@ Cu.import("resource://firetray/ctypes/linux/gobject.jsm"); Cu.import("resource://firetray/ctypes/linux/pango.jsm"); function gtk_defines(lib) { - this.FIRETRAY_REQUIRED_GTK_MAJOR_VERSION = 2; - this.FIRETRAY_REQUIRED_GTK_MINOR_VERSION = 20; + this.FIRETRAY_REQUIRED_GTK_MAJOR_VERSION = 3; + this.FIRETRAY_REQUIRED_GTK_MINOR_VERSION = 0; this.FIRETRAY_REQUIRED_GTK_MICRO_VERSION = 0; this.GtkIconSize = ctypes.int; // enum diff --git a/src/modules/linux/FiretrayWindow.jsm b/src/modules/linux/FiretrayWindow.jsm index 9a6fed4..0520530 100644 --- a/src/modules/linux/FiretrayWindow.jsm +++ b/src/modules/linux/FiretrayWindow.jsm @@ -749,6 +749,10 @@ x11.init = function() { this.current = {}; try { +/* When using GTK3 (gdk.jsm, gtk.jsm) crashes with: +(firefox:8250): GLib-GObject-WARNING **: cannot register existing type `GdkDisplayManager' +0x00007fffd62a54b0 in gdk_display_manager_get_default_display () from /lib64/libgdk-3.so.0 +Not sure we can mix mozilla-gtk2 with firetray-gtk3... */ let gdkDisplay = gdk.gdk_display_get_default(); this.current.Display = gdk.gdk_x11_display_get_xdisplay(gdkDisplay); this.current.Atoms = {};