[gnome-applets/gnome-3-24] window-title: build this applet



commit e138d5f485095426ec86b64c010845c20fc3ba9e
Author: Gabriel Finkelstein <gabrielfinkelstein gmail com>
Date:   Sat Mar 25 16:54:29 2017 -0300

    window-title: build this applet
    
    - update for new libpanel-applet version
    - port GConf to GSettings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770795

 Makefile.am                                        |    2 +
 configure.ac                                       |    4 +
 po/POTFILES.skip                                   |    1 +
 window-title/Makefile.am                           |   92 +++--
 ...me.gnome-applets.window-title.gschema.xml.in.in |   79 ++++
 ...nome.panel.WindowTitleApplet.panel-applet.in.in |    5 +-
 window-title/pixmaps/Makefile.am                   |    3 +-
 window-title/pixmaps/Makefile.in                   |  408 --------------------
 window-title/preferences.c                         |  102 +++---
 window-title/windowtitle.c                         |  142 ++++----
 window-title/windowtitle.h                         |   51 ++--
 window-title/windowtitle.schemas.in                |  164 --------
 window-title/windowtitle.ui                        |   18 +-
 13 files changed, 301 insertions(+), 770 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ff8edb6..827145e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,7 @@ always_built_SUBDIRS =  \
        trash \
        window-buttons \
        windowpicker \
+       window-title \
        $(NULL)
 
 SUBDIRS = \
@@ -88,6 +89,7 @@ DIST_SUBDIRS = \
        invest-applet   \
        window-buttons  \
        windowpicker    \
+       window-title    \
        inhibit         \
        brightness      \
        tracker-search-bar \
diff --git a/configure.ac b/configure.ac
index 85f0df9..7c6cb0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -712,6 +712,9 @@ AC_CONFIG_FILES([
   windowpicker/Makefile
   windowpicker/data/Makefile
   windowpicker/src/Makefile
+
+  window-title/Makefile
+  window-title/pixmaps/Makefile
 ])
 
 AC_OUTPUT
@@ -757,6 +760,7 @@ echo "    tracker-search-bar ............: $have_tracker_search_bar"
 echo "    trash .........................: always"
 echo "    window-buttons ................: always"
 echo "    windowpicker ..................: always"
+echo "    window-title ..................: always"
 echo ""
 echo "  charpick"
 echo "    gucharmap support .............: $have_gucharmap"
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 98174ad..782d834 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -38,3 +38,4 @@ trash/data/org.gnome.applets.TrashApplet.panel-applet.in
 window-buttons/org.gnome.panel.WindowButtonsApplet.panel-applet.in
 window-buttons/org.gnome.gnome-applets.window-buttons.gschema.xml.in.in
 window-title/org.gnome.panel.WindowTitleApplet.panel-applet.in
+window-title/org.gnome.gnome-applets.window-title.gschema.xml.in.in
diff --git a/window-title/Makefile.am b/window-title/Makefile.am
old mode 100644
new mode 100755
index 8651e2c..2b9de6b
--- a/window-title/Makefile.am
+++ b/window-title/Makefile.am
@@ -1,74 +1,86 @@
-AM_CPPFLAGS = \
-       -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-       -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-       -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-       $(WINDOWTITLE_CFLAGS)
-
-AM_CFLAGS =\
-        -Wall\
-        -g
-
-libexec_PROGRAMS = windowtitle
-
-windowtitle_SOURCES = \
+APPLET_LOCATION = $(pkglibdir)/libwindow-title-applet.so
+
+window_title_applet_libdir = $(pkglibdir)
+window_title_applet_lib_LTLIBRARIES = libwindow-title-applet.la
+
+libwindow_title_applet_la_CPPFLAGS = \
+       -I. \
+       -I$(srcdir) \
+       -DGNOMELOCALEDIR=\""$(localedir)"\" \
+       -DGTK_BUILDERDIR=\""$(pkgdatadir)/builder"\" \
+       -DDATA_DIR=\""$(datadir)"\" \
+       $(NULL)
+
+libwindow_title_applet_la_CFLAGS = \
+       $(GNOME_APPLETS_CFLAGS) \
+       $(LIBWNCK_CFLAGS) \
+       $(WARN_CFLAGS) \
+       $(AM_CFLAGS) \
+       $(NULL)
+
+libwindow_title_applet_la_SOURCES = \
        windowtitle.c \
        windowtitle.h \
        preferences.c \
-       preferences.h
+       preferences.h \
+       $(NULL)
 
-windowtitle_LDFLAGS = \
-       -Wl,--export-dynamic
+libwindow_title_applet_la_LDFLAGS = \
+       -avoid-version \
+       $(WARN_LDFLAGS) \
+       $(AM_LDFLAGS) \
+       $(NULL)
 
-windowtitle_LDADD = $(WINDOWTITLE_LIBS)
+libwindow_title_applet_la_LIBADD = \
+       $(GNOME_APPLETS_LIBS) \
+       $(LIBWNCK_LIBS) \
+       $(LIBM) \
+       $(NULL)
 
 # The new applet files (D-Bus???)
-appletdir       = $(datadir)/gnome-panel/4.0/applets
+appletdir       = $(LIBPANEL_APPLET_DIR)
 applet_in_files = org.gnome.panel.WindowTitleApplet.panel-applet.in
 applet_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
 
 $(applet_in_files): $(applet_in_files).in Makefile
        $(AM_V_GEN)sed \
-           -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
                -e "s|\@DATADIR\@|$(datadir)|" \
+               -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
            -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
            $< > $@
 
 %.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
 
-# The new Service file (D-Bus)
-servicedir       = $(datadir)/dbus-1/services
-service_in_files = org.gnome.panel.applet.WindowTitleAppletFactory.service.in
-service_DATA     = $(service_in_files:.service.in=.service)
+gsettings_schemas_in_in = \
+       org.gnome.gnome-applets.window-title.gschema.xml.in.in
 
-org.gnome.panel.applet.WindowTitleAppletFactory.service: $(service_in_files)
-       $(AM_V_GEN)sed \
-           -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
-           $< > $@
+@INTLTOOL_XML_NOMERGE_RULE@
 
-# Schemas for GConf
-schemasdir       = @GCONF_SCHEMA_FILE_DIR@
-schemas_in_files = windowtitle.schemas.in
-schemas_DATA     = $(schemas_in_files:.schemas.in=.schemas)
+gsettings_schemas_in = $(gsettings_schemas_in_in:.xml.in.in=.xml.in)
+gsettings_SCHEMAS = $(gsettings_schemas_in:.xml.in=.xml)
 
-@INTLTOOL_SCHEMAS_RULE@
+%.gschema.xml.in: %.gschema.xml.in.in Makefile
+       $(AM_V_GEN)sed -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@
 
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-       GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule 
$(schemas_DATA) ;
-endif
+@GSETTINGS_RULES@
 
 # UI Builder file (Glade)
-builderdir = $(datadir)/windowtitle
+builderdir = $(pkgdatadir)/builder
 builder_DATA = windowtitle.ui
 
-CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) $(schemas_DATA)
+CLEANFILES = $(applet_DATA) $(applet_DATA).in \
+       $(gsettings_SCHEMAS_in) \
+       $(gsettings_SCHEMAS) \
+       *.gschema.valid
 
 EXTRA_DIST = \
+       $(gsettings_schemas_in_in) \
        org.gnome.panel.WindowTitleApplet.panel-applet.in.in \
-       $(service_in_files) \
        $(schemas_in_files) \
        $(builder_DATA)
-       
+
 
 SUBDIRS = \
        pixmaps
+
+-include $(top_srcdir)/git.mk
diff --git a/window-title/org.gnome.gnome-applets.window-title.gschema.xml.in.in 
b/window-title/org.gnome.gnome-applets.window-title.gschema.xml.in.in
new file mode 100755
index 0000000..a1192ac
--- /dev/null
+++ b/window-title/org.gnome.gnome-applets.window-title.gschema.xml.in.in
@@ -0,0 +1,79 @@
+<schemalist>
+  <schema id="org.gnome.gnome-applets.window-title">
+    <key name="hide-on-unmaximized" type="b">
+      <default>false</default>
+      <summary>Hides title when there are no windows present.</summary>
+      <description>When enabled, the title will disappear when there are no maximized (or active) windows on 
the screen.</description>
+    </key>
+    <key name="only-maximized" type="b">
+      <default>true</default>
+      <summary>Only control maximized windows.</summary>
+      <description>When enabled, the window title will always display the upper-most maximized window's 
name.</description>
+    </key>
+    <key name="alignment" type="d">
+      <default>0.5</default>
+      <summary>Set the title alignment.</summary>
+      <description>Legal values are between 0 and 1.</description>
+    </key>
+    <key name="swap-order" type="b">
+      <default>false</default>
+      <summary>Swap icon and title.</summary>
+      <description>When enabled, window title will be on the left side and the icon on the right 
side.</description>
+    </key>
+    <key name="expand-applet" type="b">
+      <default>true</default>
+      <summary>Expand the applet</summary>
+      <description>When enabled, the applet will use up all available space in the panel.</description>
+    </key>
+    <key name="hide-icon" type="b">
+      <default>false</default>
+      <summary>Hide the icon</summary>
+      <description>When enabled, the window icon will not be displayed.</description>
+    </key>
+    <key name="hide-title" type="b">
+      <default>false</default>
+      <summary>Hide the title</summary>
+      <description>When enabled, the window title will not be displayed.</description>
+    </key>
+    <key name="show-tooltips" type="b">
+      <default>false</default>
+      <summary>Show tooltips over title and icon</summary>
+      <description>When enabled, a tooltip carrying the name of the currently active window will be 
shown.</description>
+    </key>
+    <key name="title-size" type="i">
+      <default>16</default>
+      <summary>Minimal title size</summary>
+      <description>This size is used when the applet is not expanded or otherwise to determine the minimal 
size the title label can be shrunk to. The value represents the amount of pixels either in width or height, 
depending on the panel orientation.</description>
+    </key>
+    <key name="custom-style" type="b">
+      <default>false</default>
+      <summary>Use a custom style.</summary>
+      <description>When enabled, custom font style and color will be used. When disabled, system theme 
defaults will be used.</description>
+    </key>
+    <key name="show-window-menu" type="b">
+      <default>false</default>
+      <summary>Show the window action menu on right click.</summary>
+      <description>Will cause the window action menu to appear when the title is right-clicked. This 
experimental feature is still under development! Warning! In current feature state you will be unable to 
access the applet action menu via title-right click when this option is enabled! You may still do so by 
right-clicking the icon if it is not hidden.</description>
+    </key>
+    <key name="title-active-font" type="s">
+      <default>'Sans 10'</default>
+      <summary>Active title font.</summary>
+      <description>Font name and size for the active window state.</description>
+    </key>
+    <key name="title-inactive-font" type="s">
+      <default>'Sans 10'</default>
+      <summary>Inactive title font.</summary>
+      <description>Font name and size for the inactive window state.</description>
+    </key>
+    <key name="title-active-color-fg" type="s">
+      <default>'#000000'</default>
+      <summary>Active title foreground color.</summary>
+      <description>Title foreground color in hex format for the active window state.</description>
+    </key>
+    <key name="title-inactive-color-fg" type="s">
+      <default>'#808080'</default>
+      <summary>Inactive title foreground color.</summary>
+      <description>Title foreground color in hex format for the inactive window state.</description>
+    </key>
+  </schema>
+</schemalist>
diff --git a/window-title/org.gnome.panel.WindowTitleApplet.panel-applet.in.in 
b/window-title/org.gnome.panel.WindowTitleApplet.panel-applet.in.in
index e76e868..89ae268 100644
--- a/window-title/org.gnome.panel.WindowTitleApplet.panel-applet.in.in
+++ b/window-title/org.gnome.panel.WindowTitleApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
 [Applet Factory]
 Id=WindowTitleAppletFactory
-Location=@LIBEXECDIR@/windowtitle
+InProcess=true
+Location=@APPLET_LOCATION@
 _Name=Window Title applet Factory
 _Description=Factory for Window Title
 
@@ -12,4 +13,4 @@ BonoboId=OAFIID:WindowTitleApplet
 X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=gnome-window-applets
 X-GNOME-Bugzilla-Component=windowtitle
-X-GNOME-Bugzilla-Version=@VERSION@
+X-GNOME-Bugzilla-Version=@VERSION@
\ No newline at end of file
diff --git a/window-title/pixmaps/Makefile.am b/window-title/pixmaps/Makefile.am
index 7024328..1abd5e0 100644
--- a/window-title/pixmaps/Makefile.am
+++ b/window-title/pixmaps/Makefile.am
@@ -8,5 +8,4 @@ pixmapsdir = \
 EXTRA_DIST = \
        $(pixmaps_DATA)
 
-## File created by the gnome-build tools
-
+-include $(top_srcdir)/git.mk
diff --git a/window-title/preferences.c b/window-title/preferences.c
old mode 100644
new mode 100755
index cacbf03..5af9ee5
--- a/window-title/preferences.c
+++ b/window-title/preferences.c
@@ -11,12 +11,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
@@ -28,12 +28,11 @@
 void cb_only_maximized (GtkButton *, WTApplet *);
 void cb_click_effect (GtkButton *, WTApplet *);
 void cb_hide_on_unmaximized (GtkButton *, WTApplet *);
-const gchar *getCheckBoxGConfKey (gushort);
 void updateTitle(WTApplet *);
 void reloadWidgets(WTApplet *);
 void toggleHidden(WTApplet *);
 void toggleExpand(WTApplet *);
-void setAlignment(WTApplet *, gfloat);
+void setAlignment(WTApplet *, gdouble);
 void properties_close (GtkButton *, WTApplet *);
 void savePreferences(WTPreferences *, WTApplet *);
 WTPreferences *loadPreferences(WTApplet *);
@@ -41,21 +40,21 @@ gchar* getCfgValue(FILE *, gchar *);
 
 void savePreferences(WTPreferences *wtp, WTApplet *wtapplet) {
 #if PLAINTEXT_CONFIG == 0
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_ONLY_MAXIMIZED, wtp->only_maximized, NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_HIDE_ON_UNMAXIMIZED, wtp->hide_on_unmaximized, 
NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_HIDE_ICON, wtp->hide_icon, NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_HIDE_TITLE, wtp->hide_title, NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_SWAP_ORDER, wtp->swap_order, NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_EXPAND_APPLET, wtp->expand_applet, NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_CUSTOM_STYLE, wtp->custom_style, NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_SHOW_WINDOW_MENU, wtp->show_window_menu, NULL);
-       panel_applet_gconf_set_bool (wtapplet->applet, CFG_SHOW_TOOLTIPS, wtp->show_tooltips, NULL);
-       panel_applet_gconf_set_float (wtapplet->applet, CFG_ALIGNMENT, wtp->alignment, NULL);
-       panel_applet_gconf_set_int (wtapplet->applet, CFG_TITLE_SIZE, wtp->title_size, NULL);
-       panel_applet_gconf_set_string (wtapplet->applet, CFG_TITLE_ACTIVE_FONT, wtp->title_active_font, NULL);
-       panel_applet_gconf_set_string (wtapplet->applet, CFG_TITLE_ACTIVE_COLOR_FG, wtp->title_active_color, 
NULL);
-       panel_applet_gconf_set_string (wtapplet->applet, CFG_TITLE_INACTIVE_FONT, wtp->title_inactive_font, 
NULL);
-       panel_applet_gconf_set_string (wtapplet->applet, CFG_TITLE_INACTIVE_COLOR_FG, 
wtp->title_inactive_color, NULL);
+       g_settings_set_boolean (wtapplet->settings, CFG_ONLY_MAXIMIZED, wtp->only_maximized);
+       g_settings_set_boolean (wtapplet->settings, CFG_HIDE_ON_UNMAXIMIZED, wtp->hide_on_unmaximized);
+       g_settings_set_boolean (wtapplet->settings, CFG_HIDE_ICON, wtp->hide_icon);
+       g_settings_set_boolean (wtapplet->settings, CFG_HIDE_TITLE, wtp->hide_title);
+       g_settings_set_boolean (wtapplet->settings, CFG_SWAP_ORDER, wtp->swap_order);
+       g_settings_set_boolean (wtapplet->settings, CFG_EXPAND_APPLET, wtp->expand_applet);
+       g_settings_set_boolean (wtapplet->settings, CFG_CUSTOM_STYLE, wtp->custom_style);
+       g_settings_set_boolean (wtapplet->settings, CFG_SHOW_WINDOW_MENU, wtp->show_window_menu);
+       g_settings_set_boolean (wtapplet->settings, CFG_SHOW_TOOLTIPS, wtp->show_tooltips);
+       g_settings_set_double (wtapplet->settings, CFG_ALIGNMENT, wtp->alignment);
+       g_settings_set_int (wtapplet->settings, CFG_TITLE_SIZE, wtp->title_size);
+       g_settings_set_string (wtapplet->settings, CFG_TITLE_ACTIVE_FONT, wtp->title_active_font);
+       g_settings_set_string (wtapplet->settings, CFG_TITLE_ACTIVE_COLOR_FG, wtp->title_active_color);
+       g_settings_set_string (wtapplet->settings, CFG_TITLE_INACTIVE_FONT, wtp->title_inactive_font);
+       g_settings_set_string (wtapplet->settings, CFG_TITLE_INACTIVE_COLOR_FG, wtp->title_inactive_color);
 #else
        FILE *cfg = g_fopen (g_strconcat(g_get_home_dir(),"/",FILE_CONFIGFILE, NULL), "w");
 
@@ -84,21 +83,21 @@ WTPreferences *loadPreferences(WTApplet *wtapplet) {
        WTPreferences *wtp = g_new0(WTPreferences, 1);
 
 #if PLAINTEXT_CONFIG == 0
-       wtp->only_maximized = panel_applet_gconf_get_bool(wtapplet->applet, CFG_ONLY_MAXIMIZED, NULL);
-       wtp->hide_on_unmaximized = panel_applet_gconf_get_bool(wtapplet->applet, CFG_HIDE_ON_UNMAXIMIZED, 
NULL);
-       wtp->hide_icon = panel_applet_gconf_get_bool(wtapplet->applet, CFG_HIDE_ICON, NULL);
-       wtp->hide_title = panel_applet_gconf_get_bool(wtapplet->applet, CFG_HIDE_TITLE, NULL);
-       wtp->alignment = panel_applet_gconf_get_float(wtapplet->applet, CFG_ALIGNMENT, NULL);
-       wtp->swap_order = panel_applet_gconf_get_bool(wtapplet->applet, CFG_SWAP_ORDER, NULL);
-       wtp->expand_applet = panel_applet_gconf_get_bool(wtapplet->applet, CFG_EXPAND_APPLET, NULL);
-       wtp->custom_style = panel_applet_gconf_get_bool(wtapplet->applet, CFG_CUSTOM_STYLE, NULL);
-       wtp->show_window_menu = panel_applet_gconf_get_bool(wtapplet->applet, CFG_SHOW_WINDOW_MENU, NULL);
-       wtp->show_tooltips = panel_applet_gconf_get_bool(wtapplet->applet, CFG_SHOW_TOOLTIPS, NULL);
-       wtp->title_size = panel_applet_gconf_get_int(wtapplet->applet, CFG_TITLE_SIZE, NULL);
-       wtp->title_active_font = panel_applet_gconf_get_string(wtapplet->applet, CFG_TITLE_ACTIVE_FONT, NULL);
-       wtp->title_active_color = panel_applet_gconf_get_string(wtapplet->applet, CFG_TITLE_ACTIVE_COLOR_FG, 
NULL);
-       wtp->title_inactive_font = panel_applet_gconf_get_string(wtapplet->applet, CFG_TITLE_INACTIVE_FONT, 
NULL);;
-       wtp->title_inactive_color = panel_applet_gconf_get_string(wtapplet->applet, 
CFG_TITLE_INACTIVE_COLOR_FG, NULL);
+       wtp->only_maximized = g_settings_get_boolean(wtapplet->settings, CFG_ONLY_MAXIMIZED);
+       wtp->hide_on_unmaximized = g_settings_get_boolean(wtapplet->settings, CFG_HIDE_ON_UNMAXIMIZED);
+       wtp->hide_icon = g_settings_get_boolean(wtapplet->settings, CFG_HIDE_ICON);
+       wtp->hide_title = g_settings_get_boolean(wtapplet->settings, CFG_HIDE_TITLE);
+       wtp->alignment = g_settings_get_double(wtapplet->settings, CFG_ALIGNMENT);
+       wtp->swap_order = g_settings_get_boolean(wtapplet->settings, CFG_SWAP_ORDER);
+       wtp->expand_applet = g_settings_get_boolean(wtapplet->settings, CFG_EXPAND_APPLET);
+       wtp->custom_style = g_settings_get_boolean(wtapplet->settings, CFG_CUSTOM_STYLE);
+       wtp->show_window_menu = g_settings_get_boolean(wtapplet->settings, CFG_SHOW_WINDOW_MENU);
+       wtp->show_tooltips = g_settings_get_boolean(wtapplet->settings, CFG_SHOW_TOOLTIPS);
+       wtp->title_size = g_settings_get_int(wtapplet->settings, CFG_TITLE_SIZE);
+       wtp->title_active_font = g_settings_get_string(wtapplet->settings, CFG_TITLE_ACTIVE_FONT);
+       wtp->title_active_color = g_settings_get_string(wtapplet->settings, CFG_TITLE_ACTIVE_COLOR_FG);
+       wtp->title_inactive_font = g_settings_get_string(wtapplet->settings, CFG_TITLE_INACTIVE_FONT);;
+       wtp->title_inactive_color = g_settings_get_string(wtapplet->settings, CFG_TITLE_INACTIVE_COLOR_FG);
 #else
        FILE *cfg = g_fopen (g_strconcat(g_get_home_dir(),"/",FILE_CONFIGFILE,NULL),"r");
 
@@ -118,11 +117,11 @@ WTPreferences *loadPreferences(WTApplet *wtapplet) {
                wtp->title_active_color = getCfgValue(cfg,CFG_TITLE_ACTIVE_COLOR_FG);
                wtp->title_inactive_font = getCfgValue(cfg,CFG_TITLE_INACTIVE_FONT);
                wtp->title_inactive_color = getCfgValue(cfg,CFG_TITLE_INACTIVE_COLOR_FG);
-               
-               fclose (cfg);           
+
+               fclose (cfg);
        } else {
                // Defaults if the file doesn't exist
-               
+
                wtp->only_maximized = TRUE;
                wtp->hide_on_unmaximized = FALSE;
                wtp->hide_icon = FALSE;
@@ -152,7 +151,7 @@ WTPreferences *loadPreferences(WTApplet *wtapplet) {
 gchar* getCfgValue(FILE *f, gchar *key) {
     gchar tmp[256] = {0x0};
        long int pos = ftell(f);
-       
+
     while (f!=NULL && fgets(tmp,sizeof(tmp),f)!=NULL) {
                if (g_strrstr(tmp, key))
                    break;
@@ -225,13 +224,13 @@ static void cb_alignment_changed(GtkRange *range, WTApplet *wtapplet)
 {
        wtapplet->prefs->alignment = gtk_range_get_value(range);
        savePreferences(wtapplet->prefs, wtapplet);
-       setAlignment(wtapplet, (gfloat)wtapplet->prefs->alignment);
+       setAlignment(wtapplet, (gdouble)wtapplet->prefs->alignment);
 }
 
 static void cb_font_active_set(GtkFontButton *widget, WTApplet *wtapplet)
 {
        //we need to copy the new font string, because we lose the pointer after prefs close
-       wtapplet->prefs->title_active_font = g_strdup(gtk_font_button_get_font_name(widget));           
+       wtapplet->prefs->title_active_font = g_strdup(gtk_font_button_get_font_name(widget));
        savePreferences(wtapplet->prefs, wtapplet);
        updateTitle(wtapplet);
 }
@@ -239,7 +238,7 @@ static void cb_font_active_set(GtkFontButton *widget, WTApplet *wtapplet)
 static void cb_font_inactive_set(GtkFontButton *widget, WTApplet *wtapplet)
 {
        //we need to copy the new font string, because we lose the pointer after prefs close
-       wtapplet->prefs->title_inactive_font = g_strdup(gtk_font_button_get_font_name(widget));         
+       wtapplet->prefs->title_inactive_font = g_strdup(gtk_font_button_get_font_name(widget));
        savePreferences(wtapplet->prefs, wtapplet);
        updateTitle(wtapplet);
 }
@@ -249,7 +248,7 @@ static void cb_color_active_fg_set(GtkColorButton *widget, WTApplet *wtapplet)
        GdkColor color;
 
        gtk_color_button_get_color(widget, &color);
-       wtapplet->prefs->title_active_color = gdk_color_to_string(&color);      
+       wtapplet->prefs->title_active_color = gdk_color_to_string(&color);
        savePreferences(wtapplet->prefs, wtapplet);
        updateTitle(wtapplet);
 }
@@ -260,16 +259,19 @@ static void cb_color_inactive_fg_set(GtkColorButton *widget, gpointer user_data)
        GdkColor color;
 
        gtk_color_button_get_color(widget, &color);
-       wtapplet->prefs->title_inactive_color = gdk_color_to_string(&color);    
+       wtapplet->prefs->title_inactive_color = gdk_color_to_string(&color);
        savePreferences(wtapplet->prefs, wtapplet);
        updateTitle(wtapplet);
 }
 
 
 /* The Preferences Dialog */
-void properties_cb (GtkAction *action, WTApplet *wtapplet) {
+void properties_cb (GSimpleAction *action, GVariant *parameter, gpointer user_data) {
+       WTApplet *wtapplet;
        GdkColor btn_color_color;
-       
+
+       wtapplet = (WTApplet *) user_data;
+
        // Create the Properties dialog from the GtkBuilder file
        if(wtapplet->window_prefs) {
                gtk_window_present(GTK_WINDOW(wtapplet->window_prefs));
@@ -279,7 +281,7 @@ void properties_cb (GtkAction *action, WTApplet *wtapplet) {
        }
        //gtk_builder_connect_signals (wtapplet->prefbuilder, NULL); // no need for now
 
-       GtkToggleButton 
+       GtkToggleButton
                *chkb_only_maximized = GTK_TOGGLE_BUTTON (gtk_builder_get_object(wtapplet->prefbuilder, 
CFG_ONLY_MAXIMIZED)),
                *chkb_hide_on_unmaximized = GTK_TOGGLE_BUTTON (gtk_builder_get_object(wtapplet->prefbuilder, 
CFG_HIDE_ON_UNMAXIMIZED)),
                *chkb_hide_icon = GTK_TOGGLE_BUTTON (gtk_builder_get_object(wtapplet->prefbuilder, 
CFG_HIDE_ICON)),
@@ -296,12 +298,12 @@ void properties_cb (GtkAction *action, WTApplet *wtapplet) {
        GtkFontButton *btn_font_inactive = GTK_FONT_BUTTON (gtk_builder_get_object(wtapplet->prefbuilder, 
"btn_font_inactive"));
        GtkButton *btn_close = GTK_BUTTON (gtk_builder_get_object(wtapplet->prefbuilder, "btn_close"));
        GtkTable *table_custom_style = GTK_TABLE(gtk_builder_get_object(wtapplet->prefbuilder, 
"table_custom_style"));
-       
+
        // set widgets according to preferences
        gtk_toggle_button_set_active (chkb_only_maximized, wtapplet->prefs->only_maximized);
        gtk_toggle_button_set_active (chkb_hide_on_unmaximized, wtapplet->prefs->hide_on_unmaximized);
        gtk_toggle_button_set_active (chkb_hide_icon, wtapplet->prefs->hide_icon);
-       gtk_toggle_button_set_active (chkb_hide_title, wtapplet->prefs->hide_title);    
+       gtk_toggle_button_set_active (chkb_hide_title, wtapplet->prefs->hide_title);
        gtk_toggle_button_set_active (chkb_swap_order, wtapplet->prefs->swap_order);
        gtk_toggle_button_set_active (chkb_expand_applet, wtapplet->prefs->expand_applet);
        gtk_toggle_button_set_active (chkb_custom_style, wtapplet->prefs->custom_style);
@@ -315,7 +317,7 @@ void properties_cb (GtkAction *action, WTApplet *wtapplet) {
        gtk_font_button_set_font_name(btn_font_active, wtapplet->prefs->title_active_font);
        gtk_font_button_set_font_name(btn_font_inactive, wtapplet->prefs->title_inactive_font);
        gtk_widget_set_sensitive(GTK_WIDGET(table_custom_style), gtk_toggle_button_get_active 
(GTK_TOGGLE_BUTTON(chkb_custom_style)));
-       
+
        g_signal_connect(G_OBJECT(chkb_only_maximized), "clicked", G_CALLBACK (cb_only_maximized), wtapplet);
        g_signal_connect(G_OBJECT(chkb_hide_on_unmaximized), "clicked", G_CALLBACK (cb_hide_on_unmaximized), 
wtapplet);
        g_signal_connect(G_OBJECT(chkb_hide_icon), "clicked", G_CALLBACK (cb_hide_icon), wtapplet);
@@ -332,7 +334,7 @@ void properties_cb (GtkAction *action, WTApplet *wtapplet) {
        g_signal_connect(G_OBJECT(btn_font_inactive), "font-set", G_CALLBACK(cb_font_inactive_set), wtapplet);
        g_signal_connect(G_OBJECT(btn_close), "clicked", G_CALLBACK (properties_close), wtapplet);
        g_signal_connect(G_OBJECT(wtapplet->window_prefs), "destroy", G_CALLBACK(properties_close), wtapplet);
-       
+
        gtk_widget_show_all (wtapplet->window_prefs);
 }
 
diff --git a/window-title/windowtitle.c b/window-title/windowtitle.c
old mode 100644
new mode 100755
index e4c84bb..3375888
--- a/window-title/windowtitle.c
+++ b/window-title/windowtitle.c
@@ -1,17 +1,17 @@
 /*
  * main.c
  * Copyright (C) Andrej Belcijan 2009 <andrej.{@}.gmail.dot.com>
- * 
+ *
  * main.c is free software: you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
  * Free Software Foundation, either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * main.c is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -30,31 +30,38 @@ static void umaxed_window_nameicon_changed (WnckWindow *, WTApplet *);
 static void viewports_changed (WnckScreen *, WTApplet *);
 static void window_closed (WnckScreen *, WnckWindow *, WTApplet *);
 static void window_opened (WnckScreen *, WnckWindow *, WTApplet *);
-//static void about_cb (BonoboUIComponent *, WTApplet *);
-static void about_cb (GtkAction *, WTApplet *);
+static void about_cb ( GSimpleAction *, GVariant *, gpointer );
 static WnckWindow *getRootWindow (WnckScreen *);
 static WnckWindow *getUpperMaximized (WTApplet *);
-const gchar *getCheckBoxGConfKey (gushort);
+//const gchar *getCheckBoxGConfKey (gushort);
 //void properties_cb (BonoboUIComponent *, WTApplet *, const char *);
-void properties_cb (GtkAction *, WTApplet *);
-void setAlignment(WTApplet *, gfloat);
+void properties_cb ( GSimpleAction *, GVariant *, gpointer );
+void setAlignment(WTApplet *, gdouble);
 void placeWidgets (WTApplet *);
 void reloadWidgets (WTApplet *);
 void toggleHidden(WTApplet *);
 void savePreferences(WTPreferences *, WTApplet *);
 WTPreferences *loadPreferences(WTApplet *);
-gchar *getButtonLayoutGConf(WTApplet *, gboolean);
+//gchar *getButtonLayoutGConf(WTApplet *, gboolean);
 
 G_DEFINE_TYPE (WTApplet, wt_applet, PANEL_TYPE_APPLET);
 
-static GtkActionEntry windowtitle_menu_actions [] = {
-        { "WTPreferences", GTK_STOCK_PROPERTIES, N_("_Properties"), NULL, NULL, G_CALLBACK (properties_cb) },
-        { "WTAbout", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK (about_cb) }
+static GActionEntry windowtitle_menu_actions [] = {
+       { "preferences", properties_cb,  NULL, NULL, NULL },
+       { "about",       about_cb, NULL, NULL, NULL }
 };
 
 static const gchar windowtitle_menu_items [] =
-       "<menuitem name=\"Preferences\" action=\"WTPreferences\" />"
-       "<menuitem name=\"About\"               action=\"WTAbout\" />";
+       "<section>"
+               "<item>"
+                       "<attribute name=\"label\">Preferences</attribute>"
+                       "<attribute name=\"action\">windowtitle.preferences</attribute>"
+               "</item>"
+               "<item>"
+                       "<attribute name=\"label\">About</attribute>"
+                       "<attribute name=\"action\">windowtitle.about</attribute>"
+               "</item>"
+       "</section>";
 
 WTApplet* wt_applet_new (void) {
         return g_object_new (WT_TYPE_APPLET, NULL);
@@ -70,7 +77,7 @@ static void wt_applet_init(WTApplet *wtapplet) {
 
 /* The About dialog */
 //static void about_cb (BonoboUIComponent *uic, WTApplet *wtapplet) {
-static void about_cb (GtkAction *action, WTApplet *wtapplet) {
+static void about_cb (GSimpleAction *action, GVariant *parameter, gpointer user_data) {
         static const gchar *authors [] = {
                "Andrej Belcijan <{andrejx}at{gmail.com}>",
                " ",
@@ -83,7 +90,7 @@ static void about_cb (GtkAction *action, WTApplet *wtapplet) {
                "Nasser Alshammari <{designernasser}at{gmail.com}>",
                NULL
        };
-       
+
        const gchar *documenters[] = {
         "Andrej Belcijan <{andrejx}at{gmail.com}>",
                NULL
@@ -96,7 +103,7 @@ static void about_cb (GtkAction *action, WTApplet *wtapplet) {
                "comments",     N_("Window title for your GNOME Panel."),
                "copyright",    "\xC2\xA9 2011 Andrej Belcijan",
                "authors",      authors,
-           "artists",  artists,            
+           "artists",  artists,
                "documenters",  documenters,
                "translator-credits",   ("translator-credits"),
                "logo",         logo,
@@ -115,10 +122,10 @@ static WnckWindow *getRootWindow (WnckScreen *screen) {
 }
 
 /* Returns the highest maximized window */
-static WnckWindow *getUpperMaximized (WTApplet *wtapplet) {    
+static WnckWindow *getUpperMaximized (WTApplet *wtapplet) {
        if (!wtapplet->prefs->only_maximized)
                return wtapplet->activewindow;
-       
+
        GList *windows = wnck_screen_get_windows_stacked(wtapplet->activescreen);
        WnckWindow *returnwindow = NULL;
 
@@ -131,7 +138,7 @@ static WnckWindow *getUpperMaximized (WTApplet *wtapplet) {
                }
                windows = windows->next;
        }
-        
+
        // start tracking the new umaxed window
        if (wtapplet->umaxedwindow) {
                if (g_signal_handler_is_connected(G_OBJECT(wtapplet->umaxedwindow), 
wtapplet->umaxed_handler_state))
@@ -139,7 +146,7 @@ static WnckWindow *getUpperMaximized (WTApplet *wtapplet) {
                if (g_signal_handler_is_connected(G_OBJECT(wtapplet->umaxedwindow), 
wtapplet->umaxed_handler_name))
                        g_signal_handler_disconnect(G_OBJECT(wtapplet->umaxedwindow), 
wtapplet->umaxed_handler_name);
                if (g_signal_handler_is_connected(G_OBJECT(wtapplet->umaxedwindow), 
wtapplet->umaxed_handler_icon))
-                       g_signal_handler_disconnect(G_OBJECT(wtapplet->umaxedwindow), 
wtapplet->umaxed_handler_icon); 
+                       g_signal_handler_disconnect(G_OBJECT(wtapplet->umaxedwindow), 
wtapplet->umaxed_handler_icon);
        }
        if (returnwindow) {
                // maxed window was found
@@ -150,11 +157,11 @@ static WnckWindow *getUpperMaximized (WTApplet *wtapplet) {
                wtapplet->umaxed_handler_name = g_signal_connect(G_OBJECT(returnwindow),
                                                             "name-changed",
                                                             G_CALLBACK (umaxed_window_nameicon_changed),
-                                                            wtapplet);         
+                                                            wtapplet);
                wtapplet->umaxed_handler_icon = g_signal_connect(G_OBJECT(returnwindow),
                                                             "icon-changed",
                                                             G_CALLBACK (umaxed_window_nameicon_changed),
-                                                            wtapplet); 
+                                                            wtapplet);
                //return returnwindow;
        } else {
                // maxed window was not found
@@ -170,7 +177,7 @@ void updateTitle(WTApplet *wtapplet) {
        WnckWindow *controlledwindow;
        gchar *title_text, *title_color, *title_font;
        GdkPixbuf *icon_pixbuf;
-       
+
        if (wtapplet->prefs->only_maximized) {
                controlledwindow = wtapplet->umaxedwindow;
        } else {
@@ -179,7 +186,7 @@ void updateTitle(WTApplet *wtapplet) {
 
        if (controlledwindow == NULL)
                return;
-       
+
        if (controlledwindow == wtapplet->rootwindow) {
                // we're on desktop
                if (wtapplet->prefs->hide_on_unmaximized) {
@@ -195,7 +202,7 @@ void updateTitle(WTApplet *wtapplet) {
                icon_pixbuf = wnck_window_get_icon(controlledwindow); // This only returns a pointer - it 
SHOULDN'T be unrefed!
                title_text = (gchar*)wnck_window_get_name(controlledwindow);
        }
-       
+
        // TODO: we need the default font to somehow be the same in both modes
        if (wtapplet->prefs->custom_style) {
                // custom style
@@ -206,19 +213,19 @@ void updateTitle(WTApplet *wtapplet) {
                } else {
                        // window unfocused
                        title_color = wtapplet->prefs->title_inactive_color;
-                       title_font = wtapplet->prefs->title_inactive_font;      
+                       title_font = wtapplet->prefs->title_inactive_font;
                }
        } else {
                // automatic (non-custom) style
                if (controlledwindow == wtapplet->activewindow) {
-                       // window focused                               
+                       // window focused
                        title_color = wtapplet->panel_color_fg;
                        title_font = "";
                } else {
                        // window unfocused
                        title_color = "#808080"; // inactive title color. best fits for any panel regardless 
of color
                        title_font = "";
-               }               
+               }
        }
 
        // Set tooltips
@@ -242,12 +249,12 @@ void updateTitle(WTApplet *wtapplet) {
                g_object_unref(ipb1);   // Unref ipb1 to get it cleared from memory (we still need ipb2)
 
                // Saturate icon when window is not focused
-               if (controlledwindow != wtapplet->activewindow) 
+               if (controlledwindow != wtapplet->activewindow)
                        gdk_pixbuf_saturate_and_pixelate(ipb2, ipb2, 0, FALSE);
-               
+
                // Apply pixbuf to icon widget
                gtk_image_set_from_pixbuf(wtapplet->icon, ipb2);
-               g_object_unref(ipb2);   // Unref ipb2 to get it cleared from memory                     
+               g_object_unref(ipb2);   // Unref ipb2 to get it cleared from memory
        }
 }
 
@@ -261,7 +268,7 @@ void toggleExpand(WTApplet *wtapplet) {
                panel_applet_set_flags (wtapplet->applet, PANEL_APPLET_EXPAND_MINOR);
        }
        reloadWidgets(wtapplet);
-       setAlignment(wtapplet, (gfloat)wtapplet->prefs->alignment);
+       setAlignment(wtapplet, (gdouble)wtapplet->prefs->alignment);
 }
 
 /* Hide/unhide stuff according to preferences */
@@ -271,7 +278,7 @@ void toggleHidden (WTApplet *wtapplet) {
        } else {
                gtk_widget_show (GTK_WIDGET(wtapplet->icon));
        }
-       
+
        if (wtapplet->prefs->hide_title) {
                gtk_widget_hide (GTK_WIDGET(wtapplet->title));
        } else {
@@ -294,7 +301,7 @@ static void applet_change_background (PanelApplet           *applet,
                                                                         WTApplet                       
*wtapplet)
 {
        if (wtapplet->panel_color_fg)
-               g_free(wtapplet->panel_color_fg);       
+               g_free(wtapplet->panel_color_fg);
 
        // Look up the default text color in the theme, use a default if it's not defined
        // This way is deprecated
@@ -357,10 +364,10 @@ static void applet_title_size_request (GtkWidget *widget,
        gint size_max = MAX(requisition->width, wtapplet->asize);
 
        //g_printf("New size: %d\n", new_size);
-       
+
        wtapplet->size_hints[0] = size_min;
        wtapplet->size_hints[1] = wtapplet->asize - 1;
-       panel_applet_set_size_hints (PANEL_APPLET(wtapplet), wtapplet->size_hints, 2, 0);       
+       panel_applet_set_size_hints (PANEL_APPLET(wtapplet), wtapplet->size_hints, 2, 0);
        // This is the only way to go, but it cannot work because of gnome-panel bugs:
        // * https://bugzilla.gnome.org/show_bug.cgi?id=556355
        // * https://bugzilla.gnome.org/show_bug.cgi?id=557232
@@ -381,7 +388,7 @@ static void applet_size_allocate (GtkWidget     *widget,
                                   WTApplet             *wtapplet)
 {
        if (wtapplet->prefs->expand_applet) return;
-       
+
        if (wtapplet->asize != allocation->width) {
                wtapplet->asize = allocation->width;
        }
@@ -423,16 +430,16 @@ static void active_window_changed (WnckScreen *screen,
                if (g_signal_handler_is_connected(G_OBJECT(wtapplet->activewindow), 
wtapplet->active_handler_icon))
                        g_signal_handler_disconnect(G_OBJECT(wtapplet->activewindow), 
wtapplet->active_handler_icon);
        }
-       
+
        wtapplet->activewindow = wnck_screen_get_active_window(screen);
        wtapplet->umaxedwindow = getUpperMaximized(wtapplet); // returns wbapplet->activewindow if not 
only_maximized
        wtapplet->rootwindow = getRootWindow(wtapplet->activescreen);
-       
+
        if (wtapplet->activewindow) {
                wtapplet->active_handler_state = g_signal_connect(G_OBJECT (wtapplet->activewindow), 
"state-changed", G_CALLBACK (active_window_state_changed), wtapplet);
                wtapplet->active_handler_name = g_signal_connect(G_OBJECT (wtapplet->activewindow), 
"name-changed", G_CALLBACK (active_window_nameicon_changed), wtapplet);
                wtapplet->active_handler_icon = g_signal_connect(G_OBJECT (wtapplet->activewindow), 
"icon-changed", G_CALLBACK (active_window_nameicon_changed), wtapplet);
-                                                                                  
+
                wtapplet->focused = TRUE;
 
                updateTitle(wtapplet);
@@ -455,7 +462,7 @@ static void active_window_state_changed (WnckWindow *window,
                                wtapplet->focused = FALSE;
                }
        }
-       
+
        updateTitle(wtapplet);
 }
 
@@ -472,7 +479,7 @@ static void umaxed_window_state_changed (WnckWindow *window,
 {
        wtapplet->umaxedwindow = getUpperMaximized(wtapplet);
        wtapplet->rootwindow = getRootWindow(wtapplet->activescreen);
-       
+
        updateTitle(wtapplet);
 }
 
@@ -514,7 +521,7 @@ static gboolean icon_clicked (GtkWidget *icon,
                               WTApplet *wtapplet)
 {
        if (event->button != 1) return FALSE;
-       
+
        WnckWindow *controlledwindow;
 
        if (wtapplet->prefs->only_maximized) {
@@ -531,7 +538,7 @@ static gboolean icon_clicked (GtkWidget *icon,
        // double click:
        if (event->type == GDK_2BUTTON_PRESS) {
                wnck_window_close(controlledwindow, gtk_get_current_event_time());
-       }               
+       }
 
        return TRUE;
 }
@@ -542,7 +549,7 @@ static gboolean title_clicked (GtkWidget *title,
 {
        // only allow left and right mouse button
        //if (event->button != 1 && event->button != 3) return FALSE;
-       
+
        WnckWindow *controlledwindow;
 
        if (wtapplet->prefs->only_maximized) {
@@ -551,9 +558,9 @@ static gboolean title_clicked (GtkWidget *title,
                controlledwindow = wtapplet->activewindow;
        }
 
-       if (!controlledwindow) 
+       if (!controlledwindow)
                return FALSE;
-       
+
        // single click (left/right)
        if (event->button == 1) {
                // left-click
@@ -600,7 +607,7 @@ void placeWidgets (WTApplet *wtapplet) {
        } else {
                wtapplet->packtype = GTK_PACK_START;
        }
-       
+
        // set box orientation
        if (wtapplet->angle == GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE || wtapplet->angle == 
GDK_PIXBUF_ROTATE_CLOCKWISE) {
                gtk_orientable_set_orientation(GTK_ORIENTABLE(wtapplet->box), GTK_ORIENTATION_VERTICAL);
@@ -619,7 +626,7 @@ void placeWidgets (WTApplet *wtapplet) {
 
        // Set alignment/orientation
        gtk_label_set_angle( wtapplet->title, wtapplet->angle );
-       setAlignment(wtapplet, (gfloat)wtapplet->prefs->alignment);
+       setAlignment(wtapplet, (gdouble)wtapplet->prefs->alignment);
 }
 
 /* Reloads all widgets */
@@ -634,10 +641,10 @@ void reloadWidgets (WTApplet *wtapplet) {
 }
 
 /* Sets alignment, min size, padding to title according to panel orientation */
-void setAlignment (WTApplet *wtapplet, gfloat alignment) {
+void setAlignment (WTApplet *wtapplet, gdouble alignment) {
        if (!wtapplet->prefs->expand_applet)
                alignment = 0.0;
-       
+
        if (wtapplet->angle == GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE || wtapplet->angle == 
GDK_PIXBUF_ROTATE_CLOCKWISE) {
                // Alignment is vertical
                if (wtapplet->angle == GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE) {
@@ -660,6 +667,7 @@ static void init_wtapplet (PanelApplet *applet) {
        WTApplet *wtapplet = g_new0 (WTApplet, 1);
 
        wtapplet->applet = applet;
+       wtapplet->settings = panel_applet_settings_new (applet, WINDOWTITLE_GSCHEMA);
        wtapplet->prefs = loadPreferences(wtapplet);
        wtapplet->activescreen = wnck_screen_get_default();
        wnck_screen_force_update(wtapplet->activescreen);
@@ -685,7 +693,7 @@ static void init_wtapplet (PanelApplet *applet) {
        gtk_event_box_set_visible_window (wtapplet->eb_title, FALSE);
 
        // Rotate & place elements
-       setAlignment(wtapplet, (gfloat)wtapplet->prefs->alignment);
+       setAlignment(wtapplet, (gdouble)wtapplet->prefs->alignment);
        placeWidgets(wtapplet);
 
        // Add box to applet
@@ -694,7 +702,7 @@ static void init_wtapplet (PanelApplet *applet) {
        // Set event handling (icon & title clicks)
        g_signal_connect(G_OBJECT (wtapplet->eb_icon), "button-press-event", G_CALLBACK (icon_clicked), 
wtapplet);
        g_signal_connect(G_OBJECT (wtapplet->eb_title), "button-press-event", G_CALLBACK (title_clicked), 
wtapplet);
-       
+
        // Global window tracking
        g_signal_connect(wtapplet->activescreen, "active-window-changed", G_CALLBACK (active_window_changed), 
wtapplet); // <-- this thing is crashing with compiz !!!
        g_signal_connect(wtapplet->activescreen, "viewports-changed", G_CALLBACK (viewports_changed), 
wtapplet);
@@ -708,23 +716,22 @@ static void init_wtapplet (PanelApplet *applet) {
        g_signal_connect(G_OBJECT (wtapplet->applet), "change-background", G_CALLBACK 
(applet_change_background), wtapplet);
        g_signal_connect(G_OBJECT (wtapplet->applet), "change-orient", G_CALLBACK (applet_change_orient), 
wtapplet);
        g_signal_connect(G_OBJECT (wtapplet->applet), "change-size", G_CALLBACK (applet_change_pixel_size), 
wtapplet);
-       
+
        // Track active window changes
-       wtapplet->active_handler_state = 
+       wtapplet->active_handler_state =
                g_signal_connect(G_OBJECT (wtapplet->activewindow), "state-changed", G_CALLBACK 
(active_window_state_changed), wtapplet);
-       wtapplet->active_handler_name = 
+       wtapplet->active_handler_name =
                g_signal_connect(G_OBJECT (wtapplet->activewindow), "name-changed", G_CALLBACK 
(active_window_nameicon_changed), wtapplet);
-       wtapplet->active_handler_icon = 
+       wtapplet->active_handler_icon =
                g_signal_connect(G_OBJECT (wtapplet->activewindow), "icon-changed", G_CALLBACK 
(active_window_nameicon_changed), wtapplet);
 
-       
+
        // Setup applet right-click menu
-       GtkActionGroup *action_group = gtk_action_group_new ("WindowButtons Applet Actions");
-       gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
-       gtk_action_group_add_actions (action_group, windowtitle_menu_actions, G_N_ELEMENTS 
(windowtitle_menu_actions), wtapplet);
-       panel_applet_setup_menu (applet, windowtitle_menu_items, action_group);
-       panel_applet_set_background_widget (wtapplet->applet, GTK_WIDGET (wtapplet->applet)); // Automatic 
background update
-       
+       GSimpleActionGroup *action_group = g_simple_action_group_new ();
+       g_action_map_add_action_entries (G_ACTION_MAP (action_group), windowtitle_menu_actions, G_N_ELEMENTS 
(windowtitle_menu_actions), wtapplet);
+       panel_applet_setup_menu (applet, windowtitle_menu_items, action_group, GETTEXT_PACKAGE);
+       gtk_widget_insert_action_group (GTK_WIDGET (wtapplet->applet), "windowtitle", G_ACTION_GROUP 
(action_group));
+
        toggleExpand  (wtapplet);
        toggleHidden  (wtapplet);       // Properly hide or show stuff
        updateTitle   (wtapplet);
@@ -733,9 +740,8 @@ static void init_wtapplet (PanelApplet *applet) {
 // Initial function that draws the applet
 static gboolean windowtitle_applet_factory (PanelApplet *applet, const gchar *iid, gpointer data) {
        if (strcmp (iid, APPLET_OAFIID) != 0) return FALSE;
-       
+
        g_set_application_name (APPLET_NAME); //GLib-WARNING **: g_set_application_name() called multiple 
times
-       panel_applet_add_preferences (applet, GCONF_PREFS, NULL);
        wnck_set_client_type (WNCK_CLIENT_TYPE_PAGER);
 
        init_wtapplet (applet);
@@ -743,7 +749,7 @@ static gboolean windowtitle_applet_factory (PanelApplet *applet, const gchar *ii
        return TRUE;
 }
 
-PANEL_APPLET_OUT_PROCESS_FACTORY (APPLET_OAFIID_FACTORY,
+PANEL_APPLET_IN_PROCESS_FACTORY (APPLET_OAFIID_FACTORY,
                                   PANEL_TYPE_APPLET,
                                   (PanelAppletFactoryCallback) windowtitle_applet_factory,
                                   NULL)
diff --git a/window-title/windowtitle.h b/window-title/windowtitle.h
old mode 100644
new mode 100755
index 5ae927b..67df4ac
--- a/window-title/windowtitle.h
+++ b/window-title/windowtitle.h
@@ -11,12 +11,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
@@ -34,9 +34,7 @@
 #include <glib.h>
 #include <glib-object.h>
 #include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
 #include <panel-applet.h>
-#include <panel-applet-gconf.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
@@ -54,31 +52,29 @@
 #define APPLET_NAME                                            "Window Title"
 #define APPLET_OAFIID                                  "WindowTitleApplet"
 #define APPLET_OAFIID_FACTORY                  "WindowTitleAppletFactory"
-#define PATH_MAIN                                              "/usr/share"
-#define PATH_BUILDER                                   "/usr/share/gnome-applets/builder"
-#define PATH_UI_PREFS                                  PATH_MAIN"/windowtitle/windowtitle.ui"
-#define PATH_LOGO                                              PATH_MAIN"/pixmaps/windowtitle-applet.png"
+#define PATH_UI_PREFS                                  GTK_BUILDERDIR"/windowtitle.ui"
+#define PATH_LOGO                                              DATA_DIR"/pixmaps/windowtitle-applet.png"
 #define FILE_CONFIGFILE                                        ".windowtitle"
-#define GCONF_PREFS                                    "/schemas/apps/windowtitle-applet/prefs"
 #define ICON_WIDTH                                             16
 #define ICON_HEIGHT                                            16
 #define ICON_PADDING                                   5
 
+#define WINDOWTITLE_GSCHEMA                            "org.gnome.gnome-applets.window-title"
 #define CFG_ALIGNMENT                                  "alignment"
-#define CFG_SWAP_ORDER                                 "swap_order"
-#define CFG_EXPAND_APPLET                              "expand_applet"
-#define CFG_HIDE_ICON                                  "hide_icon"
-#define CFG_HIDE_TITLE                                 "hide_title"
-#define CFG_CUSTOM_STYLE                               "custom_style"
-#define CFG_TITLE_SIZE                                 "title_size"
-#define CFG_ONLY_MAXIMIZED                             "only_maximized"
-#define CFG_HIDE_ON_UNMAXIMIZED                "hide_on_unmaximized"
-#define CFG_SHOW_WINDOW_MENU                   "show_window_menu"
-#define CFG_SHOW_TOOLTIPS                              "show_tooltips"
-#define CFG_TITLE_ACTIVE_FONT                  "title_active_font"
-#define CFG_TITLE_ACTIVE_COLOR_FG              "title_active_color_fg"
-#define CFG_TITLE_INACTIVE_FONT                        "title_inactive_font"
-#define CFG_TITLE_INACTIVE_COLOR_FG            "title_inactive_color_fg"
+#define CFG_SWAP_ORDER                                 "swap-order"
+#define CFG_EXPAND_APPLET                              "expand-applet"
+#define CFG_HIDE_ICON                                  "hide-icon"
+#define CFG_HIDE_TITLE                                 "hide-title"
+#define CFG_CUSTOM_STYLE                               "custom-style"
+#define CFG_TITLE_SIZE                                 "title-size"
+#define CFG_ONLY_MAXIMIZED                             "only-maximized"
+#define CFG_HIDE_ON_UNMAXIMIZED                "hide-on-unmaximized"
+#define CFG_SHOW_WINDOW_MENU                   "show-window-menu"
+#define CFG_SHOW_TOOLTIPS                              "show-tooltips"
+#define CFG_TITLE_ACTIVE_FONT                  "title-active-font"
+#define CFG_TITLE_ACTIVE_COLOR_FG              "title-active-color-fg"
+#define CFG_TITLE_INACTIVE_FONT                        "title-inactive-font"
+#define CFG_TITLE_INACTIVE_COLOR_FG            "title-inactive-color-fg"
 
 G_BEGIN_DECLS
 
@@ -111,6 +107,7 @@ typedef struct {
 /* WBApplet definition (inherits from PanelApplet) */
 typedef struct {
     PanelApplet                *applet;                                // The actual PanelApplet
+       GSettings *settings;
 
        /* Widgets */
        GtkBox          *box;                                   // Main container widget
@@ -118,9 +115,9 @@ typedef struct {
        GtkImage                *icon;                                  // Icon image widget
        GtkLabel                *title;                                 // Title label widget
        GtkWidget               *window_prefs;                  // Preferences window
-       
+
        /* Variables */
-       WTPreferences   *prefs;                                 // Main properties 
+       WTPreferences   *prefs;                                 // Main properties
        WnckScreen              *activescreen;                  // Active screen
        WnckWorkspace   *activeworkspace;               // Active workspace
        WnckWindow              *umaxedwindow,                  // Upper-most maximized window
@@ -134,14 +131,14 @@ typedef struct {
                                        umaxed_handler_icon;    // umaxedwindow's iconchange event handler ID
        gboolean                focused;                                // [T/F] Window state (focused or 
unfocused)
        gchar                   *panel_color_fg;                // Foreground color determined by the panel
-       
+
        GdkPixbufRotation       angle;                          // Applet angle
        PanelAppletOrient       orient;                         // Panel orientation
        gint                            size;                           // Panel size
        gint                            asize;                          // Applet allocation size
        gint                            *size_hints;            // Applet size hints
        GtkPackType                     packtype;                       // Packaging direction of buttons
-       
+
        /* GtkBuilder */
        GtkBuilder              *prefbuilder;                   // Glade GtkBuilder for the preferences
 } WTApplet;
diff --git a/window-title/windowtitle.ui b/window-title/windowtitle.ui
index 8d6b35d..6a1da90 100644
--- a/window-title/windowtitle.ui
+++ b/window-title/windowtitle.ui
@@ -79,7 +79,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <child>
-                                  <object class="GtkCheckButton" id="swap_order">
+                                  <object class="GtkCheckButton" id="swap-order">
                                     <property name="label" translatable="yes">Swap icon/title 
_order</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
@@ -95,7 +95,7 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkCheckButton" id="expand_applet">
+                                  <object class="GtkCheckButton" id="expand-applet">
                                     <property name="label" translatable="yes">Expand applet</property>
                                     <property name="visible">True</property>
                                     <property name="sensitive">False</property>
@@ -149,7 +149,7 @@ You may change it using gconf-editor, but then you also need to set a fixed size
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <child>
-                                  <object class="GtkCheckButton" id="hide_icon">
+                                  <object class="GtkCheckButton" id="hide-icon">
                                     <property name="label" translatable="yes">Hide _icon</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
@@ -202,7 +202,7 @@ You may change it using gconf-editor, but then you also need to set a fixed size
                                 <property name="can_focus">False</property>
                                 <property name="spacing">5</property>
                                 <child>
-                                  <object class="GtkCheckButton" id="hide_title">
+                                  <object class="GtkCheckButton" id="hide-title">
                                     <property name="label" translatable="yes">Hide title</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
@@ -269,7 +269,7 @@ Note: only has effect when "Expand applet" is active.</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkCheckButton" id="custom_style">
+                                  <object class="GtkCheckButton" id="custom-style">
                                     <property name="label" translatable="yes">Custom _style</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
@@ -458,7 +458,7 @@ Note: only has effect when "Expand applet" is active.</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">5</property>
                     <child>
-                      <object class="GtkCheckButton" id="only_maximized">
+                      <object class="GtkCheckButton" id="only-maximized">
                         <property name="label" translatable="yes">Control _maximized windows only</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -474,7 +474,7 @@ Note: only has effect when "Expand applet" is active.</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="hide_on_unmaximized">
+                      <object class="GtkCheckButton" id="hide-on-unmaximized">
                         <property name="label" translatable="yes">_Hide when no active maximized 
windows</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -490,7 +490,7 @@ Note: only has effect when "Expand applet" is active.</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="show_window_menu">
+                      <object class="GtkCheckButton" id="show-window-menu">
                         <property name="label" translatable="yes">Show window _action menu on 
right-click</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
@@ -508,7 +508,7 @@ Warning! In current feature state you will be unable to access the applet action
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="show_tooltips">
+                      <object class="GtkCheckButton" id="show-tooltips">
                         <property name="label" translatable="yes">Show _tooltips</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]