diff --git a/src/modules/ctypes/linux/glib.jsm b/src/modules/ctypes/linux/glib.jsm index a411d4a..e1d5d71 100644 --- a/src/modules/ctypes/linux/glib.jsm +++ b/src/modules/ctypes/linux/glib.jsm @@ -16,6 +16,8 @@ function glib_defines(lib) { /* mutual inclusion not possible */ this.GQuark = ctypes.uint32_t; // this.GQuark = gobject.guint32; this.GError = ctypes.StructType("GError"); + + lib.lazy_bind("g_strfreev", ctypes.void_t, ctypes.char.ptr.ptr); }; new ctypes_library(GLIB_LIBNAME, GLIB_ABIS, glib_defines, this); diff --git a/src/modules/ctypes/linux/gtk.jsm b/src/modules/ctypes/linux/gtk.jsm index fc70953..95c84b6 100644 --- a/src/modules/ctypes/linux/gtk.jsm +++ b/src/modules/ctypes/linux/gtk.jsm @@ -101,6 +101,7 @@ function gtk_defines(lib) { lib.lazy_bind("gtk_icon_theme_get_default", this.GtkIconTheme.ptr); lib.lazy_bind("gtk_icon_theme_get_for_screen", this.GtkIconTheme.ptr, gdk.GdkScreen.ptr); + lib.lazy_bind("gtk_icon_theme_get_search_path", ctypes.void_t, this.GtkIconTheme.ptr, gobject.gchar.ptr.ptr.array(), gobject.gint.ptr); lib.lazy_bind("gtk_icon_theme_append_search_path", ctypes.void_t, this.GtkIconTheme.ptr, gobject.gchar.ptr); lib.lazy_bind("gtk_icon_theme_prepend_search_path", ctypes.void_t, this.GtkIconTheme.ptr, gobject.gchar.ptr); lib.lazy_bind("gtk_icon_theme_choose_icon", this.GtkIconInfo.ptr, this.GtkIconTheme.ptr, gobject.gchar.ptr.array(), gobject.gint, this.GtkIconLookupFlags); diff --git a/src/modules/linux/FiretrayGtkIcons.jsm b/src/modules/linux/FiretrayGtkIcons.jsm index 6b9af1c..33fdec8 100644 --- a/src/modules/linux/FiretrayGtkIcons.jsm +++ b/src/modules/linux/FiretrayGtkIcons.jsm @@ -44,6 +44,23 @@ firetray.GtkIcons = { let gtkIconTheme = gtk.gtk_icon_theme_get_default(); log.debug("gtkIconTheme="+gtkIconTheme); gtk.gtk_icon_theme_append_search_path(gtkIconTheme, this.GTK_THEME_ICON_PATH); + + if (log.level <= firetray.Logging.LogMod.Level.Debug) { + Cu.import("resource://firetray/ctypes/linux/glib.jsm"); + Cu.import("resource://firetray/ctypes/linux/gobject.jsm"); + firetray.Handler.subscribeLibsForClosing([glib, gobject]); + let path = new gobject.gchar.ptr.ptr; + let n_elements = new gobject.gint; + gtk.gtk_icon_theme_get_search_path(gtkIconTheme, path.address(), n_elements.address()); + log.debug("n_elements="+n_elements+" path="+path); + let pathIt = path; + for (let i=0, len=n_elements.value; i