1
0
mirror of https://github.com/moparisthebest/FireTray synced 2024-11-17 22:35:02 -05:00

attempt to use gtk3

This commit is contained in:
foudfou 2014-02-07 11:36:07 +01:00
parent 20d137bd28
commit 769105c59b
3 changed files with 8 additions and 4 deletions

View File

@ -39,7 +39,7 @@
var EXPORTED_SYMBOLS = [ "gdk" ]; var EXPORTED_SYMBOLS = [ "gdk" ];
const GDK_LIBNAME = "gdk-x11-2.0"; const GDK_LIBNAME = "gdk-3";
const GDK_ABIS = [ 0 ]; const GDK_ABIS = [ 0 ];
const Cu = Components.utils; const Cu = Components.utils;

View File

@ -2,7 +2,7 @@
var EXPORTED_SYMBOLS = [ "gtk" ]; var EXPORTED_SYMBOLS = [ "gtk" ];
const GTK_LIBNAME = "gtk-x11-2.0"; const GTK_LIBNAME = "gtk-3";
const GTK_ABIS = [ 0 ]; const GTK_ABIS = [ 0 ];
const Cu = Components.utils; const Cu = Components.utils;
@ -17,8 +17,8 @@ Cu.import("resource://firetray/ctypes/linux/gobject.jsm");
Cu.import("resource://firetray/ctypes/linux/pango.jsm"); Cu.import("resource://firetray/ctypes/linux/pango.jsm");
function gtk_defines(lib) { function gtk_defines(lib) {
this.FIRETRAY_REQUIRED_GTK_MAJOR_VERSION = 2; this.FIRETRAY_REQUIRED_GTK_MAJOR_VERSION = 3;
this.FIRETRAY_REQUIRED_GTK_MINOR_VERSION = 20; this.FIRETRAY_REQUIRED_GTK_MINOR_VERSION = 0;
this.FIRETRAY_REQUIRED_GTK_MICRO_VERSION = 0; this.FIRETRAY_REQUIRED_GTK_MICRO_VERSION = 0;
this.GtkIconSize = ctypes.int; // enum this.GtkIconSize = ctypes.int; // enum

View File

@ -749,6 +749,10 @@ x11.init = function() {
this.current = {}; this.current = {};
try { 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(); let gdkDisplay = gdk.gdk_display_get_default();
this.current.Display = gdk.gdk_x11_display_get_xdisplay(gdkDisplay); this.current.Display = gdk.gdk_x11_display_get_xdisplay(gdkDisplay);
this.current.Atoms = {}; this.current.Atoms = {};