[Xfce4-commits] <libxfcegui4:master> Drop libxfce4kbd-private and various fixes.

Nick Schermer noreply at xfce.org
Sun Oct 17 14:56:01 CEST 2010


Updating branch refs/heads/master
         to 8453f556735f8a896062947751549f5ad245b555 (commit)
       from 3c717ad39310c53517fa362c9fc0e9c660454504 (commit)

commit 8453f556735f8a896062947751549f5ad245b555
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Oct 17 14:54:28 2010 +0200

    Drop libxfce4kbd-private and various fixes.
    
    Drop the libxfce4kbd-private library, since we depend
    on the version in 4ui.
    
    Fix a lot of compilation problems and cleanup some code.

 Makefile.am                                       |    1 -
 autogen.sh                                        |    2 +-
 configure.in.in                                   |  118 +----
 glade/Makefile.am                                 |    1 +
 glade/glade-xfce4.c                               |   13 +
 glade/libglade-xfce4.c                            |    2 +-
 libxfce4kbd-private/Makefile.am                   |   71 --
 libxfce4kbd-private/libxfce4kbd-private-1.0.pc.in |   11 -
 libxfce4kbd-private/xfce-shortcut-dialog.c        |  513 ---------------
 libxfce4kbd-private/xfce-shortcut-dialog.h        |   53 --
 libxfce4kbd-private/xfce-shortcuts-grabber.c      |  706 ---------------------
 libxfce4kbd-private/xfce-shortcuts-grabber.h      |   66 --
 libxfce4kbd-private/xfce-shortcuts-provider.c     |  676 --------------------
 libxfce4kbd-private/xfce-shortcuts-provider.h     |   87 ---
 libxfce4kbd-private/xfce-shortcuts.c              |  137 ----
 libxfce4kbd-private/xfce-shortcuts.h              |   34 -
 libxfce4kbd-private/xfce4-keyboard-shortcuts.xml  |   67 --
 libxfcegui4/Makefile.am                           |   21 +-
 libxfcegui4/dialogs.c                             |   16 +-
 libxfcegui4/dialogs.h                             |    2 +-
 libxfcegui4/gtk_style.c                           |    1 +
 libxfcegui4/gtktoxevent.h                         |    2 +-
 libxfcegui4/icons.c                               |    2 +-
 libxfcegui4/icons.h                               |    2 +-
 libxfcegui4/libxfcegui4.h                         |    2 +-
 libxfcegui4/netk-pager.c                          |   10 +-
 libxfcegui4/netk-screen.c                         |   18 +-
 libxfcegui4/netk-tasklist.c                       |   10 +-
 libxfcegui4/netk-trayicon.h                       |    2 +-
 libxfcegui4/netk-xutils.c                         |    5 +-
 libxfcegui4/preview_filesel.c                     |   42 +-
 libxfcegui4/preview_filesel.h                     |    2 +-
 libxfcegui4/xfce-appmenuitem.c                    |    4 +-
 libxfcegui4/xfce-appmenuitem.h                    |   12 +-
 libxfcegui4/xfce-colorbutton.c                    |    2 +-
 libxfcegui4/xfce-colorbutton.h                    |    4 +-
 libxfcegui4/xfce-exec.c                           |   15 +-
 libxfcegui4/xfce-filechooser.c                    |    2 +-
 libxfcegui4/xfce-filechooser.h                    |    4 +-
 libxfcegui4/xfce-heading.c                        |    2 -
 libxfcegui4/xfce-icontheme.c                      |   34 +-
 libxfcegui4/xfce-icontheme.h                      |    4 +-
 libxfcegui4/xfce-startup-notification.c           |    4 +-
 libxfcegui4/xfce-titled-dialog.c                  |    2 -
 libxfcegui4/xfce_aboutdialog.c                    |    2 -
 libxfcegui4/xfce_clock.c                          |  637 +++++++++----------
 libxfcegui4/xfce_clock.h                          |   45 +-
 libxfcegui4/xfce_decorbutton.c                    |   49 +--
 libxfcegui4/xfce_decorbutton.h                    |    2 +-
 libxfcegui4/xfce_decortoggle.c                    |   52 +--
 libxfcegui4/xfce_decortoggle.h                    |    2 +-
 libxfcegui4/xfce_framebox.c                       |   43 +--
 libxfcegui4/xfce_framebox.h                       |    2 +-
 libxfcegui4/xfce_iconbutton.c                     |   38 +--
 libxfcegui4/xfce_menubutton.c                     |   53 +--
 libxfcegui4/xfce_movehandler.c                    |   49 +--
 libxfcegui4/xfce_scaled_image.c                   |   42 +--
 libxfcegui4/xfce_systemtray.c                     |   36 +-
 libxfcegui4/xfce_systemtray.h                     |    2 +-
 libxfcegui4/xfce_togglebutton.c                   |   48 +--
 libxfcegui4/xinerama.h                            |    2 +-
 61 files changed, 457 insertions(+), 3431 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 757247a..e0f8297 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,6 @@
 SUBDIRS =								\
 	icons								\
 	libxfcegui4							\
-	libxfce4kbd-private						\
 	docs								\
 	po								\
 	glade
diff --git a/autogen.sh b/autogen.sh
index c4e0651..45a2720 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,4 +18,4 @@ EOF
   exit 1
 }
 
-XDT_AUTOGEN_REQUIRED_VERSION="4.7.0" exec xdt-autogen $@
+XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@
diff --git a/configure.in.in b/configure.in.in
index 983ff87..6c3c805 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -8,10 +8,9 @@ dnl ***************************
 dnl *** Version information ***
 dnl ***************************
 m4_define([libxfcegui4_verinfo], [7:0:3])
-m4_define([libxfce4kbd_private_verinfo], [5:0:0])
 m4_define([libxfcegui4_version_major], [4])
-m4_define([libxfcegui4_version_minor], [6])
-m4_define([libxfcegui4_version_micro], [1])
+m4_define([libxfcegui4_version_minor], [7])
+m4_define([libxfcegui4_version_micro], [0])
 m4_define([libxfcegui4_version_nano], [])   dnl leave this empty to have no nano version
 m4_define([libxfcegui4_version_build], [@REVISION@])
 m4_define([libxfcegui4_version_tag], [git])
@@ -23,14 +22,14 @@ dnl # YOU ARE DOING.
 
 
 dnl *******************************************
-dnl *** Debugging support for SVN snapshots ***
+dnl *** Debugging support for GIT snapshots ***
 dnl *******************************************
 m4_define([libxfcegui4_debug_default], [ifelse(libxfcegui4_version_tag(), [git], [yes], [minimum])])
 
 dnl ***************************
 dnl *** Initialize autoconf ***
 dnl ***************************
-AC_COPYRIGHT([Copyright (c) 2002-2009
+AC_COPYRIGHT([Copyright (c) 2002-2010
         The Xfce development team. All rights reserved.])
 AC_INIT([libxfcegui4], [libxfcegui4_version], [xfce4-dev at xfce.org])
 AC_PREREQ([2.50])
@@ -43,6 +42,7 @@ LIBXFCEGUI4_VERSION=libxfcegui4_version()
 AM_INIT_AUTOMAKE([libxfcegui4], [$LIBXFCEGUI4_VERSION])
 AM_CONFIG_HEADER([config.h])
 AM_MAINTAINER_MODE
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 dnl *******************************************
 dnl *** Libtool versioning from libxfcegui4 ***
@@ -50,12 +50,6 @@ dnl *******************************************
 LIBXFCEGUI4_VERINFO=libxfcegui4_verinfo()
 AC_SUBST([LIBXFCEGUI4_VERINFO])
 
-dnl ***************************************************
-dnl *** Libtool versioning from libxfce4kbd-private ***
-dnl ***************************************************
-LIBXFCE4KBD_PRIVATE_VERINFO=libxfce4kbd_private_verinfo()
-AC_SUBST([LIBXFCE4KBD_PRIVATE_VERINFO])
-
 dnl *********************************
 dnl *** Subst libxfcegui4 version ***
 dnl *********************************
@@ -87,7 +81,8 @@ dnl *** Check for standard headers and functions ***
 dnl ************************************************
 AC_STDC_HEADERS()
 AC_CHECK_HEADERS([fcntl.h limits.h stdarg.h stddef.h time.h varargs.h])
-AC_CHECK_FUNCS([setsid])
+AC_CHECK_FUNCS([setsid _NSGetEnviron])
+AC_CHECK_DECLS([environ])
 
 dnl ******************************
 dnl *** Check for i18n support ***
@@ -106,18 +101,6 @@ dnl ***********************************
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])
 
-dnl **************************************************
-dnl *** Check whether to build the keyboard libary ***
-dnl **************************************************
-AC_ARG_ENABLE([keyboard-library],
-              [AC_HELP_STRING([--disable-keyboard-library],
-                              [Do not compile the keyboard library needed by xfwm4 and xfce4-settings (default=enabled)])],
-              [enable_keyboard_library=$enableval], [enable_keyboard_library=yes])
-if test "x$enable_keyboard_library" = "xyes"; then
-  XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
-fi
-AM_CONDITIONAL([ENABLE_KEYBOARD_LIBRARY], [test "x$enable_keyboard_library" = "xyes"])
-
 dnl ***********************************
 dnl *** Check for optional packages ***
 dnl ***********************************
@@ -190,93 +173,12 @@ GTK_DOC_CHECK([1.0])
 dnl ***********************************
 dnl *** Check for debugging support ***
 dnl ***********************************
-AC_ARG_ENABLE([debug],
-AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=libxfcegui4_debug_default@:>@]),
-  [], [enable_debug=libxfcegui4_debug_default])
-AC_MSG_CHECKING([whether to enable debugging support])
-if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
-  dnl Check whether the compiler accepts the -errwarn=%all
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -errwarn=%all"
-  AC_MSG_CHECKING([whether $CC accepts -errwarn=%all])
-  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
-    AC_MSG_RESULT([yes])
-    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -errwarn=%all"
-  ], [
-    AC_MSG_RESULT([no])
-  ])
-  CFLAGS="$save_CFLAGS"
-
-  dnl Check whether the compiler accepts the -Werror
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -Werror"
-  AC_MSG_CHECKING([whether $CC accepts -Werror])
-  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
-    AC_MSG_RESULT([yes])
-    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Werror"
-  ], [
-    AC_MSG_RESULT([no])
-  ])
-  CFLAGS="$save_CFLAGS"
-
-  dnl Check whether the compiler accepts the -Wall
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -Wall"
-  AC_MSG_CHECKING([whether $CC accepts -Wall])
-  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
-    AC_MSG_RESULT([yes])
-    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall"
-  ], [
-    AC_MSG_RESULT([no])
-  ])
-  CFLAGS="$save_CFLAGS"
-
-  dnl Check whether the compiler accepts the -fno-strict-aliasing
-  dnl switch, as certain packages - like Glib - still don't work
-  dnl properly with newer compilers.
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -fno-strict-aliasing"
-  AC_MSG_CHECKING([whether $CC accepts -fno-strict-aliasing])
-  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
-    AC_MSG_RESULT([yes])
-    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -fno-strict-aliasing"
-  ], [
-    AC_MSG_RESULT([no])
-  ])
-  CFLAGS="$save_CFLAGS"
-
-  dnl Make sure we detect possible errors
-  PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Werror -Wall"
-
-  dnl Paranoia for --enable-debug=full
-  if test x"$enable_debug" = x"full"; then
-    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
-    PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"
-  fi
-else
-  dnl Disable object cast checks
-  PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"
-
-  dnl Disable all checks for --enable-debug=no
-  if test x"$enable_debug" = x"no"; then
-    PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
-  fi
-fi
-AC_MSG_RESULT([$enable_debug])
+XDT_FEATURE_DEBUG([libxfcegui4_debug_default])
 
 dnl **************************************
 dnl *** Check for linker optimizations ***
 dnl **************************************
-AC_MSG_CHECKING([whether $LD accepts -O1])
-case `$LD -O1 -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
-  AC_MSG_RESULT([yes])
-  ;;
-*)
-  AC_MSG_RESULT([no])
-  ;;
-esac
+XDT_FEATURE_LINKER_OPTS()
 
 dnl *********************************
 dnl *** Substitute platform flags ***
@@ -301,8 +203,6 @@ glade/22x22/Makefile
 icons/Makefile
 icons/48x48/Makefile
 icons/scalable/Makefile
-libxfce4kbd-private/libxfce4kbd-private-1.0.pc
-libxfce4kbd-private/Makefile
 libxfcegui4.spec
 libxfcegui4/libxfcegui4-1.0.pc
 libxfcegui4/libxfcegui4-config.h
diff --git a/glade/Makefile.am b/glade/Makefile.am
index 491c4a2..2471413 100644
--- a/glade/Makefile.am
+++ b/glade/Makefile.am
@@ -3,6 +3,7 @@ SUBDIRS = \
 	22x22
 
 INCLUDES = \
+	-DLIBXFCEGUI4_COMPILATION				\
 	$(PLATFORM_CPPFLAGS)
 
 if HAVE_GLADEUI
diff --git a/glade/glade-xfce4.c b/glade/glade-xfce4.c
index 514a291..82e8e37 100644
--- a/glade/glade-xfce4.c
+++ b/glade/glade-xfce4.c
@@ -31,6 +31,19 @@
 #include <gtk/gtk.h>
 
 #include <gladeui/glade.h>
+void
+glade_xfce_titled_dialog_post_create(GladeWidgetAdaptor *adaptor,
+                                     GObject *object, 
+                                     GladeCreateReason reason);
+GtkWidget *
+glade_xfce_titled_dialog_get_internal_child(GladeWidgetAdaptor *adaptor,
+                                            GtkDialog *dialog,
+                                            const gchar *name);
+GList *
+glade_xfce_titled_dialog_get_children(GladeWidgetAdaptor *adaptor,
+                                      GtkDialog *dialog);
+
+
 
 void
 glade_xfce_titled_dialog_post_create(GladeWidgetAdaptor *adaptor,
diff --git a/glade/libglade-xfce4.c b/glade/libglade-xfce4.c
index 598bbaa..77ca958 100644
--- a/glade/libglade-xfce4.c
+++ b/glade/libglade-xfce4.c
@@ -81,7 +81,7 @@ titled_dialog_find_internal_child(GladeXML *xml,
 }
 
 G_MODULE_EXPORT void
-glade_module_register_widgets()
+glade_module_register_widgets(void)
 {
     glade_register_widget(XFCE_TYPE_APP_MENU_ITEM, NULL, NULL, NULL);
     glade_register_widget(XFCE_TYPE_HEADING, NULL, NULL, NULL);
diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
deleted file mode 100644
index f9a1d5e..0000000
--- a/libxfce4kbd-private/Makefile.am
+++ /dev/null
@@ -1,71 +0,0 @@
-# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
-
-if ENABLE_KEYBOARD_LIBRARY
-
-INCLUDES =								\
-	-I$(top_builddir)						\
-	-I$(top_srcdir)							\
-	-DDATADIR=\"$(datadir)\"					\
-	-DG_LOG_DOMAIN=\"libxfce4kbd-private\"				\
-	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
-	-DPREFIX=\"$(prefix)\"						\
-	$(PLATFORM_CPPFLAGS)
-
-lib_LTLIBRARIES = 							\
-	libxfce4kbd-private.la
-
-shortcuts_headers =							\
-	xfce-shortcuts-provider.h					\
-	xfce-shortcuts-grabber.h					\
-	xfce-shortcut-dialog.h						\
-	xfce-shortcuts.h
-
-libxfce4kbd_privateincludedir = 					\
-	$(includedir)/xfce4/libxfce4kbd-private
-
-libxfce4kbd_privateinclude_HEADERS =					\
-	$(shortcuts_headers)
-
-libxfce4kbd_private_la_SOURCES =					\
-	xfce-shortcuts-provider.c					\
-	xfce-shortcuts-grabber.c					\
-	xfce-shortcut-dialog.c						\
-	xfce-shortcuts.c
-
-libxfce4kbd_private_la_CFLAGS = 					\
-	$(PLATFORM_CFLAGS)						\
-	$(GLIB_CFLAGS)							\
-	$(GTK_CFLAGS)							\
-	$(LIBX11_CFLAGS)						\
-	$(LIBXFCE4UTIL_CFLAGS)						\
-	$(XFCONF_CFLAGS)
-
-libxfce4kbd_private_la_LDFLAGS =					\
-	-export-dynamic							\
-	-version-info $(LIBXFCE4KBD_PRIVATE_VERINFO)			\
-	-export-symbols-regex "^[^_].*"					\
-	-no-undefined							\
-	$(LIBX11_LDFLAGS)
-
-libxfce4kbd_private_la_LIBADD =						\
-	$(top_builddir)/libxfcegui4/libxfcegui4.la			\
-	$(PLATFORM_LDFLAGS)						\
-	$(GLIB_LIBS)							\
-	$(GTK_LIBS)							\
-	$(LIBX11_LIBS)							\
-	$(LIBXFCE4UTIL_LIBS)						\
-	$(XFCONF_LIBS)
-
-settingsdir = $(sysconfdir)/xdg/xfce4/xfconf/xfce-perchannel-xml
-settings_DATA = xfce4-keyboard-shortcuts.xml
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libxfce4kbd-private-1.0.pc
-
-EXTRA_DIST = \
-	$(settings_DATA)
-
-# required for gtk-doc
-dist-hook: all
-
-endif # ENABLE_KEYBOARD_LIBRARY
diff --git a/libxfce4kbd-private/libxfce4kbd-private-1.0.pc.in b/libxfce4kbd-private/libxfce4kbd-private-1.0.pc.in
deleted file mode 100644
index 491a2f3..0000000
--- a/libxfce4kbd-private/libxfce4kbd-private-1.0.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libxfce4kbd-private
-Description: libxfce4kbd-private
-Requires: gdk-2.0 gtk+-2.0 libxfce4util-1.0 libxfconf-0
-Version: @VERSION@
-Libs: @LIBX11_LDFLAGS@ -L${libdir} -lxfce4kbd-private
-Cflags: @LIBX11_CFLAGS@ -I${includedir}/xfce4
diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c b/libxfce4kbd-private/xfce-shortcut-dialog.c
deleted file mode 100644
index cb20918..0000000
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ /dev/null
@@ -1,513 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gdk/gdkkeysyms.h>
-
-#include <gtk/gtk.h>
-
-#include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
-
-#include "xfce-shortcuts.h"
-#include "xfce-shortcut-dialog.h"
-
-
-
-static void     xfce_shortcut_dialog_class_init       (XfceShortcutDialogClass *klass);
-static void     xfce_shortcut_dialog_init             (XfceShortcutDialog      *dialog);
-static void     xfce_shortcut_dialog_dispose          (GObject                 *object);
-static void     xfce_shortcut_dialog_finalize         (GObject                 *object);
-static void     xfce_shortcut_dialog_create_contents  (XfceShortcutDialog      *dialog,
-                                                       const gchar             *provider,
-                                                       const gchar             *action_name,
-                                                       const gchar             *action);
-static gboolean xfce_shortcut_dialog_key_pressed      (XfceShortcutDialog      *dialog,
-                                                       GdkEventKey             *event);
-static gboolean xfce_shortcut_dialog_key_released     (XfceShortcutDialog      *dialog,
-                                                       GdkEventKey             *event);
-static gchar   *xfce_shortcut_dialog_shortcut_name    (XfceShortcutDialog      *dialog,
-                                                       guint                    keyval,
-                                                       guint                    modifiers);
-
-
-
-struct _XfceShortcutDialogClass
-{
-  XfceTitledDialogClass __parent__;
-
-  gboolean (*validate_shortcut) (XfceShortcutDialog *dialog,
-                                 const gchar        *shortcut,
-                                 gpointer            user_data);
-
-  gint validate_shortcut_signal;
-};
-
-struct _XfceShortcutDialog
-{
-  XfceTitledDialog __parent__;
-
-  GtkWidget *shortcut_label;
-
-  gchar     *action_name;
-  gchar     *action;
-  gchar     *shortcut;
-};
-
-
-
-static GObjectClass *xfce_shortcut_dialog_parent_class = NULL;
-
-
-
-GType
-xfce_shortcut_dialog_get_type (void)
-{
-  static GType type = G_TYPE_INVALID;
-
-  if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-      static const GTypeInfo info = 
-        {
-          sizeof (XfceShortcutDialogClass),
-          NULL,
-          NULL,
-          (GClassInitFunc) xfce_shortcut_dialog_class_init,
-          NULL,
-          NULL,
-          sizeof (XfceShortcutDialog),
-          0,
-          (GInstanceInitFunc) xfce_shortcut_dialog_init,
-          NULL,
-        };
-
-      type = g_type_register_static (XFCE_TYPE_TITLED_DIALOG, "XfceShortcutDialog", &info, 0);
-    }
-  
-  return type;
-}
-
-
-
-/**
- * Taken from GTK+ (_gtk_marshal_BOOLEAN__SRING). Credits go out to the
- * GTK+ devs for this.
- */
-void
-marshal_BOOLEAN__STRING (GClosure     *closure,
-                         GValue       *return_value G_GNUC_UNUSED,
-                         guint         n_param_values,
-                         const GValue *param_values,
-                         gpointer      invocation_hint G_GNUC_UNUSED,
-                         gpointer      marshal_data)
-{
-  typedef gboolean (*GMarshalFunc_BOOLEAN__STRING) (gpointer data1,
-                                                    gpointer arg_1,
-                                                    gpointer data2);
-  register GMarshalFunc_BOOLEAN__STRING callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gboolean v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-
-  callback = (GMarshalFunc_BOOLEAN__STRING) (marshal_data ? marshal_data : cc->callback);
-
-  #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
-  v_return = callback (data1, g_marshal_value_peek_string (param_values + 1), data2);
-
-  g_value_set_boolean (return_value, v_return);
-}
-
-
-
-
-static void
-xfce_shortcut_dialog_class_init (XfceShortcutDialogClass *klass)
-{
-  GObjectClass *gobject_class;
-
-  /* Make sure to use the translations from libxfcegui4 */
-  xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
-
-  /* Determine parent type class */
-  xfce_shortcut_dialog_parent_class = g_type_class_peek_parent (klass);
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->dispose = xfce_shortcut_dialog_dispose;
-  gobject_class->finalize = xfce_shortcut_dialog_finalize;
-
-  klass->validate_shortcut = NULL; 
-
-  /* Create 'validate-shortcut' signal */
-  klass->validate_shortcut_signal = g_signal_new ("validate-shortcut",
-                                                  G_TYPE_FROM_CLASS (klass),
-                                                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                                                  G_STRUCT_OFFSET (XfceShortcutDialogClass, validate_shortcut),
-                                                  NULL,
-                                                  NULL,
-                                                  marshal_BOOLEAN__STRING,
-                                                  G_TYPE_BOOLEAN,
-                                                  1,
-                                                  G_TYPE_STRING);
-}
-
-
-
-static void
-xfce_shortcut_dialog_init (XfceShortcutDialog *dialog)
-{
-  dialog->shortcut = NULL;
-}
-
-
-
-static void
-xfce_shortcut_dialog_dispose (GObject *object)
-{
-  (*G_OBJECT_CLASS (xfce_shortcut_dialog_parent_class)->dispose) (object);
-}
-
-
-
-static void
-xfce_shortcut_dialog_finalize (GObject *object)
-{
-  XfceShortcutDialog *dialog = XFCE_SHORTCUT_DIALOG (object);
-
-  g_free (dialog->action_name);
-  g_free (dialog->action);
-  g_free (dialog->shortcut);
-
-  (*G_OBJECT_CLASS (xfce_shortcut_dialog_parent_class)->finalize) (object);
-}
-
-
-
-GtkWidget*
-xfce_shortcut_dialog_new (const gchar *provider,
-                          const gchar *action_name,
-                          const gchar *action)
-{
-  XfceShortcutDialog *dialog;
-  
-  dialog = g_object_new (XFCE_TYPE_SHORTCUT_DIALOG, NULL);
-  dialog->action_name = g_strdup (action_name);
-  dialog->action = g_strdup (action);
-
-  xfce_shortcut_dialog_create_contents (dialog, provider, action_name, action);
-
-  return GTK_WIDGET (dialog);
-}
-
-
-
-static void
-xfce_shortcut_dialog_create_contents (XfceShortcutDialog *dialog,
-                                      const gchar        *provider,
-                                      const gchar        *action_name,
-                                      const gchar        *action)
-{
-  GtkWidget   *button;
-  GtkWidget   *table;
-  GtkWidget   *label;
-  const gchar *title;
-  const gchar *action_label;
-
-  if (g_utf8_collate (provider, "xfwm4") == 0)
-    {
-      title = _("Window Manager Action Shortcut");
-      action_label = _("Action:");
-    }
-  else if (g_utf8_collate (provider, "commands") == 0)
-    {
-      title = _("Command Shortcut");
-      action_label = _("Command:");
-    }
-  else
-    {
-      title = _("Shortcut");
-      action_label = _("Action:");
-    }
-
-  /* Set dialog title */
-  gtk_window_set_title (GTK_WINDOW (dialog), title);
-  gtk_window_set_icon_name (GTK_WINDOW (dialog), "input-keyboard");
-
-  /* Configure dialog */
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-
-  /* Create clear button for xfwm4 */
-  if (g_utf8_collate (provider, "xfwm4") == 0)
-    {
-      button = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
-      gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_REJECT);
-      gtk_widget_show (button);
-    }
-
-  /* Create cancel button */
-  button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
-  gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL);
-  gtk_widget_show (button);
-
-  table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table);
-  gtk_widget_show (table);
-
-  label = gtk_label_new (action_label);
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  label = gtk_label_new (action_name);
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 0, 1);
-  gtk_widget_show (label);
-
-  label = gtk_label_new (_("Shortcut:"));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
-  gtk_widget_show (label);
-
-  dialog->shortcut_label = gtk_label_new (NULL);
-  gtk_misc_set_alignment (GTK_MISC (dialog->shortcut_label), 0.0, 0.5);
-  gtk_table_attach_defaults (GTK_TABLE (table), dialog->shortcut_label, 1, 2, 1, 2);
-  gtk_widget_show (dialog->shortcut_label);
-
-  /* Connect to key release signal for determining the new shortcut */
-  g_signal_connect_swapped (dialog, "key-press-event", G_CALLBACK (xfce_shortcut_dialog_key_pressed), dialog);
-  g_signal_connect_swapped (dialog, "key-release-event", G_CALLBACK (xfce_shortcut_dialog_key_released), dialog);
-}
-
-
-
-gint
-xfce_shortcut_dialog_run (XfceShortcutDialog *dialog,
-                          GtkWidget          *parent)
-{
-  gint response = GTK_RESPONSE_CANCEL;
-     
-  g_return_val_if_fail (XFCE_IS_SHORTCUT_DIALOG (dialog), GTK_RESPONSE_CANCEL);
-
-  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
-  gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
-
-  /* Take control on the keyboard */
-  if (G_LIKELY (gdk_keyboard_grab (gtk_widget_get_root_window (GTK_WIDGET (dialog)), TRUE, GDK_CURRENT_TIME) == GDK_GRAB_SUCCESS))
-    {
-      /* Run the dialog and wait for the user to enter a valid shortcut */
-      response = gtk_dialog_run (GTK_DIALOG (dialog));
-
-      /* Clear shortcut if requested by the user */
-      if (G_UNLIKELY (response == GTK_RESPONSE_NO))
-        {
-          g_free (dialog->shortcut);
-          dialog->shortcut = g_strdup ("");
-        }
-
-      /* Release keyboard */
-      gdk_keyboard_ungrab (GDK_CURRENT_TIME);
-    }
-  else
-    g_warning ("%s", _("Could not grab the keyboard."));
-
-  /* Return the response ID */
-  return response;
-}
-
-
-
-static gboolean
-xfce_shortcut_dialog_key_pressed (XfceShortcutDialog *dialog,
-                                  GdkEventKey        *event)
-{
-  gchar *text;
-  gchar *shortcut;
-
-  g_free (dialog->shortcut);
-
-  /* Determine and remember the current shortcut */
-  dialog->shortcut = xfce_shortcut_dialog_shortcut_name (dialog, event->keyval, event->state);
-
-  shortcut = g_markup_escape_text (dialog->shortcut, -1);
-  text = g_strdup_printf (_("<span size='large'><b>%s</b></span>"), shortcut);
-
-  gtk_label_set_markup (GTK_LABEL (dialog->shortcut_label), text);
-
-  g_free (text);
-  g_free (shortcut);
-
-  return FALSE;
-}
-
-
-
-static gboolean 
-xfce_shortcut_dialog_key_released (XfceShortcutDialog *dialog,
-                                   GdkEventKey        *event)
-{
-  gboolean shortcut_accepted = FALSE;
-
-  /* Let 'validate-shortcut' listeners decide whether this shortcut is ok or not */
-  g_signal_emit_by_name (dialog, "validate-shortcut", dialog->shortcut, &shortcut_accepted);
-
-  /* Check if the shortcut was accepted */
-  if (G_LIKELY (shortcut_accepted))
-    {
-      /* Release keyboard */
-      gdk_keyboard_ungrab (GDK_CURRENT_TIME);
-
-      /* Exit dialog with positive response */
-      gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-    }
-  else
-    {
-      /* Clear label */
-      gtk_label_set_markup (GTK_LABEL (dialog->shortcut_label), "");
-    }
-
-  return FALSE;
-}
-
-
-
-static gchar *
-xfce_shortcut_dialog_shortcut_name (XfceShortcutDialog *dialog,
-                                    guint               keyval,
-                                    guint               modifiers)
-{
-  XModifierKeymap *modmap;
-  Display         *display;
-  const KeySym    *keysyms;
-  KeyCode          keycode;
-  KeySym          *keymap;
-  gint             keysyms_per_keycode = 0;
-  gint             min_keycode = 0;
-  gint             max_keycode = 0;
-  gint             mask;
-  gint             i;
-  gint             j;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUT_DIALOG (dialog), NULL);
-
-  display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-
-  gdk_error_trap_push ();
-
-  XDisplayKeycodes (display, &min_keycode, &max_keycode);
-
-  keymap = XGetKeyboardMapping (display, min_keycode, max_keycode - min_keycode + 1, &keysyms_per_keycode);
-
-  if (G_LIKELY (keymap != NULL))
-    {
-      modmap = XGetModifierMapping (display);
-
-      if (G_LIKELY (modmap != NULL))
-        {
-          for (i = 0; i < 8 * modmap->max_keypermod; ++i)
-            {
-              keycode = modmap->modifiermap[i];
-
-              if (keycode == 0 || keycode < min_keycode || keycode > max_keycode)
-                continue;
-
-              keysyms = keymap + (keycode - min_keycode) * keysyms_per_keycode;
-              mask = 1 << (i / modmap->max_keypermod);
-
-              for (j = 0; j < keysyms_per_keycode; ++j)
-                {
-                  if (keysyms[j] == GDK_Super_L || keysyms[j] == GDK_Super_R)
-                    modifiers &= ~mask;
-
-#if 0
-                  if (keysyms[j] == GDK_Meta_L || keysyms[j] == GDK_Meta_R)
-                    modifiers &= ~mask;
-#endif
-
-                  if (keysyms[j] == GDK_Hyper_L || keysyms[j] == GDK_Hyper_R)
-                    modifiers &= ~mask;
-
-                  if (keysyms[j] == GDK_Scroll_Lock)
-                    modifiers &= ~mask;
-
-                  if (keysyms[j] == GDK_Num_Lock)
-                    modifiers &= ~mask;
-
-                  if (keysyms[j] == GDK_Caps_Lock)
-                    modifiers &= ~mask;
-                }
-            }
-
-          XFreeModifiermap (modmap);
-        }
-
-      XFree (keymap);
-    }
-
-  gdk_flush ();
-  gdk_error_trap_pop ();
-
-  return gtk_accelerator_name (keyval, modifiers);
-}
-
-
-
-const gchar*
-xfce_shortcut_dialog_get_shortcut (XfceShortcutDialog *dialog)
-{
-  g_return_val_if_fail (XFCE_IS_SHORTCUT_DIALOG (dialog), NULL);
-  return dialog->shortcut;
-}
-
-
-
-const gchar *
-xfce_shortcut_dialog_get_action (XfceShortcutDialog *dialog)
-{
-  g_return_val_if_fail (XFCE_IS_SHORTCUT_DIALOG (dialog), NULL);
-  return dialog->action;
-}
-
-
-
-const gchar *
-xfce_shortcut_dialog_get_action_name (XfceShortcutDialog *dialog)
-{
-  g_return_val_if_fail (XFCE_IS_SHORTCUT_DIALOG (dialog), NULL);
-  return dialog->action_name;
-}
diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.h b/libxfce4kbd-private/xfce-shortcut-dialog.h
deleted file mode 100644
index e196a38..0000000
--- a/libxfce4kbd-private/xfce-shortcut-dialog.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __XFCE_SHORTCUT_DIALOG_H__
-#define __XFCE_SHORTCUT_DIALOG_H__
-
-#include <gtk/gtk.h>
-
-#include "xfce-shortcuts.h"
-
-G_BEGIN_DECLS;
-
-typedef struct _XfceShortcutDialogClass XfceShortcutDialogClass;
-typedef struct _XfceShortcutDialog      XfceShortcutDialog;
-
-#define XFCE_TYPE_SHORTCUT_DIALOG            (xfce_shortcut_dialog_get_type ())
-#define XFCE_SHORTCUT_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUT_DIALOG, XfceShortcutDialog))
-#define XFCE_SHORTCUT_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUT_DIALOG, XfceShortcutDialogClass))
-#define XFCE_IS_SHORTCUT_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUT_DIALOG))
-#define XFCE_IS_SHORTCUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUT_DIALOG))
-#define XFCE_SHORTCUT_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUT_DIALOG, XfceShortcutDialogClass))
-
-GType        xfce_shortcut_dialog_get_type        (void) G_GNUC_CONST;
-
-GtkWidget   *xfce_shortcut_dialog_new             (const gchar        *provider,
-                                                   const gchar        *action_name,
-                                                   const gchar        *action) G_GNUC_MALLOC;
-gint         xfce_shortcut_dialog_run             (XfceShortcutDialog *dialog,
-                                                   GtkWidget          *parent);
-const gchar *xfce_shortcut_dialog_get_shortcut    (XfceShortcutDialog *dialog);
-const gchar *xfce_shortcut_dialog_get_action      (XfceShortcutDialog *action);
-const gchar *xfce_shortcut_dialog_get_action_name (XfceShortcutDialog *action);
-
-G_END_DECLS;
-
-#endif /* !__XFCE_SHORTCUT_DIALOG_H__ */
diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c b/libxfce4kbd-private/xfce-shortcuts-grabber.c
deleted file mode 100644
index 5b55593..0000000
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ /dev/null
@@ -1,706 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <X11/Xlib.h>
-
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdkkeysyms.h>
-
-#include <gtk/gtk.h>
-
-#include <libxfce4util/libxfce4util.h>
-
-#include "xfce-shortcuts-grabber.h"
-
-
-
-#define XFCE_SHORTCUTS_GRABBER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFCE_TYPE_SHORTCUTS_GRABBER, XfceShortcutsGrabberPrivate))
-
-
-
-#define MODIFIER_MASK (GDK_SHIFT_MASK | \
-                       GDK_CONTROL_MASK | \
-                       GDK_MOD1_MASK | \
-                       GDK_MOD2_MASK | \
-                       GDK_MOD3_MASK | \
-                       GDK_MOD4_MASK | \
-                       GDK_MOD5_MASK)
-
-#define IGNORE_MASK   (0x2000 | \
-                       GDK_LOCK_MASK | \
-                       GDK_HYPER_MASK | \
-                       GDK_SUPER_MASK | \
-                       GDK_META_MASK)
-
-
-
-/* Property identifiers */
-enum
-{
-  PROP_0,
-};
-
-
-
-/* Cache indices for modifiers */
-enum
-{
-  CACHE_SUPER,
-  CACHE_HYPER,
-  CACHE_META,
-  CACHE_CAPS_LOCK,
-  CACHE_NUM_LOCK,
-  CACHE_SCROLL_LOCK,
-  CACHE_LAST,
-};
-
-
-
-typedef struct _XfceKey XfceKey;
-
-
-
-static void            xfce_shortcuts_grabber_class_init       (XfceShortcutsGrabberClass *klass);
-static void            xfce_shortcuts_grabber_init             (XfceShortcutsGrabber      *grabber);
-static void            xfce_shortcuts_grabber_constructed      (GObject                   *object);
-static void            xfce_shortcuts_grabber_finalize         (GObject                   *object);
-static void            xfce_shortcuts_grabber_get_property     (GObject                   *object,
-                                                                guint                      prop_id,
-                                                                GValue                    *value,
-                                                                GParamSpec                *pspec);
-static void            xfce_shortcuts_grabber_set_property     (GObject                   *object,
-                                                                guint                      prop_id,
-                                                                const GValue              *value,
-                                                                GParamSpec                *pspec);
-static void            xfce_shortcuts_grabber_keys_changed     (GdkKeymap                 *keymap,
-                                                                XfceShortcutsGrabber      *grabber);
-static void            xfce_shortcuts_grabber_grab_all         (XfceShortcutsGrabber      *grabber);
-static void            xfce_shortcuts_grabber_ungrab_all       (XfceShortcutsGrabber      *grabber);
-static void            xfce_shortcuts_grabber_reload_modifiers (XfceShortcutsGrabber      *grabber);
-static void            xfce_shortcuts_grabber_parse_shortcut   (XfceShortcutsGrabber      *grabber,
-                                                                const gchar               *shortcut,
-                                                                guint                     *keycode,
-                                                                guint                     *modifiers);
-static void            xfce_shortcuts_grabber_grab             (XfceShortcutsGrabber      *grabber,
-                                                                XfceKey                   *key,
-                                                                gboolean                   grab);
-static guint           xfce_shortcuts_grabber_get_ignore_mask  (XfceShortcutsGrabber      *grabber);
-static GdkFilterReturn xfce_shortcuts_grabber_event_filter     (GdkXEvent                 *gdk_xevent,
-                                                                GdkEvent                  *event,
-                                                                XfceShortcutsGrabber      *grabber);
-
-
-
-struct _XfceShortcutsGrabberPrivate
-{
-  GHashTable *keys;
-  guint       modifiers[CACHE_LAST];
-};
-
-struct _XfceKey
-{
-  guint keycode;
-  guint modifiers;
-};
-
-
-
-static GObjectClass *xfce_shortcuts_grabber_parent_class = NULL;
-
-
-
-GType
-xfce_shortcuts_grabber_get_type (void)
-{
-  static GType type = G_TYPE_INVALID;
-
-  if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-      static const GTypeInfo info =
-      {
-        sizeof (XfceShortcutsGrabberClass),
-        NULL,
-        NULL,
-        (GClassInitFunc) xfce_shortcuts_grabber_class_init,
-        NULL,
-        NULL,
-        sizeof (XfceShortcutsGrabber),
-        0,
-        (GInstanceInitFunc) xfce_shortcuts_grabber_init,
-        NULL,
-      };
-
-      type = g_type_register_static (G_TYPE_OBJECT, "XfceShortcutsGrabber", &info, 0);
-    }
-
-  return type;
-}
-
-
-
-static void
-xfce_shortcuts_grabber_class_init (XfceShortcutsGrabberClass *klass)
-{
-  GObjectClass *gobject_class;
-
-  g_type_class_add_private (klass, sizeof (XfceShortcutsGrabberPrivate));
-
-  /* Determine the parent type class */
-  xfce_shortcuts_grabber_parent_class = g_type_class_peek_parent (klass);
-
-  gobject_class = G_OBJECT_CLASS (klass);
-#if GLIB_CHECK_VERSION (2,14,0)
-  gobject_class->constructed = xfce_shortcuts_grabber_constructed; 
-#endif
-  gobject_class->finalize = xfce_shortcuts_grabber_finalize; 
-  gobject_class->get_property = xfce_shortcuts_grabber_get_property;
-  gobject_class->set_property = xfce_shortcuts_grabber_set_property;
-
-  g_signal_new ("shortcut-activated",
-                XFCE_TYPE_SHORTCUTS_GRABBER,
-                G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                0,
-                NULL,
-                NULL,
-                g_cclosure_marshal_VOID__STRING,
-                G_TYPE_NONE,
-                1,
-                G_TYPE_STRING);
-}
-
-
-
-static void
-xfce_shortcuts_grabber_init (XfceShortcutsGrabber *grabber)
-{
-  grabber->priv = XFCE_SHORTCUTS_GRABBER_GET_PRIVATE (grabber);
-  grabber->priv->keys = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
-
-  xfce_shortcuts_grabber_reload_modifiers (grabber);
-}
-
-
-
-static void
-xfce_shortcuts_grabber_constructed (GObject *object)
-{
-  GdkDisplay *display;
-  GdkKeymap  *keymap;
-
-  XfceShortcutsGrabber *grabber = XFCE_SHORTCUTS_GRABBER (object);
-
-  keymap = gdk_keymap_get_default ();
-  g_signal_connect (keymap, "keys-changed", G_CALLBACK (xfce_shortcuts_grabber_keys_changed), 
-                    grabber);
-
-  display = gdk_display_get_default ();
-
-  /* Flush events before adding the event filter */
-  XAllowEvents (GDK_DISPLAY_XDISPLAY (display), AsyncBoth, CurrentTime);
-
-  /* Add event filter */
-  gdk_window_add_filter (NULL, (GdkFilterFunc) xfce_shortcuts_grabber_event_filter, grabber);
-}
-
-
-
-static void
-xfce_shortcuts_grabber_finalize (GObject *object)
-{
-  XfceShortcutsGrabber *grabber = XFCE_SHORTCUTS_GRABBER (object);
-
-  xfce_shortcuts_grabber_ungrab_all (grabber);
-  g_hash_table_unref (grabber->priv->keys);
-
-  (*G_OBJECT_CLASS (xfce_shortcuts_grabber_parent_class)->finalize) (object);
-}
-
-
-
-static void
-xfce_shortcuts_grabber_get_property (GObject    *object,
-                                     guint       prop_id,
-                                     GValue     *value,
-                                     GParamSpec *pspec)
-{
-#if 0
-  XfceShortcutsGrabber *grabber = XFCE_SHORTCUTS_GRABBER (object);
-#endif
-
-  switch (prop_id)
-    {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-
-
-static void
-xfce_shortcuts_grabber_set_property (GObject      *object,
-                                     guint         prop_id,
-                                     const GValue *value,
-                                     GParamSpec   *pspec)
-{
-#if 0
-  XfceShortcutsGrabber *grabber = XFCE_SHORTCUTS_GRABBER (object);
-#endif
-
-  switch (prop_id)
-    {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-
-
-static void
-xfce_shortcuts_grabber_keys_changed (GdkKeymap            *keymap,
-                                     XfceShortcutsGrabber *grabber)
-{
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-
-  xfce_shortcuts_grabber_ungrab_all (grabber);
-  xfce_shortcuts_grabber_reload_modifiers (grabber);
-  xfce_shortcuts_grabber_grab_all (grabber);
-}
-
-
-
-static gboolean
-grab_key (const gchar          *shortcut,
-          XfceKey              *key,
-          XfceShortcutsGrabber *grabber)
-{
-  xfce_shortcuts_grabber_grab (grabber, key, TRUE);
-  return FALSE;
-}
-
-
-
-static void
-xfce_shortcuts_grabber_grab_all (XfceShortcutsGrabber *grabber)
-{
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-  g_hash_table_foreach (grabber->priv->keys, (GHFunc) grab_key, grabber);
-}
-
-
-
-static gboolean
-ungrab_key (const gchar          *shortcut,
-            XfceKey              *key,
-            XfceShortcutsGrabber *grabber)
-{
-  xfce_shortcuts_grabber_grab (grabber, key, FALSE);
-  return FALSE;
-}
-
-
-
-static void
-xfce_shortcuts_grabber_ungrab_all (XfceShortcutsGrabber *grabber)
-{
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-  g_hash_table_foreach (grabber->priv->keys, (GHFunc) ungrab_key, grabber);
-}
-
-
-
-static void
-xfce_shortcuts_grabber_reload_modifiers (XfceShortcutsGrabber *grabber)
-{
-  XModifierKeymap *modmap;
-  const KeySym    *keysyms;
-  Display         *display;
-  KeyCode          keycode;
-  KeySym          *keymap;
-  gint             keysyms_per_keycode = 0;
-  gint             min_keycode = 0;
-  gint             max_keycode = 0;
-  gint             mask;
-  gint             i;
-  gint             j;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-
-  for (i = 0; i < CACHE_LAST; ++i)
-    grabber->priv->modifiers[i] = 0;
-
-  display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-
-  gdk_error_trap_push ();
-  
-  XDisplayKeycodes (display, &min_keycode, &max_keycode);
-
-  keymap = XGetKeyboardMapping (display, min_keycode, max_keycode - min_keycode + 1, 
-                                &keysyms_per_keycode);
-
-  if (G_UNLIKELY (keymap == NULL))
-    return;
-
-  modmap = XGetModifierMapping (display);
-
-  if (G_UNLIKELY (modmap == NULL))
-    {
-      XFree (keymap);
-      return;
-    }
-
-  for (i = 0; i < 8 * modmap->max_keypermod; ++i)
-    {
-      keycode = modmap->modifiermap[i];
-
-      if (keycode == 0 || keycode < min_keycode || keycode > max_keycode)
-        continue;
-
-      keysyms = keymap + (keycode - min_keycode) * keysyms_per_keycode;
-      mask = 1 << (i / modmap->max_keypermod);
-
-      for (j = 0; j < keysyms_per_keycode; ++j)
-        {
-          if (keysyms[j] == GDK_Super_L || keysyms[j] == GDK_Super_R)
-            grabber->priv->modifiers[CACHE_SUPER] = mask;
-
-          if (keysyms[j] == GDK_Meta_L || keysyms[j] == GDK_Meta_R)
-            grabber->priv->modifiers[CACHE_META] = mask;
-
-          if (keysyms[j] == GDK_Hyper_L || keysyms[j] == GDK_Hyper_R)
-            grabber->priv->modifiers[CACHE_HYPER] = mask;
-
-          if (keysyms[j] == GDK_Scroll_Lock)
-            grabber->priv->modifiers[CACHE_SCROLL_LOCK] = mask;
-
-          if (keysyms[j] == GDK_Num_Lock)
-            grabber->priv->modifiers[CACHE_NUM_LOCK] = mask;
-
-          if (keysyms[j] == GDK_Caps_Lock)
-            grabber->priv->modifiers[CACHE_CAPS_LOCK] = mask;
-        }
-    }
-
-  XFreeModifiermap (modmap);
-  XFree (keymap);
-
-  gdk_flush ();
-  gdk_error_trap_pop ();
-}
-
-
-
-static void
-xfce_shortcuts_grabber_parse_shortcut (XfceShortcutsGrabber *grabber,
-                                       const gchar          *shortcut,
-                                       guint                *keycode,
-                                       guint                *modifiers)
-{
-  guint keyval;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-
-  gtk_accelerator_parse (shortcut, &keyval, modifiers);
-
-  *keycode = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), keyval);
-
-  if ((*modifiers & GDK_SUPER_MASK) == GDK_SUPER_MASK)
-    {
-      *modifiers |= grabber->priv->modifiers[CACHE_SUPER];
-      *modifiers ^= GDK_SUPER_MASK;
-    }
-
-  if ((*modifiers & GDK_HYPER_MASK) == GDK_HYPER_MASK)
-    {
-      *modifiers |= grabber->priv->modifiers[CACHE_HYPER];
-      *modifiers ^= GDK_HYPER_MASK;
-    }
-
-  if ((*modifiers & GDK_META_MASK) == GDK_META_MASK)
-    {
-      *modifiers |= grabber->priv->modifiers[CACHE_META];
-      *modifiers ^= GDK_META_MASK;
-    }
-
-  *modifiers &= MODIFIER_MASK;
-  *modifiers &= ~xfce_shortcuts_grabber_get_ignore_mask (grabber);
-}
-
-
-
-gchar *
-xfce_shortcuts_grabber_shortcut_name (XfceShortcutsGrabber *grabber,
-                                      guint                 keycode,
-                                      guint                 modifiers)
-{
-  Display *display;
-  KeySym   keysym;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber), NULL);
-
-  display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-  keysym = XKeycodeToKeysym (display, keycode, 0);
-
-  modifiers &= MODIFIER_MASK;
-  modifiers &= ~xfce_shortcuts_grabber_get_ignore_mask (grabber);
-
-  if ((modifiers & grabber->priv->modifiers[CACHE_SUPER]) != 0)
-    {
-      modifiers |= GDK_SUPER_MASK;
-      modifiers ^= grabber->priv->modifiers[CACHE_SUPER];
-    }
-
-  if ((modifiers & grabber->priv->modifiers[CACHE_HYPER]) != 0)
-    {
-      modifiers |= GDK_HYPER_MASK;
-      modifiers ^= grabber->priv->modifiers[CACHE_HYPER];
-    }
-
-#if 0
-  if ((modifiers & grabber->priv->modifiers[CACHE_META]) != 0)
-    {
-      modifiers |= GDK_META_MASK;
-      modifiers ^= grabber->priv->modifiers[CACHE_META];
-    }
-#endif
-
-  return gtk_accelerator_name (keysym, modifiers);
-}
-
-
-
-static void
-xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
-                             XfceKey              *key,
-                             gboolean              grab)
-{
-  GdkDisplay *display;
-  GdkScreen  *screen;
-  Window      window;
-  guint       bits[32];
-  guint       current_mask;
-  guint       n_bits;
-  guint       screens;
-  guint       modifiers;
-  guint       ignored_modifiers = 0;
-  gint        i;
-  guint       j;
-  guint       k;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-  g_return_if_fail (key != NULL);
-
-  display = gdk_display_get_default ();
-  screens = gdk_display_get_n_screens (display);
-
-  ignored_modifiers = xfce_shortcuts_grabber_get_ignore_mask (grabber);
-
-  modifiers = key->modifiers & MODIFIER_MASK & ~ignored_modifiers;
-
-  /* Store indices of all the set bits of the ignore mask in an array */
-  for (i = 0, n_bits = 0; i < 32; ++i, ignored_modifiers >>= 1)
-    if ((ignored_modifiers & 0x1) == 0x1)
-      bits[n_bits++] = i;
-
-  for (i = 0; i < (1 << n_bits); ++i)
-    {
-      /* Map bits in the counter to those in the mask and thereby retrieve all ignored bit
-       * mask combinations */
-      for (current_mask = 0, j = 0; j < n_bits; ++j)
-        if ((i & (1 << j)) != 0)
-          current_mask |= (1 << bits[j]);
-
-      /* Grab key on all screens */
-      for (k = 0; k < screens; ++k)
-        {
-          /* Get current screen and X root window */
-          screen = gdk_display_get_screen (display, k);
-          window = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen));
-
-          gdk_error_trap_push ();
-
-          if (grab)
-            {
-              XGrabKey (GDK_DISPLAY_XDISPLAY (display), key->keycode, current_mask | modifiers, 
-                        window, FALSE, GrabModeAsync, GrabModeAsync);
-            }
-          else
-            XUngrabKey (GDK_DISPLAY_XDISPLAY (display), key->keycode, current_mask | modifiers, 
-                        window);
-
-          gdk_flush ();
-          gdk_error_trap_pop ();
-        }
-    }
-}
-
-
-
-static guint
-xfce_shortcuts_grabber_get_ignore_mask (XfceShortcutsGrabber *grabber)
-{
-  guint mask = 0;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber), 0);
-  
-  mask |= 0x200 | GDK_LOCK_MASK | GDK_HYPER_MASK | GDK_SUPER_MASK | GDK_META_MASK;
-  mask |= grabber->priv->modifiers[CACHE_CAPS_LOCK];
-  mask |= grabber->priv->modifiers[CACHE_NUM_LOCK];
-  mask |= grabber->priv->modifiers[CACHE_SCROLL_LOCK];
-
-  return mask;
-}
-
-
-
-struct EventKeyFindContext
-{
-  XfceShortcutsGrabber *grabber;
-  XKeyEvent            *xevent;
-  const gchar          *result;
-};
-
-
-
-static gboolean
-find_event_key (const gchar                *shortcut,
-                XfceKey                    *key,
-                struct EventKeyFindContext *context)
-{
-  gchar   *name;
-  gboolean result = FALSE;
-
-  g_return_val_if_fail (context != NULL, TRUE);
-  g_return_val_if_fail (context->xevent != NULL, TRUE);
-  
-  gdk_error_trap_push ();
-
-  name = xfce_shortcuts_grabber_shortcut_name (context->grabber, context->xevent->keycode, 
-                                               context->xevent->state);
-
-  if (G_UNLIKELY (g_str_equal (shortcut, name)))
-    {
-      context->result = shortcut;
-      result = TRUE;
-    }
-
-  g_free (name);
-
-  gdk_flush ();
-  gdk_error_trap_pop ();
-
-  return result;
-}
-
-
-
-static GdkFilterReturn
-xfce_shortcuts_grabber_event_filter (GdkXEvent            *gdk_xevent,
-                                     GdkEvent             *event,
-                                     XfceShortcutsGrabber *grabber)
-{
-  struct EventKeyFindContext context;
-  XEvent                    *xevent;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber), GDK_FILTER_CONTINUE);
-
-  xevent = (XEvent *) gdk_xevent;
-
-  if (xevent->type != KeyPress)
-    return GDK_FILTER_CONTINUE;
-
-  context.grabber = grabber;
-  context.xevent = (XKeyEvent *) xevent;
-  context.result = NULL;
-
-  g_hash_table_foreach (grabber->priv->keys, (GHFunc) find_event_key, &context);
-
-  if (G_LIKELY (context.result != NULL))
-    g_signal_emit_by_name (grabber, "shortcut-activated", context.result);
-
-  return GDK_FILTER_CONTINUE;
-}
-
-
-
-XfceShortcutsGrabber *
-xfce_shortcuts_grabber_new (void)
-{
-  GObject *object;
-
-  object = g_object_new (XFCE_TYPE_SHORTCUTS_GRABBER, NULL);
-
-#if !GLIB_CHECK_VERSION (2,14,0)
-  xfce_shortcuts_grabber_constructed (object);
-#endif
-
-  return XFCE_SHORTCUTS_GRABBER (object);
-}
-
-
-
-void
-xfce_shortcuts_grabber_add (XfceShortcutsGrabber *grabber,
-                            const gchar          *shortcut)
-{
-  XfceKey *key;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-  g_return_if_fail (shortcut != NULL);
-
-  key = g_new0 (XfceKey, 1);
-  
-  xfce_shortcuts_grabber_parse_shortcut (grabber, shortcut, &key->keycode, &key->modifiers);
-
-  if (G_LIKELY (key->keycode != 0))
-    {
-      xfce_shortcuts_grabber_grab (grabber, key, TRUE);
-      g_hash_table_insert (grabber->priv->keys, g_strdup (shortcut), key);
-    }
-}
-
-
-
-void
-xfce_shortcuts_grabber_remove (XfceShortcutsGrabber *grabber,
-                               const gchar          *shortcut)
-{
-  XfceKey *key;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
-  g_return_if_fail (shortcut != NULL);
-
-  key = g_hash_table_lookup (grabber->priv->keys, shortcut);
-
-  if (G_LIKELY (key != NULL))
-    {
-      xfce_shortcuts_grabber_grab (grabber, key, FALSE);
-      g_hash_table_remove (grabber->priv->keys, shortcut);
-    }
-}
diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.h b/libxfce4kbd-private/xfce-shortcuts-grabber.h
deleted file mode 100644
index fdc37ef..0000000
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __XFCE_SHORTCUTS_GRABBER_H__
-#define __XFCE_SHORTCUTS_GRABBER_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS;
-
-typedef struct _XfceShortcutsGrabberPrivate XfceShortcutsGrabberPrivate;
-typedef struct _XfceShortcutsGrabberClass   XfceShortcutsGrabberClass;
-typedef struct _XfceShortcutsGrabber        XfceShortcutsGrabber;
-
-#define XFCE_TYPE_SHORTCUTS_GRABBER            (xfce_shortcuts_grabber_get_type ())
-#define XFCE_SHORTCUTS_GRABBER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUTS_GRABBER, XfceShortcutsGrabber))
-#define XFCE_SHORTCUTS_GRABBER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUTS_GRABBER, XfceShortcutsGrabberClass))
-#define XFCE_IS_SHORTCUTS_GRABBER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUTS_GRABBER))
-#define XFCE_IS_SHORTCUTS_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUTS_GRABBER)
-#define XFCE_SHORTCUTS_GRABBER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUTS_GRABBER, XfceShortcutsGrabberClass))
-
-GType                 xfce_shortcuts_grabber_get_type      (void) G_GNUC_CONST;
-
-XfceShortcutsGrabber *xfce_shortcuts_grabber_new           (void) G_GNUC_MALLOC;
-gchar                *xfce_shortcuts_grabber_shortcut_name (XfceShortcutsGrabber *grabber,
-                                                            guint                 keycode,
-                                                            guint                 modifiers);
-void                  xfce_shortcuts_grabber_add           (XfceShortcutsGrabber *grabber,
-                                                            const gchar          *shortcut);
-void                  xfce_shortcuts_grabber_remove        (XfceShortcutsGrabber *grabber,
-                                                            const gchar          *shortcut);
-
-
-
-struct _XfceShortcutsGrabberClass
-{
-  GObjectClass __parent__;
-};
-
-struct _XfceShortcutsGrabber
-{
-  GObject __parent__;
-
-  XfceShortcutsGrabberPrivate *priv;
-};
-
-G_END_DECLS;
-
-#endif /* !__XFCE_SHORTCUTS_GRABBER_H__ */
diff --git a/libxfce4kbd-private/xfce-shortcuts-provider.c b/libxfce4kbd-private/xfce-shortcuts-provider.c
deleted file mode 100644
index 66c6cd1..0000000
--- a/libxfce4kbd-private/xfce-shortcuts-provider.c
+++ /dev/null
@@ -1,676 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <libxfce4util/libxfce4util.h>
-#include <xfconf/xfconf.h>
-
-#include "xfce-shortcuts-provider.h"
-
-
-
-#define XFCE_SHORTCUTS_PROVIDER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFCE_TYPE_SHORTCUTS_PROVIDER, XfceShortcutsProviderPrivate))
-
-
-
-/* Property identifiers */
-enum
-{
-  PROP_0,
-  PROP_NAME,
-};
-
-
-
-typedef struct _XfceShortcutsProviderContext XfceShortcutsProviderContext;
-
-
-
-static void xfce_shortcuts_provider_class_init       (XfceShortcutsProviderClass *klass);
-static void xfce_shortcuts_provider_init             (XfceShortcutsProvider      *provider);
-static void xfce_shortcuts_provider_constructed      (GObject                    *object);
-static void xfce_shortcuts_provider_finalize         (GObject                    *object);
-static void xfce_shortcuts_provider_get_property     (GObject                    *object,
-                                                      guint                       prop_id,
-                                                      GValue                     *value,
-                                                      GParamSpec                 *pspec);
-static void xfce_shortcuts_provider_set_property     (GObject                    *object,
-                                                      guint                       prop_id,
-                                                      const GValue               *value,
-                                                      GParamSpec                 *pspec);
-static void xfce_shortcuts_provider_register         (XfceShortcutsProvider      *provider);
-static void xfce_shortcuts_provider_property_changed (XfconfChannel              *channel,
-                                                      gchar                      *property,
-                                                      GValue                     *value,
-                                                      XfceShortcutsProvider      *provider);
-
-
-
-struct _XfceShortcutsProviderPrivate
-{
-  XfconfChannel *channel;
-  gchar         *name;
-  gchar         *default_base_property;
-  gchar         *custom_base_property;
-};
-
-struct _XfceShortcutsProviderContext
-{
-  XfceShortcutsProvider *provider;
-  GList                 *list;
-  const gchar           *base_property;
-};
-
-
-
-static GObjectClass *xfce_shortcuts_provider_parent_class = NULL;
-
-
-
-GType
-xfce_shortcuts_provider_get_type (void)
-{
-  static GType type = G_TYPE_INVALID;
-
-  if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-      static const GTypeInfo info =
-      {
-        sizeof (XfceShortcutsProviderClass),
-        NULL,
-        NULL,
-        (GClassInitFunc) xfce_shortcuts_provider_class_init,
-        NULL,
-        NULL,
-        sizeof (XfceShortcutsProvider),
-        0,
-        (GInstanceInitFunc) xfce_shortcuts_provider_init,
-        NULL,
-      };
-
-      type = g_type_register_static (G_TYPE_OBJECT, "XfceShortcutsProvider", &info, 0);
-    }
-
-  return type;
-}
-
-
-
-static void
-xfce_shortcuts_provider_class_init (XfceShortcutsProviderClass *klass)
-{
-  GObjectClass *gobject_class;
-
-  g_type_class_add_private (klass, sizeof (XfceShortcutsProviderPrivate));
-
-  /* Determine the parent type class */
-  xfce_shortcuts_provider_parent_class = g_type_class_peek_parent (klass);
-
-  gobject_class = G_OBJECT_CLASS (klass);
-#if GLIB_CHECK_VERSION (2,14,0)
-  gobject_class->constructed = xfce_shortcuts_provider_constructed;
-#endif
-  gobject_class->finalize = xfce_shortcuts_provider_finalize; 
-  gobject_class->get_property = xfce_shortcuts_provider_get_property;
-  gobject_class->set_property = xfce_shortcuts_provider_set_property;
-
-  g_object_class_install_property (gobject_class, 
-                                   PROP_NAME,
-                                   g_param_spec_string ("name",
-                                                        "name",
-                                                        "name",
-                                                        NULL,
-                                                        G_PARAM_READWRITE |
-                                                        G_PARAM_CONSTRUCT_ONLY));
-
-  g_signal_new ("shortcut-removed", 
-                XFCE_TYPE_SHORTCUTS_PROVIDER,
-                G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                0,
-                NULL,
-                NULL,
-                g_cclosure_marshal_VOID__STRING,
-                G_TYPE_NONE,
-                1,
-                G_TYPE_STRING);
-
-  g_signal_new ("shortcut-added", 
-                XFCE_TYPE_SHORTCUTS_PROVIDER,
-                G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                0,
-                NULL,
-                NULL,
-                g_cclosure_marshal_VOID__STRING,
-                G_TYPE_NONE,
-                1,
-                G_TYPE_STRING);
-}
-
-
-
-static void
-xfce_shortcuts_provider_init (XfceShortcutsProvider *provider)
-{
-  provider->priv = XFCE_SHORTCUTS_PROVIDER_GET_PRIVATE (provider);
-
-  provider->priv->channel = xfconf_channel_new ("xfce4-keyboard-shortcuts");
-
-  g_signal_connect (provider->priv->channel, "property-changed", 
-                    G_CALLBACK (xfce_shortcuts_provider_property_changed), provider);
-}
-
-
-
-static void
-xfce_shortcuts_provider_constructed (GObject *object)
-{
-  XfceShortcutsProvider *provider = XFCE_SHORTCUTS_PROVIDER (object);
-
-  xfce_shortcuts_provider_register (provider);
-
-  provider->priv->default_base_property = g_strdup_printf ("/%s/default", provider->priv->name);
-  provider->priv->custom_base_property = g_strdup_printf ("/%s/custom", provider->priv->name);
-
-  if (!xfce_shortcuts_provider_is_custom (provider))
-    xfce_shortcuts_provider_reset_to_defaults (provider);
-}
-
-
-
-static void
-xfce_shortcuts_provider_finalize (GObject *object)
-{
-  XfceShortcutsProvider *provider = XFCE_SHORTCUTS_PROVIDER (object);
-
-  g_free (provider->priv->name);
-  g_free (provider->priv->custom_base_property);
-  g_free (provider->priv->default_base_property);
-
-  g_object_unref (provider->priv->channel);
-
-  (*G_OBJECT_CLASS (xfce_shortcuts_provider_parent_class)->finalize) (object);
-}
-
-
-
-static void
-xfce_shortcuts_provider_get_property (GObject    *object,
-                                      guint       prop_id,
-                                      GValue     *value,
-                                      GParamSpec *pspec)
-{
-  XfceShortcutsProvider *provider = XFCE_SHORTCUTS_PROVIDER (object);
-
-  switch (prop_id)
-    {
-    case PROP_NAME:
-      g_value_set_string (value, provider->priv->name);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-
-
-static void
-xfce_shortcuts_provider_set_property (GObject      *object,
-                                      guint         prop_id,
-                                      const GValue *value,
-                                      GParamSpec   *pspec)
-{
-  XfceShortcutsProvider *provider = XFCE_SHORTCUTS_PROVIDER (object);
-
-  switch (prop_id)
-    {
-    case PROP_NAME:
-      g_free (provider->priv->name);
-      provider->priv->name = g_strdup (g_value_get_string (value));
-      g_object_notify (object, "name");
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-
-
-static void
-xfce_shortcuts_provider_register (XfceShortcutsProvider *provider)
-{
-  gchar       **provider_names;
-  const gchar **names;
-  gboolean      already_registered = FALSE;
-  gint          length;
-  gint          i;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider));
-
-  provider_names = xfconf_channel_get_string_list (provider->priv->channel, "/providers");
-
-  for (i = 0; provider_names != NULL && provider_names[i] != NULL; ++i)
-    if (G_UNLIKELY (g_str_equal (provider_names[i], xfce_shortcuts_provider_get_name (provider))))
-      {
-        already_registered = TRUE;
-        break;
-      }
-
-  length = i;
-
-  if (G_UNLIKELY (!already_registered))
-    {
-      names = g_new0 (const gchar *, length + 1);
-      for (i = 0; provider_names != NULL && provider_names[i] != NULL; ++i)
-        names[i] = provider_names[i];
-      names[i++] = xfce_shortcuts_provider_get_name (provider);
-      names[i] = NULL;
-
-      xfconf_channel_set_string_list (provider->priv->channel, "/providers", names);
-
-      g_free (names);
-    }
-
-  g_strfreev (provider_names);
-}
-
-
-
-static void 
-xfce_shortcuts_provider_property_changed (XfconfChannel         *channel,
-                                          gchar                 *property,
-                                          GValue                *value,
-                                          XfceShortcutsProvider *provider)
-{
-  const gchar *shortcut;
-  gchar       *override_property;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider));
-
-  DBG ("property = %s", property);
-
-  if (!g_str_has_prefix (property, provider->priv->custom_base_property))
-    return;
-
-  override_property = g_strconcat (provider->priv->custom_base_property, "/override", NULL);
-
-  if (G_UNLIKELY (g_utf8_collate (property, override_property) == 0))
-    {
-      g_free (override_property);
-      return;
-    }
-  g_free (override_property);
-
-  shortcut = property + strlen (provider->priv->custom_base_property) + strlen ("/");
-
-  if (G_VALUE_TYPE (value) != G_TYPE_INVALID)
-    g_signal_emit_by_name (provider, "shortcut-added", shortcut);
-  else
-    g_signal_emit_by_name (provider, "shortcut-removed", shortcut);
-}
-
-
-
-XfceShortcutsProvider *
-xfce_shortcuts_provider_new (const gchar *name)
-{
-  GObject *object = g_object_new (XFCE_TYPE_SHORTCUTS_PROVIDER, "name", name, NULL);
-
-#if !GLIB_CHECK_VERSION (2,14,0)
-  xfce_shortcuts_provider_constructed (object);  
-#endif
-
-  return XFCE_SHORTCUTS_PROVIDER (object);
-}
-
-
-
-GList *
-xfce_shortcuts_provider_get_providers (void)
-{
-  GList         *providers = NULL;
-  XfconfChannel *channel;
-  gchar        **names;
-  gint           i;
-
-  channel = xfconf_channel_get ("xfce4-keyboard-shortcuts");
-  names = xfconf_channel_get_string_list (channel, "/providers");
-
-  if (G_LIKELY (names != NULL))
-    {
-      for (i = 0; names[i] != NULL; ++i)
-        providers = g_list_append (providers, xfce_shortcuts_provider_new (names[i]));
-      g_strfreev (names);
-    }
-    
-  return providers;
-}
-
-
-
-void
-xfce_shortcuts_provider_free_providers (GList *providers)
-{
-  GList *iter;
-
-  for (iter = g_list_first (providers); iter != NULL; iter = g_list_next (iter))
-    g_object_unref (iter->data);
-
-  g_list_free (providers);
-}
-
-
-
-const gchar *
-xfce_shortcuts_provider_get_name (XfceShortcutsProvider *provider)
-{
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider), NULL);
-  return provider->priv->name;
-}
-
-
-
-gboolean
-xfce_shortcuts_provider_is_custom (XfceShortcutsProvider *provider)
-{
-  gchar   *property;
-  gboolean override;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider), FALSE);
-  g_return_val_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel), FALSE);
-
-  property = g_strconcat (provider->priv->custom_base_property, "/override", NULL);
-  override = xfconf_channel_get_bool (provider->priv->channel, property, FALSE);
-  g_free (property);
-
-  return override;
-}
-
-
-
-void
-xfce_shortcuts_provider_reset_to_defaults (XfceShortcutsProvider *provider)
-{
-  g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider));
-  g_return_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel));
-
-  DBG ("property = %s", provider->priv->custom_base_property);
-
-  xfconf_channel_reset_property (provider->priv->channel, provider->priv->custom_base_property, TRUE);
-  xfce_shortcuts_provider_clone_defaults (provider);
-}
-
-
-
-static gboolean
-_xfce_shortcuts_provider_clone_default (const gchar           *property,
-                                        const GValue          *value,
-                                        XfceShortcutsProvider *provider)
-{
-  const gchar *shortcut;
-  const gchar *command;
-  gchar       *custom_property;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider), TRUE);
-  g_return_val_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel), TRUE);
-
-  if (G_UNLIKELY (!G_IS_VALUE (value) || G_VALUE_TYPE (value) != G_TYPE_STRING))
-    return FALSE;
-
-  shortcut = property + strlen (provider->priv->default_base_property) + strlen ("/");
-  command = g_value_get_string (value);
-
-  DBG ("shortcut = %s, command = %s", shortcut, command);
-
-  custom_property = g_strconcat (provider->priv->custom_base_property, "/", shortcut, NULL);
-  xfconf_channel_set_string (provider->priv->channel, custom_property, command);
-  g_free (custom_property);
-
-  return FALSE;
-}
-
-
-
-void
-xfce_shortcuts_provider_clone_defaults (XfceShortcutsProvider *provider)
-{
-  GHashTable *properties;
-  gchar      *property;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider));
-  g_return_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel));
-
-  /* Get default command shortcuts */
-  properties = xfconf_channel_get_properties (provider->priv->channel, provider->priv->default_base_property);
-
-  if (G_LIKELY (properties != NULL))
-    {
-      /* Copy from /commands/default to /commands/custom property by property */
-      g_hash_table_foreach (properties, (GHFunc) _xfce_shortcuts_provider_clone_default, provider);
-
-      g_hash_table_destroy (properties);
-    }
-
-  DBG ("adding override property");
-
-  /* Add the override property */
-  property = g_strconcat (provider->priv->custom_base_property, "/override", NULL);
-  xfconf_channel_set_bool (provider->priv->channel, property, TRUE);
-  g_free (property);
-}
-
-
-
-static gboolean
-_xfce_shortcuts_provider_get_shortcut (const gchar                  *property,
-                                       const GValue                 *value,
-                                       XfceShortcutsProviderContext *context)
-{
-  XfceShortcut *sc;
-  const gchar  *shortcut;
-  const gchar  *command;
-
-  g_return_val_if_fail (context != NULL, TRUE);
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (context->provider), TRUE);
-
-  if (G_VALUE_TYPE (value) != G_TYPE_STRING)
-    return FALSE;
-
-  if (!g_str_has_prefix (property, context->provider->priv->custom_base_property))
-    return FALSE;
-  
-  shortcut = property + strlen (context->provider->priv->custom_base_property) + strlen ("/");
-  command = g_value_get_string (value);
-
-  if (G_LIKELY (shortcut != NULL && command != NULL && g_utf8_strlen (shortcut, -1) > 0 && g_utf8_strlen (command, -1) > 0))
-    {
-      sc = g_new0 (XfceShortcut, 1);
-
-      sc->property_name = g_strdup (property);
-      sc->shortcut = g_strdup (shortcut);
-      sc->command = g_strdup (command);
-
-      context->list = g_list_append (context->list, sc);
-    }
-
-  return FALSE;
-}
-
-
-
-GList *
-xfce_shortcuts_provider_get_shortcuts (XfceShortcutsProvider *provider)
-{
-  XfceShortcutsProviderContext context;
-  GHashTable                  *properties;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider), NULL);
-  g_return_val_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel), NULL);
-
-  properties = xfconf_channel_get_properties (provider->priv->channel, provider->priv->custom_base_property);
-
-  context.provider = provider;
-  context.list = NULL;
-
-  if (G_LIKELY (properties != NULL))
-    g_hash_table_foreach (properties, (GHFunc) _xfce_shortcuts_provider_get_shortcut, &context);
-
-  return context.list;
-}
-
-
-
-XfceShortcut *
-xfce_shortcuts_provider_get_shortcut (XfceShortcutsProvider *provider,
-                                      const gchar           *shortcut)
-{
-  XfceShortcut *sc = NULL;
-  gchar        *base_property;
-  gchar        *property;
-  gchar        *command;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider), NULL);
-  g_return_val_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel), NULL);
-
-  if (G_LIKELY (xfce_shortcuts_provider_is_custom (provider)))
-    base_property = provider->priv->custom_base_property;
-  else
-    base_property = provider->priv->default_base_property;
-
-  property = g_strconcat (base_property, "/", shortcut, NULL);
-  command = xfconf_channel_get_string (provider->priv->channel, property, NULL);
-
-  if (G_LIKELY (command != NULL))
-    {
-      sc = g_new0 (XfceShortcut, 1);
-      sc->command = command;
-      sc->property_name = g_strdup (property);
-      sc->shortcut = g_strdup (shortcut);
-    }
-
-  g_free (property);
-
-  return sc;
-}
-
-
-
-gboolean
-xfce_shortcuts_provider_has_shortcut (XfceShortcutsProvider *provider,
-                                      const gchar           *shortcut)
-{
-  gchar   *base_property;
-  gchar   *property;
-  gboolean has_property;
-
-  g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider), FALSE);
-  g_return_val_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel), FALSE);
-  
-  if (G_LIKELY (xfce_shortcuts_provider_is_custom (provider)))
-    base_property = provider->priv->custom_base_property;
-  else
-    base_property = provider->priv->default_base_property;
-
-  property = g_strconcat (base_property, "/", shortcut, NULL);
-  has_property = xfconf_channel_has_property (provider->priv->channel, property);
-  g_free (property);
-
-  return has_property;
-}
-
-
-
-void
-xfce_shortcuts_provider_set_shortcut (XfceShortcutsProvider *provider,
-                                      const gchar           *shortcut,
-                                      const gchar           *command)
-{
-  gchar *property;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider));
-  g_return_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel));
-  g_return_if_fail (shortcut != NULL && command != NULL);
-
-  /* Only allow custom shortcuts to be changed */
-  if (G_UNLIKELY (!xfce_shortcuts_provider_is_custom (provider)))
-    return;
-    
-  property = g_strconcat (provider->priv->custom_base_property, "/", shortcut, NULL);
-
-  if (xfconf_channel_has_property (provider->priv->channel, property))
-    xfconf_channel_reset_property (provider->priv->channel, property, FALSE);
-
-  xfconf_channel_set_string (provider->priv->channel, property, command);
-
-  g_free (property);
-}
-
-
-
-void
-xfce_shortcuts_provider_reset_shortcut (XfceShortcutsProvider *provider,
-                                        const gchar           *shortcut)
-{
-  gchar *property;
-
-  g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider));
-  g_return_if_fail (XFCONF_IS_CHANNEL (provider->priv->channel));
-  g_return_if_fail (shortcut != NULL);
-
-  property = g_strconcat (provider->priv->custom_base_property, "/", shortcut, NULL);
-
-  DBG ("property = %s", property);
-
-  xfconf_channel_reset_property (provider->priv->channel, property, FALSE);
-  g_free (property);
-}
-
-
-
-void
-xfce_shortcuts_free (GList *shortcuts)
-{
-  g_list_foreach (shortcuts, (GFunc) xfce_shortcut_free, NULL);
-}
-
-
-
-void
-xfce_shortcut_free (XfceShortcut *shortcut)
-{
-  if (G_UNLIKELY (shortcut == NULL))
-    return;
-
-  g_free (shortcut->property_name);
-  g_free (shortcut->shortcut);
-  g_free (shortcut->command);
-  g_free (shortcut);
-}
diff --git a/libxfce4kbd-private/xfce-shortcuts-provider.h b/libxfce4kbd-private/xfce-shortcuts-provider.h
deleted file mode 100644
index 96b0a7c..0000000
--- a/libxfce4kbd-private/xfce-shortcuts-provider.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __XFCE_SHORTCUTS_PROVIDER_H__
-#define __XFCE_SHORTCUTS_PROVIDER_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS;
-
-typedef struct _XfceShortcut                 XfceShortcut;
-
-typedef struct _XfceShortcutsProviderPrivate XfceShortcutsProviderPrivate;
-typedef struct _XfceShortcutsProviderClass   XfceShortcutsProviderClass;
-typedef struct _XfceShortcutsProvider        XfceShortcutsProvider;
-
-#define XFCE_TYPE_SHORTCUTS_PROVIDER            (xfce_shortcuts_provider_get_type ())
-#define XFCE_SHORTCUTS_PROVIDER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUTS_PROVIDER, XfceShortcutsProvider))
-#define XFCE_SHORTCUTS_PROVIDER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUTS_PROVIDER, XfceShortcutsProviderClass))
-#define XFCE_IS_SHORTCUTS_PROVIDER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUTS_PROVIDER))
-#define XFCE_IS_SHORTCUTS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUTS_PROVIDER)
-#define XFCE_SHORTCUTS_PROVIDER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUTS_PROVIDER, XfceShortcutsProviderClass))
-
-GType xfce_shortcuts_provider_get_type (void) G_GNUC_CONST;
-
-XfceShortcutsProvider  *xfce_shortcuts_provider_new               (const gchar           *name) G_GNUC_MALLOC;
-GList                  *xfce_shortcuts_provider_get_providers     (void) G_GNUC_MALLOC;
-void                    xfce_shortcuts_provider_free_providers    (GList                 *providers);
-const gchar            *xfce_shortcuts_provider_get_name          (XfceShortcutsProvider *provider);
-gboolean                xfce_shortcuts_provider_is_custom         (XfceShortcutsProvider *provider);
-void                    xfce_shortcuts_provider_reset_to_defaults (XfceShortcutsProvider *provider);
-void                    xfce_shortcuts_provider_clone_defaults    (XfceShortcutsProvider *provider);
-GList                  *xfce_shortcuts_provider_get_shortcuts     (XfceShortcutsProvider *provider);
-XfceShortcut           *xfce_shortcuts_provider_get_shortcut      (XfceShortcutsProvider *provider,
-                                                                   const gchar           *shortcut);
-gboolean                xfce_shortcuts_provider_has_shortcut      (XfceShortcutsProvider *provider,
-                                                                   const gchar           *shortcut);
-void                    xfce_shortcuts_provider_set_shortcut      (XfceShortcutsProvider *provider,
-                                                                   const gchar           *shortcut,
-                                                                   const gchar           *command);
-void                    xfce_shortcuts_provider_reset_shortcut    (XfceShortcutsProvider *provider,
-                                                                   const gchar           *shortcut);
-
-void                    xfce_shortcuts_free                       (GList                 *shortcuts);
-void                    xfce_shortcut_free                        (XfceShortcut          *shortcut);
-
-
-
-struct _XfceShortcutsProviderClass
-{
-  GObjectClass __parent__;
-};
-
-struct _XfceShortcutsProvider
-{
-  GObject __parent__;
-
-  XfceShortcutsProviderPrivate *priv;
-};
-
-struct _XfceShortcut
-{
-  gchar *property_name;
-  gchar *shortcut;
-  gchar *command;
-};
-
-G_END_DECLS;
-
-#endif /* !__XFCE_SHORTCUTS_PROVIDER_H__ */
diff --git a/libxfce4kbd-private/xfce-shortcuts.c b/libxfce4kbd-private/xfce-shortcuts.c
deleted file mode 100644
index ee5639f..0000000
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-
-#include <X11/Xlib.h>
-
-#include <gtk/gtk.h>
-
-#include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
-
-#include <xfconf/xfconf.h>
-
-#include "xfce-shortcuts.h"
-
-
-
-typedef struct
-{
-  const gchar *owner_name;
-  const gchar *other_name;
-  const gchar *message;
-  const gchar *owner_button_text;
-  const gchar *other_button_text;
-} XfceShortcutConflictMessage;
-
-
-
-static XfceShortcutConflictMessage conflict_messages[] = {
-  { "xfwm4", "xfwm4", 
-    N_("This shortcut is already being used for another window manager action. Which action do you want to use?"), 
-    N_("Use '%s'"), N_("Keep the other one") },
-  { "xfwm4", "commands",
-    N_("This shortcut is already being used for the command '%s'. Which action do you want to use?"), 
-    N_("Use '%s'"), N_("Keep '%s'") },
-  { "commands","commands",
-    N_("This shortcut is already being used for the command '%s'. Which action do you want to use?"),
-    N_("Use '%s'"), N_("Keep '%s'") },
-  { "commands", "xfwm4",
-    N_("This shortcut is already being used by a window manager action. Which action do you want to use?"),
-    N_("Use '%s'"), N_("Keep the window manager action") },
-  { 0, 0, NULL, NULL, NULL },
-};
-
-
-
-gint
-xfce_shortcut_conflict_dialog (const gchar *owner,
-                               const gchar *other,
-                               const gchar *shortcut,
-                               const gchar *owner_action,
-                               const gchar *other_action,
-                               gboolean     ignore_same_provider)
-{
-  gchar   *title;
-  gchar   *secondary_text;
-  gchar   *owner_action_name;
-  gchar   *other_action_name;
-  gchar   *owner_button_text;
-  gchar   *other_button_text;
-  gboolean handled = FALSE;
-  gint     response = GTK_RESPONSE_ACCEPT;
-  gint     i;
-
-  /* Make sure to use the translations from libxfcegui4 */
-  xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
-
-  if (g_utf8_collate (owner, other) == 0 && ignore_same_provider)
-    return GTK_RESPONSE_ACCEPT;
-
-  if (g_utf8_collate (owner, other) == 0 && g_utf8_collate (owner_action, other_action) == 0)
-    return GTK_RESPONSE_ACCEPT;
-
-  title = g_strdup_printf (_("Conflicting actions for %s"), shortcut);
-
-  for (i = 0; conflict_messages[i].message != NULL; ++i)
-    if (g_utf8_collate (conflict_messages[i].owner_name, owner) == 0 &&
-        g_utf8_collate (conflict_messages[i].other_name, other) == 0)
-      {
-        owner_action_name = owner_action == NULL ? NULL : g_markup_escape_text (owner_action, -1);
-        other_action_name = other_action == NULL ? NULL : g_markup_escape_text (other_action, -1);
-
-        secondary_text = g_strdup_printf (_(conflict_messages[i].message), other_action_name);
-
-        owner_button_text = g_markup_printf_escaped (_(conflict_messages[i].owner_button_text), owner_action_name);
-        other_button_text = g_markup_printf_escaped (_(conflict_messages[i].other_button_text), other_action_name);
-
-        response = xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_QUESTION,
-                                        title, secondary_text,
-                                        XFCE_CUSTOM_BUTTON, owner_button_text, GTK_RESPONSE_ACCEPT,
-                                        XFCE_CUSTOM_BUTTON, other_button_text, GTK_RESPONSE_REJECT,
-                                        NULL);
-
-        g_free (other_button_text);
-        g_free (owner_button_text);
-        g_free (secondary_text);
-        g_free (other_action_name);
-        g_free (owner_action_name);
-
-        handled = TRUE;
-        break;
-      }
-
-  if (G_UNLIKELY (!handled))
-    {
-      xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_ERROR,
-                           title, _("This shortcut is already being used for something else."),
-                           GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
-      response = GTK_RESPONSE_REJECT;
-    }
-
-  g_free (title);
-
-  return response;
-}
diff --git a/libxfce4kbd-private/xfce-shortcuts.h b/libxfce4kbd-private/xfce-shortcuts.h
deleted file mode 100644
index a8c3e56..0000000
--- a/libxfce4kbd-private/xfce-shortcuts.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* vi:set expandtab sw=2 sts=2: */
-/*-
- * Copyright (c) 2008 Jannis Pohlmann <jannis at xfce.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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 Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __FRAP_SHORTCUTS_H__
-#define __FRAP_SHORTCUTS_H__
-
-#include <X11/Xlib.h>
-#include <xfconf/xfconf.h>
-
-gboolean xfce_shortcut_conflict_dialog (const gchar *owner,
-                                        const gchar *other,
-                                        const gchar *shortcut,
-                                        const gchar *owner_action,
-                                        const gchar *other_action,
-                                        gboolean     ignore_same_provider);
-                                                     
-#endif /* !__FRAP_SHORTCUTS_H__ */
diff --git a/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml b/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
deleted file mode 100644
index 807212b..0000000
--- a/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<channel name="xfce4-keyboard-shortcuts" version="1.0">
-  <property name="commands" type="empty">
-    <property name="default" type="empty">
-      <property name="<Alt>F2" type="string" value="xfrun4"/>
-      <property name="<Control><Alt>Delete" type="string" value="xflock4"/>
-      <property name="XF86Display" type="string" value="xrandr --auto"/>
-    </property>
-  </property>
-  <property name="xfwm4" type="empty">
-    <property name="default" type="empty">
-      <property name="<Alt>Insert" type="string" value="add_workspace_key"/>
-      <property name="Escape" type="string" value="cancel_key"/>
-      <property name="Left" type="string" value="left_key"/>
-      <property name="Right" type="string" value="right_key"/>
-      <property name="Up" type="string" value="up_key"/>
-      <property name="Down" type="string" value="down_key"/>
-      <property name="<Alt>Tab" type="string" value="cycle_windows_key"/>
-      <property name="<Alt><Shift>Tab" type="string" value="cycle_reverse_windows_key"/>
-      <property name="<Alt>Delete" type="string" value="del_workspace_key"/>
-      <property name="<Control><Alt>Down" type="string" value="down_workspace_key"/>
-      <property name="<Control><Alt>Left" type="string" value="left_workspace_key"/>
-      <property name="<Shift><Alt>Page_Down" type="string" value="lower_window_key"/>
-      <property name="<Alt>F4" type="string" value="close_window_key"/>
-      <property name="<Alt>F6" type="string" value="stick_window_key"/>
-      <property name="<Alt>F7" type="string" value="move_window_key"/>
-      <property name="<Alt>F8" type="string" value="resize_window_key"/>
-      <property name="<Alt>F9" type="string" value="hide_window_key"/>
-      <property name="<Alt>F10" type="string" value="maximize_window_key"/>
-      <property name="<Alt>F11" type="string" value="fullscreen_key"/>
-      <property name="<Alt>F12" type="string" value="above_key"/>
-      <property name="<Control><Shift><Alt>Left" type="string" value="move_window_left_key"/>
-      <property name="<Alt><Control>End" type="string" value="move_window_next_workspace_key"/>
-      <property name="<Alt><Control>Home" type="string" value="move_window_prev_workspace_key"/>
-      <property name="<Control><Shift><Alt>Right" type="string" value="move_window_right_key"/>
-      <property name="<Control><Shift><Alt>Up" type="string" value="move_window_up_key"/>
-      <property name="<Alt><Control>KP_1" type="string" value="move_window_workspace_1_key"/>
-      <property name="<Alt><Control>KP_2" type="string" value="move_window_workspace_2_key"/>
-      <property name="<Alt><Control>KP_3" type="string" value="move_window_workspace_3_key"/>
-      <property name="<Alt><Control>KP_4" type="string" value="move_window_workspace_4_key"/>
-      <property name="<Alt><Control>KP_5" type="string" value="move_window_workspace_5_key"/>
-      <property name="<Alt><Control>KP_6" type="string" value="move_window_workspace_6_key"/>
-      <property name="<Alt><Control>KP_7" type="string" value="move_window_workspace_7_key"/>
-      <property name="<Alt><Control>KP_8" type="string" value="move_window_workspace_8_key"/>
-      <property name="<Alt><Control>KP_9" type="string" value="move_window_workspace_9_key"/>
-      <property name="<Alt>space" type="string" value="popup_menu_key"/>
-      <property name="<Shift><Alt>Page_Up" type="string" value="raise_window_key"/>
-      <property name="<Control><Alt>Right" type="string" value="right_workspace_key"/>
-      <property name="<Control><Alt>d" type="string" value="show_desktop_key"/>
-      <property name="<Control><Alt>Up" type="string" value="up_workspace_key"/>
-      <property name="<Super>Tab" type="string" value="switch_window_key"/>
-      <property name="<Control>F1" type="string" value="workspace_1_key"/>
-      <property name="<Control>F2" type="string" value="workspace_2_key"/>
-      <property name="<Control>F3" type="string" value="workspace_3_key"/>
-      <property name="<Control>F4" type="string" value="workspace_4_key"/>
-      <property name="<Control>F5" type="string" value="workspace_5_key"/>
-      <property name="<Control>F6" type="string" value="workspace_6_key"/>
-      <property name="<Control>F7" type="string" value="workspace_7_key"/>
-      <property name="<Control>F8" type="string" value="workspace_8_key"/>
-      <property name="<Control>F9" type="string" value="workspace_9_key"/>
-      <property name="<Control>F10" type="string" value="workspace_10_key"/>
-      <property name="<Control>F11" type="string" value="workspace_11_key"/>
-      <property name="<Control>F12" type="string" value="workspace_12_key"/>
-    </property>
-  </property>
-</channel>
diff --git a/libxfcegui4/Makefile.am b/libxfcegui4/Makefile.am
index ba7a5f1..44d4b72 100644
--- a/libxfcegui4/Makefile.am
+++ b/libxfcegui4/Makefile.am
@@ -7,6 +7,7 @@ INCLUDES =								\
 	-DG_LOG_DOMAIN=\"libxfcegui4\"					\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
 	-DPREFIX=\"$(prefix)\"						\
+	-DLIBXFCEGUI4_COMPILATION					\
 	$(PLATFORM_CPPFLAGS)
 
 lib_LTLIBRARIES =							\
@@ -248,8 +249,8 @@ netk-enum-types.c: $(netk_headers) Makefile
 gui-enum-types.h: stamp-gui-enum-types.h
 	@true
 stamp-gui-enum-types.h: $(gui_headers) Makefile
-	( cd $(srcdir) && glib-mkenums \
-		--fhead "#ifndef __GUI_ENUM_TYPES_H__\n#define __GUI_ENUM_TYPES_H__\n" \
+	$(AM_V_GEN) ( cd $(srcdir) && glib-mkenums \
+		--fhead "#ifndef __GUI_ENUM_TYPES_H__\n#define __GUI_ENUM_TYPES_H__\n#include <glib-object.h>\n" \
 		--fprod "/* enumerations from \"@filename@\" */\n" \
 		--vhead "GType @enum_name at _get_type (void);\n#define GUI_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" \
 		--ftail "#endif /* __GUI_ENUM_TYPES_H__ */" \
@@ -259,7 +260,7 @@ stamp-gui-enum-types.h: $(gui_headers) Makefile
 	&& echo timestamp > $(@F)
 
 gui-enum-types.c: $(gui_headers) Makefile
-	( cd $(srcdir) && glib-mkenums \
+	$(AM_V_GEN) ( cd $(srcdir) && glib-mkenums \
 		--fhead "#include <libxfcegui4/libxfcegui4.h>" \
 		--fprod "\n/* enumerations from \"@filename@\" */" \
 		--vhead "GType\n at enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G at Type@Value values[] = {" \
@@ -272,7 +273,7 @@ gui-enum-types.c: $(gui_headers) Makefile
 netk-marshal.h: stamp-netk-marshal.h
 	@true
 stamp-netk-marshal.h: netk-marshal.list Makefile
-	( cd $(srcdir) && glib-genmarshal \
+	$(AM_V_GEN) ( cd $(srcdir) && glib-genmarshal \
 		--prefix=p_netk_marshal \
 		--header netk-marshal.list ) >> xgen-nmh \
 	&& (cmp -s xgen-nmh netk-marshal.h || cp xgen-nmh netk-marshal.h) \
@@ -282,8 +283,8 @@ stamp-netk-marshal.h: netk-marshal.list Makefile
 #
 
 netk-marshal.c: netk-marshal.list Makefile
-	( cd $(srcdir) \
-		&& echo "#include <libxfcegui4/libxfcegui4.h>" \
+	$(AM_V_GEN) ( cd $(srcdir) \
+		&& echo "#include <libxfcegui4/netk-marshal.h>" \
 		&& glib-genmarshal \
 		--prefix=p_netk_marshal \
 		--body netk-marshal.list ) >> xgen-nmc \
@@ -293,7 +294,7 @@ netk-marshal.c: netk-marshal.list Makefile
 xfce_marshal.h: stamp-xfce_marshal.h
 	@true
 stamp-xfce_marshal.h: xfce_marshal.list Makefile
-	( cd $(srcdir) && glib-genmarshal \
+	$(AM_V_GEN) ( cd $(srcdir) && glib-genmarshal \
 		--prefix=p_xfce_marshal \
 		--header xfce_marshal.list ) >> xgen-xmh \
 	&& (cmp -s xgen-xmh xfce_marshal.h || cp xgen-xmh xfce_marshal.h) \
@@ -303,8 +304,8 @@ stamp-xfce_marshal.h: xfce_marshal.list Makefile
 #
 
 xfce_marshal.c: xfce_marshal.list Makefile
-	( cd $(srcdir) \
-		&& echo "#include <libxfcegui4/libxfcegui4.h>" \
+	$(AM_V_GEN) ( cd $(srcdir) \
+		&& echo "#include <libxfcegui4/xfce_marshal.h>" \
 		&& glib-genmarshal \
 		--prefix=p_xfce_marshal \
 		--body xfce_marshal.list ) >> xgen-xmc \
@@ -313,7 +314,7 @@ xfce_marshal.c: xfce_marshal.list Makefile
 endif
 
 netk-inlinepixbufs.h: $(srcdir)/default_icon.png
-	gdk-pixbuf-csource --raw --build-list 				\
+	$(AM_V_GEN) gdk-pixbuf-csource --raw --build-list 				\
 	default_icon_data $(srcdir)/default_icon.png > netk-inlinepixbufs.h
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/libxfcegui4/dialogs.c b/libxfcegui4/dialogs.c
index 494f57a..821c969 100644
--- a/libxfcegui4/dialogs.c
+++ b/libxfcegui4/dialogs.c
@@ -40,6 +40,9 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include <glib.h>
 #include <gtk/gtk.h>
@@ -60,14 +63,12 @@
 /* max. length of a message */
 #define MAXMESSAGELEN   2048
 
-/* Darwin does not have a variable named environ
-   but has a function which you can get the environ
-   variable with.  */
-#if defined(__APPLE__) && defined(__MACH__)
-#include <crt_externs.h>
+#ifdef HAVE__NSGETENVIRON
+/* for support under apple/darwin */
 #define environ (*_NSGetEnviron())
-#else
-extern char **environ;
+#elif !HAVE_DECL_ENVIRON
+/* try extern if environ is not defined in unistd.h */
+extern gchar **environ;
 #endif
 
 /* create a header with optional icon (may be NULL) in larger bold font;
@@ -580,7 +581,6 @@ xfce_message_dialog_new_valist(GtkWindow *parent,
             if (strcmp (text, XFCE_CUSTOM_PIXBUF_BUTTON) == 0)
             {
                 GdkPixbuf *icon, *scaled;
-                GtkWidget *align, *image, *hbox, *label;
                 gint w, h;
 
                 text = va_arg (args, gchar *);
diff --git a/libxfcegui4/dialogs.h b/libxfcegui4/dialogs.h
index f193c3a..eda5a03 100644
--- a/libxfcegui4/dialogs.h
+++ b/libxfcegui4/dialogs.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
 
 /* new wrappers aroung gtk_message_dialog */
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 /* compat stubs, to be removed someday! */
 void show_info (const char *text);
 void show_warning (const char *text);
diff --git a/libxfcegui4/gtk_style.c b/libxfcegui4/gtk_style.c
index c839ad9..06618f9 100644
--- a/libxfcegui4/gtk_style.c
+++ b/libxfcegui4/gtk_style.c
@@ -33,6 +33,7 @@
 #include <pango/pango-font.h>
 
 #include <libxfce4util/libxfce4util.h>
+#include <libxfcegui4/libxfcegui4.h>
 
 static const char *states[] = {
     "normal", "active", "prelight", "selected", "insensitive", NULL
diff --git a/libxfcegui4/gtktoxevent.h b/libxfcegui4/gtktoxevent.h
index de6b82f..decfe42 100644
--- a/libxfcegui4/gtktoxevent.h
+++ b/libxfcegui4/gtktoxevent.h
@@ -58,7 +58,7 @@ GdkWindow * xfce_add_event_win           (GdkScreen *gscr,
 XfceFilterSetup * xfce_init_event_filter (gpointer data);
 void xfce_close_event_filter             (XfceFilterSetup *setup);
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define GtkToXEventFilterStatus XfceFilterStatus
 #define GtkToXEventFilterStack  XfceFilterStack
diff --git a/libxfcegui4/icons.c b/libxfcegui4/icons.c
index 5351eb4..85ac42f 100644
--- a/libxfcegui4/icons.c
+++ b/libxfcegui4/icons.c
@@ -103,7 +103,7 @@ xfce_inline_icon_at_size (const guint8 *data,
 }
 
 static inline void
-ensure_gtk_icon_theme()
+ensure_gtk_icon_theme(void)
 {	
     if(G_UNLIKELY(!icon_theme)) {
         icon_theme = gtk_icon_theme_get_default();
diff --git a/libxfcegui4/icons.h b/libxfcegui4/icons.h
index d749a08..cc71bdd 100644
--- a/libxfcegui4/icons.h
+++ b/libxfcegui4/icons.h
@@ -80,7 +80,7 @@ GdkPixbuf *xfce_themed_icon_load_category    (XfceIconThemeCategory category,
                                               gint size);
 
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 void xfce_themed_icon_add_search_path(const gchar *path) G_GNUC_DEPRECATED;
 void xfce_set_icon_theme(const gchar *theme_name) G_GNUC_DEPRECATED;
 GdkPixbuf *inline_icon_at_size(const guint8 *data,
diff --git a/libxfcegui4/libxfcegui4.h b/libxfcegui4/libxfcegui4.h
index cd3d8ab..5727255 100644
--- a/libxfcegui4/libxfcegui4.h
+++ b/libxfcegui4/libxfcegui4.h
@@ -23,7 +23,7 @@
 #define __LIBXFCEGUI4_LIBXFCEGUI4_H__
 
 #include <libxfcegui4/libxfcegui4-config.h>
-
+#include <libxfcegui4/gui-enum-types.h>
 #include <libxfcegui4/dialogs.h>
 #include <libxfcegui4/gtk_style.h>
 #include <libxfcegui4/gtktoxevent.h>
diff --git a/libxfcegui4/netk-pager.c b/libxfcegui4/netk-pager.c
index babc997..39fce8f 100644
--- a/libxfcegui4/netk-pager.c
+++ b/libxfcegui4/netk-pager.c
@@ -341,7 +341,7 @@ netk_pager_size_request (GtkWidget * widget, GtkRequisition * requisition)
         }
         else
         {
-            int n_spaces, i, w;
+            int i, w;
             NetkScreen *screen;
             PangoLayout *layout;
 
@@ -757,7 +757,7 @@ workspace_at_point (NetkPager * pager,
              * belong to the workspace.
              */
 
-            GtkWidget *widget = GTK_WIDGET (pager);
+            widget = GTK_WIDGET (pager);
 
             if (rect.x == xthickness)
             {
@@ -1309,7 +1309,7 @@ netk_pager_drag_timeout (NetkPager *pager)
 
 static void
 netk_pager_drag_leave (GtkWidget * widget, GdkDragContext * context,
-                       guint time, gpointer data)
+                       guint timestamp, gpointer data)
 {
     NetkPager *pager = NETK_PAGER (widget);
 
@@ -1323,7 +1323,7 @@ netk_pager_drag_leave (GtkWidget * widget, GdkDragContext * context,
 
 static gboolean
 netk_pager_drag_motion (GtkWidget * widget, GdkDragContext * context, gint x,
-                        gint y, guint time, gpointer data)
+                        gint y, guint timestamp, gpointer data)
 {
     NetkPager *pager = NETK_PAGER (widget);
     NetkWorkspace *current_ws, *new_ws;
@@ -1353,7 +1353,7 @@ netk_pager_drag_motion (GtkWidget * widget, GdkDragContext * context, gint x,
         pager->priv->ws_activate = 0;
         pager->priv->ws_to_activate = NULL;
     }
-    gdk_drag_status (context, 0, time);
+    gdk_drag_status (context, 0, timestamp);
 
     return TRUE;
 }
diff --git a/libxfcegui4/netk-screen.c b/libxfcegui4/netk-screen.c
index 36e9676..6b5b431 100644
--- a/libxfcegui4/netk-screen.c
+++ b/libxfcegui4/netk-screen.c
@@ -345,10 +345,10 @@ netk_screen_construct (NetkScreen * screen, int number)
  * Return value: the #NetkScreen for screen @index
  **/
 NetkScreen *
-netk_screen_get (int index)
+netk_screen_get (int idx)
 {
     g_return_val_if_fail (gdk_display != NULL, NULL);
-    g_return_val_if_fail (index < ScreenCount (gdk_display), NULL);
+    g_return_val_if_fail (idx < ScreenCount (gdk_display), NULL);
 
     if (screens == NULL)
     {
@@ -356,16 +356,17 @@ netk_screen_get (int index)
         p_netk_event_filter_init ();
     }
 
-    if (screens[index] == NULL)
+    if (screens[idx] == NULL)
     {
-        screens[index] = g_object_new (NETK_TYPE_SCREEN, NULL);
+        screens[idx] = g_object_new (NETK_TYPE_SCREEN, NULL);
 
-        netk_screen_construct (screens[index], index);
+        netk_screen_construct (screens[idx], idx);
     }
 
-    return screens[index];
+    return screens[idx];
 }
 
+#if 0
 NetkScreen *
 p_netk_screen_get_existing (int number)
 {
@@ -377,6 +378,7 @@ p_netk_screen_get_existing (int number)
     else
         return NULL;
 }
+#endif
 
 NetkScreen *
 netk_screen_get_default (void)
@@ -1216,12 +1218,12 @@ update_viewport_settings (NetkScreen * screen)
                 space = netk_screen_get_workspace (screen, i);
                 g_assert (space != NULL);
 
-                if (p_coord[x] < 0)
+                if ((gint)p_coord[x] < 0)
                     p_coord[x] = 0;
                 else if ((int) p_coord[x] > space_width - screen_width)
                     p_coord[x] = space_width - screen_width;
 
-                if (p_coord[y] < 0)
+                if ((gint)p_coord[y] < 0)
                     p_coord[y] = 0;
                 else if ((int) p_coord[y] > space_height - screen_height)
                     p_coord[y] = space_height - screen_height;
diff --git a/libxfcegui4/netk-tasklist.c b/libxfcegui4/netk-tasklist.c
index d5dbe81..5407994 100644
--- a/libxfcegui4/netk-tasklist.c
+++ b/libxfcegui4/netk-tasklist.c
@@ -239,7 +239,7 @@ static void netk_tasklist_disconnect_screen (NetkTasklist * tasklist);
 static GObjectClass *task_parent_class;
 static GObjectClass *tasklist_parent_class;
 
-GType
+static GType
 netk_task_get_type (void)
 {
     static GType type = G_TYPE_INVALID;
@@ -2121,7 +2121,7 @@ netk_task_motion_timeout (gpointer data)
 
 static void
 netk_task_drag_leave (GtkWidget * widget, GdkDragContext * context,
-                      guint time, NetkTask * task)
+                      guint timestamp, NetkTask * task)
 {
     if (task->button_activate != 0)
     {
@@ -2132,14 +2132,14 @@ netk_task_drag_leave (GtkWidget * widget, GdkDragContext * context,
 
 static gboolean
 netk_task_drag_motion (GtkWidget * widget, GdkDragContext * context, gint x,
-                       gint y, guint time, NetkTask * task)
+                       gint y, guint timestamp, NetkTask * task)
 {
 
     if (task->button_activate == 0 && task->type == NETK_TASK_WINDOW)
         task->button_activate = g_timeout_add (TIMEOUT_ACTIVATE,
                                                netk_task_motion_timeout,
                                                task);
-    gdk_drag_status (context, 0, time);
+    gdk_drag_status (context, 0, timestamp);
 
     return TRUE;
 }
@@ -2436,7 +2436,7 @@ draw_dot (GdkWindow * window, GdkGC * lgc, GdkGC * dgc, int x, int y)
 }
 
 
-gboolean
+static gboolean
 netk_task_class_group_expose (GtkWidget * widget, GdkEventExpose * event,
                               gpointer data)
 {
diff --git a/libxfcegui4/netk-trayicon.h b/libxfcegui4/netk-trayicon.h
index 8302f88..d436fd4 100644
--- a/libxfcegui4/netk-trayicon.h
+++ b/libxfcegui4/netk-trayicon.h
@@ -31,7 +31,7 @@
 
 G_BEGIN_DECLS 
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define NETK_TYPE_TRAY_ICON     (netk_tray_icon_get_type())
 #define NETK_TRAY_ICON(o)       (G_TYPE_CHECK_INSTANCE_CAST((o),        \
diff --git a/libxfcegui4/netk-xutils.c b/libxfcegui4/netk-xutils.c
index 099f77f..f4a88dc 100644
--- a/libxfcegui4/netk-xutils.c
+++ b/libxfcegui4/netk-xutils.c
@@ -275,7 +275,7 @@ p_netk_get_text_property (Window xwindow, Atom atom)
     return retval;
 }
 
-char *
+static char *
 p_netk_get_string_property_latin1 (Window xwindow, Atom atom)
 {
     Atom type;
@@ -722,7 +722,8 @@ p_netk_xid_hash (gconstpointer v)
     gulong val = *(const gulong *) v;
 
     /* I'm not sure this works so well. */
-#if G_SIZEOF_LONG > 4
+
+#if defined(G_SIZEOF_LONG) && G_SIZEOF_LONG > 4
     return (guint) (val ^ (val >> 32));
 #else
     return val;
diff --git a/libxfcegui4/preview_filesel.c b/libxfcegui4/preview_filesel.c
index 1684ded..85f9297 100644
--- a/libxfcegui4/preview_filesel.c
+++ b/libxfcegui4/preview_filesel.c
@@ -44,7 +44,6 @@ enum
     PROP_DO_PREVIEW
 };
 
-static GObjectClass *parent_class;
 
 static void preview_file_selection_set_property (GObject * object,
 						 guint arg_id,
@@ -54,6 +53,8 @@ static void preview_file_selection_get_property (GObject * object,
 						 guint arg_id, GValue * value,
 						 GParamSpec * spec);
 
+G_DEFINE_TYPE (PreviewFileSelection, preview_file_selection, GTK_TYPE_FILE_SELECTION)
+
 static void
 preview_file_selection_finalize (GObject * object)
 {
@@ -61,14 +62,13 @@ preview_file_selection_finalize (GObject * object)
 
     g_free (fsel->priv);
 
-    parent_class->finalize (object);
+    G_OBJECT_CLASS (preview_file_selection_parent_class)->finalize (object);
 }
 
 static void
-preview_file_selection_class_init (GObjectClass * object_class)
+preview_file_selection_class_init (PreviewFileSelectionClass *klass)
 {
-    parent_class = g_type_class_ref (GTK_TYPE_FILE_SELECTION);
-
+    GObjectClass *object_class = G_OBJECT_CLASS (klass);
     object_class->set_property = preview_file_selection_set_property;
     object_class->get_property = preview_file_selection_get_property;
     object_class->finalize = preview_file_selection_finalize;
@@ -83,41 +83,11 @@ preview_file_selection_class_init (GObjectClass * object_class)
 }
 
 static void
-preview_file_selection_init (GObject * object)
+preview_file_selection_init (PreviewFileSelection *fsel)
 {
-    PreviewFileSelection *fsel = PREVIEW_FILE_SELECTION (object);
-
     fsel->priv = g_new0 (PreviewFileSelectionPrivate, 1);
 }
 
-GType
-preview_file_selection_get_type (void)
-{
-    static GType type = 0;
-
-    if (!type)
-    {
-	GTypeInfo info = {
-	    sizeof (PreviewFileSelectionClass),
-	    NULL,
-	    NULL,
-	    (GClassInitFunc) preview_file_selection_class_init,
-	    NULL,
-	    NULL,
-	    sizeof (PreviewFileSelection),
-	    0,
-	    (GInstanceInitFunc) preview_file_selection_init,
-	    NULL
-	};
-
-	type =
-	    g_type_register_static (GTK_TYPE_FILE_SELECTION,
-				    "PreviewFileSelection", &info, 0);
-    }
-
-    return type;
-}
-
 GtkWidget *
 preview_file_selection_new (const gchar * title, gboolean do_preview)
 {
diff --git a/libxfcegui4/preview_filesel.h b/libxfcegui4/preview_filesel.h
index 37123bb..6f74fdf 100644
--- a/libxfcegui4/preview_filesel.h
+++ b/libxfcegui4/preview_filesel.h
@@ -26,7 +26,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define TYPE_PREVIEW_FILE_SELECTION          preview_file_selection_get_type ()
 #define PREVIEW_FILE_SELECTION(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PREVIEW_FILE_SELECTION, PreviewFileSelection)
diff --git a/libxfcegui4/xfce-appmenuitem.c b/libxfcegui4/xfce-appmenuitem.c
index ffef48f..cfdf480 100644
--- a/libxfcegui4/xfce-appmenuitem.c
+++ b/libxfcegui4/xfce-appmenuitem.c
@@ -62,8 +62,6 @@ enum {
     PROP_USE_UNDERLINE,
 };
 
-static void xfce_app_menu_item_class_init(XfceAppMenuItemClass *klass);
-static void xfce_app_menu_item_init(XfceAppMenuItem *app_menu_item);
 static void xfce_app_menu_item_set_property(GObject *object,
                                             guint prop_id,
                                             const GValue *value,
@@ -423,7 +421,7 @@ xfce_app_menu_item_finalize(GObject *object)
  * Since 4.1
  **/
 GtkWidget *
-xfce_app_menu_item_new()
+xfce_app_menu_item_new(void)
 {
     return g_object_new(XFCE_TYPE_APP_MENU_ITEM, NULL);
 }
diff --git a/libxfcegui4/xfce-appmenuitem.h b/libxfcegui4/xfce-appmenuitem.h
index 09f3727..0a03715 100644
--- a/libxfcegui4/xfce-appmenuitem.h
+++ b/libxfcegui4/xfce-appmenuitem.h
@@ -26,6 +26,12 @@
 #include <gtk/gtkimagemenuitem.h>
 #include <libxfce4util/libxfce4util.h>
 
+/* work around deprecated api in libxfce4util */
+#define LIBXFCE4UTIL_COMPILATION
+#undef __XFCE_DESKTOPENTRY_H__
+#include <libxfce4util/xfce-desktopentry.h>
+#undef LIBXFCE4UTIL_COMPILATION
+
 G_BEGIN_DECLS
 
 #define XFCE_TYPE_APP_MENU_ITEM            (xfce_app_menu_item_get_type())
@@ -52,9 +58,9 @@ struct _XfceAppMenuItemClass
 	GtkImageMenuItemClass parent_class;
 };
 
-GType xfce_app_menu_item_get_type                     () G_GNUC_CONST;
+GType xfce_app_menu_item_get_type                     (void) G_GNUC_CONST;
 
-GtkWidget *xfce_app_menu_item_new                     ();
+GtkWidget *xfce_app_menu_item_new                     (void);
 
 GtkWidget *xfce_app_menu_item_new_with_label          (const gchar *label);
 
@@ -103,7 +109,7 @@ gboolean xfce_app_menu_item_get_startup_notification  (XfceAppMenuItem *app_menu
 
 void xfce_app_menu_item_set_icon_theme_name           (const gchar *theme_name);
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 void xfce_app_menu_item_set_icon_size                 (guint icon_size) G_GNUC_DEPRECATED;
 #endif
 
diff --git a/libxfcegui4/xfce-colorbutton.c b/libxfcegui4/xfce-colorbutton.c
index a0baf4f..ab040b6 100644
--- a/libxfcegui4/xfce-colorbutton.c
+++ b/libxfcegui4/xfce-colorbutton.c
@@ -31,7 +31,7 @@
 
 
 GtkWidget*
-xfce_color_button_new ()
+xfce_color_button_new (void)
 {
   return gtk_color_button_new ();
 }
diff --git a/libxfcegui4/xfce-colorbutton.h b/libxfcegui4/xfce-colorbutton.h
index a03bdca..74d4732 100644
--- a/libxfcegui4/xfce-colorbutton.h
+++ b/libxfcegui4/xfce-colorbutton.h
@@ -29,7 +29,7 @@
 
 G_BEGIN_DECLS;
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 typedef GtkColorButtonClass XfceColorButtonClass;
 typedef GtkColorButton      XfceColorButton;
@@ -41,7 +41,7 @@ typedef GtkColorButton      XfceColorButton;
 #define XFCE_IS_COLOR_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), XFCE_TYPE_COLOR_BUTTON))
 #define XFCE_COLOR_BUTTON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), XFCE_TYPE_COLOR_BUTTON, XfceColorButtonClass))
 
-GtkWidget *xfce_color_button_new           ();
+GtkWidget *xfce_color_button_new           (void);
 GtkWidget *xfce_color_button_new_with_color(const GdkColor *color);
 void       xfce_color_button_set_color     (XfceColorButton *color_button,
                                             const GdkColor *color);
diff --git a/libxfcegui4/xfce-exec.c b/libxfcegui4/xfce-exec.c
index 5737456..76d2b62 100644
--- a/libxfcegui4/xfce-exec.c
+++ b/libxfcegui4/xfce-exec.c
@@ -47,6 +47,9 @@
 #ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include <gdk/gdk.h>
 
@@ -55,14 +58,12 @@
 #include "xfce-exec.h"
 #include "xfce-startup-notification.h"
 
-/* Darwin does not have a variable named environ
-   but has a function which you can get the environ
-   variable with.  */
-#if defined(__APPLE__) && defined(__MACH__)
-#include <crt_externs.h>
+#ifdef HAVE__NSGETENVIRON
+/* for support under apple/darwin */
 #define environ (*_NSGetEnviron())
-#else
-extern char **environ;
+#elif !HAVE_DECL_ENVIRON
+/* try extern if environ is not defined in unistd.h */
+extern gchar **environ;
 #endif
 
 static void
diff --git a/libxfcegui4/xfce-filechooser.c b/libxfcegui4/xfce-filechooser.c
index aef3002..fdfd464 100644
--- a/libxfcegui4/xfce-filechooser.c
+++ b/libxfcegui4/xfce-filechooser.c
@@ -918,7 +918,7 @@ xfce_file_chooser_remove_shortcut_folder(XfceFileChooser *chooser,
  * Return value: An #XfceFileFilter, or %NULL (GTK+ 2.2 and below).
  **/
 XfceFileFilter *
-xfce_file_filter_new()
+xfce_file_filter_new(void)
 {
 #if GTK_CHECK_VERSION(2, 4, 0)
 	return GTK_OBJECT(gtk_file_filter_new());
diff --git a/libxfcegui4/xfce-filechooser.h b/libxfcegui4/xfce-filechooser.h
index 688e431..6815e43 100644
--- a/libxfcegui4/xfce-filechooser.h
+++ b/libxfcegui4/xfce-filechooser.h
@@ -27,7 +27,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define XFCE_TYPE_FILE_CHOOSER            (xfce_file_chooser_get_type())
 #define XFCE_FILE_CHOOSER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), XFCE_TYPE_FILE_CHOOSER, XfceFileChooser))
@@ -121,7 +121,7 @@ gboolean xfce_file_chooser_remove_shortcut_folder   (XfceFileChooser *chooser,
 
 /* file filter routines */
 
-XfceFileFilter *xfce_file_filter_new                ();
+XfceFileFilter *xfce_file_filter_new                (void);
 
 void xfce_file_filter_set_name                      (XfceFileFilter *filter,
                                                      const gchar *name);
diff --git a/libxfcegui4/xfce-heading.c b/libxfcegui4/xfce-heading.c
index e0ebdcd..ec738fc 100644
--- a/libxfcegui4/xfce-heading.c
+++ b/libxfcegui4/xfce-heading.c
@@ -53,8 +53,6 @@ enum
 
 
 
-static void         xfce_heading_class_init     (XfceHeadingClass *klass);
-static void         xfce_heading_init           (XfceHeading      *heading);
 static void         xfce_heading_finalize       (GObject          *object);
 static void         xfce_heading_get_property   (GObject          *object,
                                                  guint             prop_id,
diff --git a/libxfcegui4/xfce-icontheme.c b/libxfcegui4/xfce-icontheme.c
index 1a09e77..74cc6a0 100644
--- a/libxfcegui4/xfce-icontheme.c
+++ b/libxfcegui4/xfce-icontheme.c
@@ -40,12 +40,11 @@ enum {
     XFCEIC_N_SIGNALS
 };
 
-static void xfce_icon_theme_class_init(XfceIconThemeClass *klass);
-static void xfce_icon_theme_init(XfceIconTheme *icon_theme);
 static void xfce_icon_theme_finalize(GObject *object);
 
 static guint icon_theme_signals[XFCEIC_N_SIGNALS] = { 0 };
-static GObjectClass *parent_class = NULL;
+
+G_DEFINE_TYPE (XfceIconTheme, xfce_icon_theme, G_TYPE_OBJECT)
 
 static void
 xfce_icon_theme_changed_cb(GtkIconTheme *gtk_icon_theme,
@@ -55,31 +54,6 @@ xfce_icon_theme_changed_cb(GtkIconTheme *gtk_icon_theme,
                   icon_theme_signals[XFCEIC_SIG_CHANGED], 0);
 }
 
-GType
-xfce_icon_theme_get_type()
-{
-    static GType icon_theme_type = 0;
-    
-    if(!icon_theme_type) {
-        static const GTypeInfo icon_theme_info = {
-            sizeof(XfceIconThemeClass),
-            NULL,    /* base_init */
-            NULL,    /* base_finalize */
-            (GClassInitFunc)xfce_icon_theme_class_init,
-            NULL,    /* class_finalize */
-            NULL,    /* class_data */
-            sizeof(XfceIconTheme),
-            0,    /* n_preallocs */
-            (GInstanceInitFunc)xfce_icon_theme_init,
-            NULL    /* value_table */
-        };
-        
-        icon_theme_type = g_type_register_static(G_TYPE_OBJECT,
-                "XfceIconTheme", &icon_theme_info, 0);
-    }
-    
-    return icon_theme_type;
-}
 
 static void
 xfce_icon_theme_class_init(XfceIconThemeClass *klass)
@@ -87,8 +61,6 @@ xfce_icon_theme_class_init(XfceIconThemeClass *klass)
     GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
     
     g_type_class_add_private (klass, sizeof (XfceIconThemePriv));
-        
-    parent_class = g_type_class_peek_parent(klass);
     
     gobject_class->finalize = xfce_icon_theme_finalize;
     
@@ -123,7 +95,7 @@ xfce_icon_theme_finalize(GObject *object)
                                          G_CALLBACK(xfce_icon_theme_changed_cb),
                                          icon_theme);
     
-    G_OBJECT_CLASS(parent_class)->finalize(object);
+    G_OBJECT_CLASS(xfce_icon_theme_parent_class)->finalize(object);
 }
 
 /**
diff --git a/libxfcegui4/xfce-icontheme.h b/libxfcegui4/xfce-icontheme.h
index 15ec7b7..2561b68 100644
--- a/libxfcegui4/xfce-icontheme.h
+++ b/libxfcegui4/xfce-icontheme.h
@@ -30,7 +30,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define XFCE_TYPE_ICON_THEME    (xfce_icon_theme_get_type())
 #define XFCE_ICON_THEME(obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), XFCE_TYPE_ICON_THEME, XfceIconTheme))
@@ -60,7 +60,7 @@ struct _XfceIconThemeClass
 	gpointer (*_xfce_reserved2)();
 };
 
-GType xfce_icon_theme_get_type          () G_GNUC_CONST;
+GType xfce_icon_theme_get_type          (void) G_GNUC_CONST;
 
 XfceIconTheme *xfce_icon_theme_get_for_screen
                                         (GdkScreen *screen) G_GNUC_DEPRECATED;
diff --git a/libxfcegui4/xfce-startup-notification.c b/libxfcegui4/xfce-startup-notification.c
index 4a05541..e9cb9e5 100644
--- a/libxfcegui4/xfce-startup-notification.c
+++ b/libxfcegui4/xfce-startup-notification.c
@@ -202,11 +202,13 @@ init(void)
 static void
 remove_startup_timeout (SnLauncherContext* sn_context)
 {
+    GSList* item;
+
     if (startup_timeout_data == NULL) {
         return;
     }
     
-    GSList* item = startup_timeout_data->contexts;
+    item = startup_timeout_data->contexts;
     while (item != NULL) {
       if (item->data == sn_context) {
         sn_launcher_context_unref (sn_context);
diff --git a/libxfcegui4/xfce-titled-dialog.c b/libxfcegui4/xfce-titled-dialog.c
index 9a12243..44b50fd 100644
--- a/libxfcegui4/xfce-titled-dialog.c
+++ b/libxfcegui4/xfce-titled-dialog.c
@@ -46,8 +46,6 @@ enum
 
 
 
-static void xfce_titled_dialog_class_init     (XfceTitledDialogClass  *klass);
-static void xfce_titled_dialog_init           (XfceTitledDialog       *titled_dialog);
 static void xfce_titled_dialog_finalize       (GObject                *object);
 static void xfce_titled_dialog_get_property   (GObject                *object,
                                                guint                   prop_id,
diff --git a/libxfcegui4/xfce_aboutdialog.c b/libxfcegui4/xfce_aboutdialog.c
index 904ed61..f82a701 100644
--- a/libxfcegui4/xfce_aboutdialog.c
+++ b/libxfcegui4/xfce_aboutdialog.c
@@ -537,8 +537,6 @@ struct _XfceAboutDialogPrivate
   GtkWidget *license_textview;
 };
 
-static void xfce_about_dialog_class_init(XfceAboutDialogClass *klass);
-static void xfce_about_dialog_init(XfceAboutDialog *dialog);
 static void xfce_about_dialog_finalize(GObject *object);
 
 
diff --git a/libxfcegui4/xfce_clock.c b/libxfcegui4/xfce_clock.c
index 240bf5b..02da633 100644
--- a/libxfcegui4/xfce_clock.c
+++ b/libxfcegui4/xfce_clock.c
@@ -260,9 +260,6 @@ static const unsigned char digits_bits[] = {
 
 /* Forward declarations */
 
-static void xfce_clock_class_init (XfceClockClass * klass);
-static void xfce_clock_init (XfceClock * clock);
-static void xfce_clock_destroy (GtkObject * object);
 static void xfce_clock_finalize (GObject * object);
 static void xfce_clock_realize (GtkWidget * widget);
 static void xfce_clock_size_request (GtkWidget * widget,
@@ -271,44 +268,15 @@ static void xfce_clock_size_allocate (GtkWidget * widget,
                                       GtkAllocation * allocation);
 static gint xfce_clock_expose (GtkWidget * widget, GdkEventExpose * event);
 static void xfce_clock_draw (GtkWidget * widget, GdkRectangle * area);
-static gint xfce_clock_timer (XfceClock * clock);
+static gint xfce_clock_timer (XfceClock * xfclock);
 static void xfce_clock_draw_internal (GtkWidget * widget,
                                       GdkRectangle * area);
 
-static void draw_digits (XfceClock * clock, GdkGC * gc, gint x, gint y,
+static void draw_digits (XfceClock * xfclock, GdkGC * gc, gint x, gint y,
                          gchar c);
 
 /* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_clock_get_type (void)
-{
-    static GtkType clock_type = 0;
-
-    if (!clock_type)
-    {
-        static const GTypeInfo clock_info = {
-            sizeof (XfceClockClass),
-            NULL,               /* base_init */
-            NULL,               /* base_finalize */
-            (GClassInitFunc) xfce_clock_class_init,
-            NULL,               /* class_finalize */
-            NULL,               /* class_data */
-            sizeof (XfceClock),
-            0,                  /* n_preallocs */
-            (GInstanceInitFunc) xfce_clock_init,
-            NULL                /* value_table */
-        };
-
-        clock_type =
-            g_type_register_static (GTK_TYPE_WIDGET, "XfceClock", &clock_info,
-                                    0);
-    }
-
-    return clock_type;
-}
+G_DEFINE_TYPE (XfceClock, xfce_clock, GTK_TYPE_WIDGET)
 
 static void
 xfce_clock_class_init (XfceClockClass * class)
@@ -321,9 +289,6 @@ xfce_clock_class_init (XfceClockClass * class)
     widget_class = (GtkWidgetClass *) class;
     gobject_class = G_OBJECT_CLASS (class);
 
-    parent_class = gtk_type_class (gtk_widget_get_type ());
-
-    object_class->destroy = xfce_clock_destroy;
     gobject_class->finalize = xfce_clock_finalize;
 
     widget_class->realize = xfce_clock_realize;
@@ -335,7 +300,7 @@ xfce_clock_class_init (XfceClockClass * class)
 static void
 xfce_clock_realize (GtkWidget * widget)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     GdkWindowAttr attributes;
     gint attributes_mask;
 
@@ -343,7 +308,7 @@ xfce_clock_realize (GtkWidget * widget)
     g_return_if_fail (XFCE_IS_CLOCK (widget));
 
     GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
     attributes.x = widget->allocation.x;
     attributes.y = widget->allocation.y;
@@ -366,23 +331,23 @@ xfce_clock_realize (GtkWidget * widget)
 
     gtk_style_set_background (widget->style, widget->window, widget->state);
 
-    if (!(clock->digits_bmap))
+    if (!(xfclock->digits_bmap))
     {
-        clock->digits_bmap =
+        xfclock->digits_bmap =
             gdk_bitmap_create_from_data (widget->window, (gchar*) digits_bits,
                                          DIGITS_WIDTH, DIGITS_HEIGHT);
     }
-    if (!(clock->timer))
+    if (!(xfclock->timer))
     {
-        clock->timer =
-            g_timeout_add_full (0, clock->interval,
+        xfclock->timer =
+            g_timeout_add_full (0, xfclock->interval,
                                 (GtkFunction) xfce_clock_timer,
-                                (gpointer) clock, NULL);
+                                (gpointer) xfclock, NULL);
     }
 }
 
 static void
-xfce_clock_init (XfceClock * clock)
+xfce_clock_init (XfceClock * xfclock)
 {
     time_t ticks;
     struct tm *tm;
@@ -393,25 +358,25 @@ xfce_clock_init (XfceClock * clock)
     h = tm->tm_hour;
     m = tm->tm_min;
     s = tm->tm_sec;
-    clock->hrs_angle = 2.5 * M_PI - (h % 12) * M_PI / 6 - m * M_PI / 360;
-    clock->min_angle = 2.5 * M_PI - m * M_PI / 30;
-    clock->sec_angle = 2.5 * M_PI - s * M_PI / 30;
-    clock->timer = 0;
-    clock->radius = 0;
-    clock->pointer_width = 0;
-    clock->mode = XFCE_CLOCK_ANALOG;
-    clock->military_time = 0;   /* use 12 hour mode by default */
-    clock->display_am_pm = 1;   /* display am or pm by default. */
-    clock->display_secs = 0;    /* do not display secs by default */
-    clock->interval = 100;      /* 1/10 seconds update interval by default */
-    clock->led_size = DIGIT_MEDIUM;
-    clock->digits_bmap = NULL;
-    clock->timer = 0;
-    clock->old_hour = 0;
-    clock->old_minute = 0;
-    clock->old_second = 0;
-    clock->show_formatted = 0;
-    clock->format_string = NULL;
+    xfclock->hrs_angle = 2.5 * M_PI - (h % 12) * M_PI / 6 - m * M_PI / 360;
+    xfclock->min_angle = 2.5 * M_PI - m * M_PI / 30;
+    xfclock->sec_angle = 2.5 * M_PI - s * M_PI / 30;
+    xfclock->timer = 0;
+    xfclock->radius = 0;
+    xfclock->pointer_width = 0;
+    xfclock->mode = XFCE_CLOCK_ANALOG;
+    xfclock->military_time = 0;   /* use 12 hour mode by default */
+    xfclock->display_am_pm = 1;   /* display am or pm by default. */
+    xfclock->display_secs = 0;    /* do not display secs by default */
+    xfclock->interval = 100;      /* 1/10 seconds update interval by default */
+    xfclock->led_size = DIGIT_MEDIUM;
+    xfclock->digits_bmap = NULL;
+    xfclock->timer = 0;
+    xfclock->old_hour = 0;
+    xfclock->old_minute = 0;
+    xfclock->old_second = 0;
+    xfclock->show_formatted = 0;
+    xfclock->format_string = NULL;
 }
 
 GtkWidget *
@@ -421,299 +386,289 @@ xfce_clock_new (void)
 }
 
 static void
-xfce_clock_destroy (GtkObject * object)
-{
-    g_return_if_fail (object != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (object));
-
-    if (GTK_OBJECT_CLASS (parent_class)->destroy)
-        (*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
 xfce_clock_finalize (GObject * object)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
 
     g_return_if_fail (object != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (object));
 
-    clock = XFCE_CLOCK (object);
+    xfclock = XFCE_CLOCK (object);
 
-    if (clock->format_string != NULL)
+    if (xfclock->format_string != NULL)
     {
-        g_free (clock->format_string);
-        clock->format_string = NULL;
+        g_free (xfclock->format_string);
+        xfclock->format_string = NULL;
     }
 
-    if (clock->digits_bmap)
+    if (xfclock->digits_bmap)
     {
-        g_object_unref (G_OBJECT (clock->digits_bmap));
-        clock->digits_bmap = NULL;
+        g_object_unref (G_OBJECT (xfclock->digits_bmap));
+        xfclock->digits_bmap = NULL;
     }
-    if (clock->timer)
+    if (xfclock->timer)
     {
-        g_source_remove (clock->timer);
-        clock->timer = 0;
+        g_source_remove (xfclock->timer);
+        xfclock->timer = 0;
     }
 
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+    G_OBJECT_CLASS (xfce_clock_parent_class)->finalize (object);
 }
 
 void
-xfce_clock_show_ampm (XfceClock * clock, gboolean show)
+xfce_clock_show_ampm (XfceClock * xfclock, gboolean show)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
-    clock->display_am_pm = show;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+    xfclock->display_am_pm = show;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 void
-xfce_clock_ampm_toggle (XfceClock * clock)
+xfce_clock_ampm_toggle (XfceClock * xfclock)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
-    if (clock->display_am_pm)
-        clock->display_am_pm = 0;
+    if (xfclock->display_am_pm)
+        xfclock->display_am_pm = 0;
     else
-        clock->display_am_pm = 1;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+        xfclock->display_am_pm = 1;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 gboolean
-xfce_clock_ampm_shown (XfceClock * clock)
+xfce_clock_ampm_shown (XfceClock * xfclock)
 {
-    g_return_val_if_fail (clock != NULL, FALSE);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), FALSE);
-    return (clock->display_am_pm);
+    g_return_val_if_fail (xfclock != NULL, FALSE);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), FALSE);
+    return (xfclock->display_am_pm);
 }
 
 void
-xfce_clock_show_secs (XfceClock * clock, gboolean show)
+xfce_clock_show_secs (XfceClock * xfclock, gboolean show)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
-    clock->display_secs = show;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
+    xfclock->display_secs = show;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 void
-xfce_clock_secs_toggle (XfceClock * clock)
+xfce_clock_secs_toggle (XfceClock * xfclock)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
-    if (clock->display_secs)
-        clock->display_secs = 0;
+    if (xfclock->display_secs)
+        xfclock->display_secs = 0;
     else
-        clock->display_secs = 1;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+        xfclock->display_secs = 1;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 gboolean
-xfce_clock_secs_shown (XfceClock * clock)
+xfce_clock_secs_shown (XfceClock * xfclock)
 {
-    g_return_val_if_fail (clock != NULL, FALSE);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), FALSE);
-    return (clock->display_secs);
+    g_return_val_if_fail (xfclock != NULL, FALSE);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), FALSE);
+    return (xfclock->display_secs);
 }
 
 void
-xfce_clock_show_military (XfceClock * clock, gboolean show)
+xfce_clock_show_military (XfceClock * xfclock, gboolean show)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
-    clock->military_time = show;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
+    xfclock->military_time = show;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 void
-xfce_clock_military_toggle (XfceClock * clock)
+xfce_clock_military_toggle (XfceClock * xfclock)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
-    if (clock->military_time)
+    if (xfclock->military_time)
     {
-        clock->military_time = 0;
-        xfce_clock_show_ampm (clock, 0);
+        xfclock->military_time = 0;
+        xfce_clock_show_ampm (xfclock, 0);
     }
     else
-        clock->military_time = 1;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+        xfclock->military_time = 1;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 gboolean
-xfce_clock_military_shown (XfceClock * clock)
+xfce_clock_military_shown (XfceClock * xfclock)
 {
-    g_return_val_if_fail (clock != NULL, FALSE);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), FALSE);
-    return (clock->military_time);
+    g_return_val_if_fail (xfclock != NULL, FALSE);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), FALSE);
+    return (xfclock->military_time);
 }
 
 void
-xfce_clock_set_interval (XfceClock * clock, guint interval)
+xfce_clock_set_interval (XfceClock * xfclock, guint interval)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
-    clock->interval = interval;
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
+    xfclock->interval = interval;
 
-    if (clock->timer)
+    if (xfclock->timer)
     {
-        g_source_remove (clock->timer);
-        clock->timer =
-            g_timeout_add_full (0, clock->interval,
+        g_source_remove (xfclock->timer);
+        xfclock->timer =
+            g_timeout_add_full (0, xfclock->interval,
                                 (GtkFunction) xfce_clock_timer,
-                                (gpointer) clock, NULL);
+                                (gpointer) xfclock, NULL);
     }
 }
 
 guint
-xfce_clock_get_interval (XfceClock * clock)
+xfce_clock_get_interval (XfceClock * xfclock)
 {
-    g_return_val_if_fail (clock != NULL, 0);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), 0);
-    return (clock->interval);
+    g_return_val_if_fail (xfclock != NULL, 0);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), 0);
+    return (xfclock->interval);
 }
 
 void
-xfce_clock_set_led_size (XfceClock * clock, XfceClockLedSize size)
+xfce_clock_set_led_size (XfceClock * xfclock, XfceClockLedSize size)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
-    clock->led_size = size;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
+    xfclock->led_size = size;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 XfceClockLedSize
-xfce_clock_get_led_size (XfceClock * clock)
+xfce_clock_get_led_size (XfceClock * xfclock)
 {
-    g_return_val_if_fail (clock != NULL, 0);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), 0);
-    return (clock->led_size);
+    g_return_val_if_fail (xfclock != NULL, 0);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), 0);
+    return (xfclock->led_size);
 }
 
 void
-xfce_clock_suspend (XfceClock * clock)
+xfce_clock_suspend (XfceClock * xfclock)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
-    if (clock->timer)
+    if (xfclock->timer)
     {
-        g_source_remove (clock->timer);
-        clock->timer = 0;
+        g_source_remove (xfclock->timer);
+        xfclock->timer = 0;
     }
 }
 
 void
-xfce_clock_resume (XfceClock * clock)
+xfce_clock_resume (XfceClock * xfclock)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
-    if (clock->timer)
+    if (xfclock->timer)
         return;
-    if (!(clock->interval))
+    if (!(xfclock->interval))
         return;
 
-    clock->timer =
-        g_timeout_add_full (0, clock->interval,
-                            (GtkFunction) xfce_clock_timer, (gpointer) clock,
+    xfclock->timer =
+        g_timeout_add_full (0, xfclock->interval,
+                            (GtkFunction) xfce_clock_timer, (gpointer) xfclock,
                             NULL);
 }
 
 void
-xfce_clock_set_digit_size (XfceClock * clock, XfceClockMode mode)
+xfce_clock_set_digit_size (XfceClock * xfclock, XfceClockMode mode)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
-    clock->mode = mode;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
+    xfclock->mode = mode;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 void
-xfce_clock_set_mode (XfceClock * clock, XfceClockMode mode)
+xfce_clock_set_mode (XfceClock * xfclock, XfceClockMode mode)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
-    clock->mode = mode;
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
+    xfclock->mode = mode;
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 void
-xfce_clock_toggle_mode (XfceClock * clock)
+xfce_clock_toggle_mode (XfceClock * xfclock)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
-    switch (clock->mode)
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
+    switch (xfclock->mode)
     {
         case XFCE_CLOCK_ANALOG:
-            clock->mode = XFCE_CLOCK_DIGITAL;
+            xfclock->mode = XFCE_CLOCK_DIGITAL;
             break;
         case XFCE_CLOCK_DIGITAL:
-            clock->mode = XFCE_CLOCK_LEDS;
+            xfclock->mode = XFCE_CLOCK_LEDS;
             break;
         case XFCE_CLOCK_LEDS:
         default:
-            clock->mode = XFCE_CLOCK_ANALOG;
+            xfclock->mode = XFCE_CLOCK_ANALOG;
     }
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (clock)))
+    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (xfclock)))
     {
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 }
 
 XfceClockMode
-xfce_clock_get_mode (XfceClock * clock)
+xfce_clock_get_mode (XfceClock * xfclock)
 {
-    g_return_val_if_fail (clock != NULL, 0);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), 0);
-    return (clock->mode);
+    g_return_val_if_fail (xfclock != NULL, 0);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), 0);
+    return (xfclock->mode);
 }
 
 void
-xfce_clock_set_format (XfceClock * clock, const gchar * format)
+xfce_clock_set_format (XfceClock * xfclock, const gchar * format)
 {
-    if (clock->format_string != NULL)
+    if (xfclock->format_string != NULL)
     {
-        g_free (clock->format_string);
-        clock->format_string = NULL;
+        g_free (xfclock->format_string);
+        xfclock->format_string = NULL;
     }
 
     if (format != NULL)
     {
-        clock->format_string = g_strdup (format);
+        xfclock->format_string = g_strdup (format);
     }
 }
 
@@ -740,7 +695,7 @@ static void
 xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
 {
     gchar buffer[256];
-    XfceClock *clock;
+    XfceClock *xfclock;
     guint ln = 0;
     guint width = 0;
     guint height = 0;
@@ -750,22 +705,22 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
     g_return_if_fail (widget != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (widget));
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
-    switch (clock->mode)
+    switch (xfclock->mode)
     {
         case XFCE_CLOCK_DIGITAL:
-            if (clock->show_formatted)
+            if (xfclock->show_formatted)
             {
                 time_t ticks = time (0);
                 struct tm *tm = localtime (&ticks);
 
                 xfce_clock_format_time_to_utf8 (buffer, sizeof(buffer), 
-                                                clock->format_string, tm);
+                                                xfclock->format_string, tm);
             }
-            else if (clock->military_time)
+            else if (xfclock->military_time)
             {
-                if (clock->display_secs)
+                if (xfclock->display_secs)
                 {
                     strcpy (buffer, "88:88:88");
                 }
@@ -774,9 +729,9 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
                     strcpy (buffer, "88:88");
                 }
             }
-            else if (clock->display_am_pm)
+            else if (xfclock->display_am_pm)
             {
-                if (clock->display_secs)
+                if (xfclock->display_secs)
                 {
                     strcpy (buffer, "88:88:88XX");
                 }
@@ -787,7 +742,7 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
             }
             else
             {
-                if (clock->display_secs)
+                if (xfclock->display_secs)
                 {
                     strcpy (buffer, "88:88:88");
                 }
@@ -803,9 +758,9 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
             g_object_unref (G_OBJECT (layout));
             break;
         case XFCE_CLOCK_LEDS:
-            if (clock->military_time)
+            if (xfclock->military_time)
             {
-                if (clock->display_secs)
+                if (xfclock->display_secs)
                 {
                     ln = 8;
                 }
@@ -814,9 +769,9 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
                     ln = 5;
                 }
             }
-            else if (clock->display_am_pm)
+            else if (xfclock->display_am_pm)
             {
-                if (clock->display_secs)
+                if (xfclock->display_secs)
                 {
                     ln = 9;
                 }
@@ -827,7 +782,7 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
             }
             else
             {
-                if (clock->display_secs)
+                if (xfclock->display_secs)
                 {
                     ln = 8;
                 }
@@ -836,17 +791,17 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
                     ln = 5;
                 }
             }
-            if (clock->led_size == DIGIT_HUGE)
+            if (xfclock->led_size == DIGIT_HUGE)
             {
                 width = ln * DIGITS_HUGE_WIDTH;
                 height = DIGITS_HUGE_HEIGHT;
             }
-            else if (clock->led_size == DIGIT_LARGE)
+            else if (xfclock->led_size == DIGIT_LARGE)
             {
                 width = ln * DIGITS_LARGE_WIDTH;
                 height = DIGITS_LARGE_HEIGHT;
             }
-            else if (clock->led_size == DIGIT_MEDIUM)
+            else if (xfclock->led_size == DIGIT_MEDIUM)
             {
                 width = ln * DIGITS_MEDIUM_WIDTH;
                 height = DIGITS_MEDIUM_HEIGHT;
@@ -869,7 +824,7 @@ xfce_clock_size_request (GtkWidget * widget, GtkRequisition * requisition)
 static void
 xfce_clock_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     gint size;
 
     g_return_if_fail (widget != NULL);
@@ -878,7 +833,7 @@ xfce_clock_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
 
 
     widget->allocation = *allocation;
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
     if (GTK_WIDGET_REALIZED (widget))
         gdk_window_move_resize (widget->window, allocation->x, allocation->y,
@@ -887,15 +842,15 @@ xfce_clock_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
 
     size = MIN (allocation->width, allocation->height);
 
-    clock->radius = size * 0.49;
-    clock->internal = size * 0.5;
-    clock->pointer_width = MAX (clock->radius / 5, 3);
+    xfclock->radius = size * 0.49;
+    xfclock->internal = size * 0.5;
+    xfclock->pointer_width = MAX (xfclock->radius / 5, 3);
 }
 
 static void
 draw_ticks (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     gint i;
     gdouble theta;
     gdouble s, c;
@@ -905,12 +860,12 @@ draw_ticks (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
     g_return_if_fail (widget != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (widget));
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
-    demi = clock->pointer_width / 2;
-    quarter = clock->pointer_width / 4;
+    demi = xfclock->pointer_width / 2;
+    quarter = xfclock->pointer_width / 4;
 
-    if (clock->pointer_width / 4 > 0)
+    if (xfclock->pointer_width / 4 > 0)
     {
         for (i = 0; i < 12; i++)
         {
@@ -918,16 +873,16 @@ draw_ticks (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
             s = sin (theta);
             c = cos (theta);
 
-            points[0].x = xc + s * (clock->radius - demi) - quarter;
-            points[0].y = yc + c * (clock->radius - demi) - quarter;
-            points[1].x = xc + s * (clock->radius - demi) - quarter;
-            points[1].y = yc + c * (clock->radius - demi) + quarter;
-            points[2].x = xc + s * (clock->radius - demi) + quarter;
-            points[2].y = yc + c * (clock->radius - demi) + quarter;
-            points[3].x = xc + s * (clock->radius - demi) + quarter;
-            points[3].y = yc + c * (clock->radius - demi) - quarter;
-            points[4].x = xc + s * (clock->radius - demi) - quarter;
-            points[4].y = yc + c * (clock->radius - demi) - quarter;
+            points[0].x = xc + s * (xfclock->radius - demi) - quarter;
+            points[0].y = yc + c * (xfclock->radius - demi) - quarter;
+            points[1].x = xc + s * (xfclock->radius - demi) - quarter;
+            points[1].y = yc + c * (xfclock->radius - demi) + quarter;
+            points[2].x = xc + s * (xfclock->radius - demi) + quarter;
+            points[2].y = yc + c * (xfclock->radius - demi) + quarter;
+            points[3].x = xc + s * (xfclock->radius - demi) + quarter;
+            points[3].y = yc + c * (xfclock->radius - demi) - quarter;
+            points[4].x = xc + s * (xfclock->radius - demi) - quarter;
+            points[4].y = yc + c * (xfclock->radius - demi) - quarter;
 
             gdk_draw_polygon (widget->window, gc, TRUE, points, 5);
         }
@@ -940,10 +895,10 @@ draw_ticks (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
             s = sin (theta);
             c = cos (theta);
 
-            gdk_draw_line (widget->window, gc, xc + s * (clock->radius - 1),
-                           yc + c * (clock->radius - 1),
-                           xc + s * (clock->radius + 1),
-                           yc + c * (clock->radius + 1));
+            gdk_draw_line (widget->window, gc, xc + s * (xfclock->radius - 1),
+                           yc + c * (xfclock->radius - 1),
+                           xc + s * (xfclock->radius + 1),
+                           yc + c * (xfclock->radius + 1));
         }
     }
 }
@@ -951,7 +906,7 @@ draw_ticks (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 static void
 draw_sec_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     GdkPoint points[6];
     gdouble s, c;
     gdouble width;
@@ -960,18 +915,18 @@ draw_sec_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
     g_return_if_fail (XFCE_IS_CLOCK (widget));
     g_return_if_fail (gc != NULL);
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
-    s = sin (clock->sec_angle);
-    c = cos (clock->sec_angle);
-    width = (gdouble) MAX (clock->pointer_width / 3, 1);
+    s = sin (xfclock->sec_angle);
+    c = cos (xfclock->sec_angle);
+    width = (gdouble) MAX (xfclock->pointer_width / 3, 1);
 
     points[0].x = xc + s * width;
     points[0].y = yc + c * width;
-    points[1].x = xc + c * clock->radius + s * 0.5;
-    points[1].y = yc - s * clock->radius + c * 0.5;
-    points[2].x = xc + c * clock->radius - s * 0.5;
-    points[2].y = yc - s * clock->radius - c * 0.5;
+    points[1].x = xc + c * xfclock->radius + s * 0.5;
+    points[1].y = yc - s * xfclock->radius + c * 0.5;
+    points[2].x = xc + c * xfclock->radius - s * 0.5;
+    points[2].y = yc - s * xfclock->radius - c * 0.5;
     points[3].x = xc - s * width;
     points[3].y = yc - c * width;
     points[4].x = xc - c * width;
@@ -985,7 +940,7 @@ draw_sec_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 static void
 draw_min_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     GdkPoint points[6];
     gdouble s, c;
     gdouble width;
@@ -994,18 +949,18 @@ draw_min_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
     g_return_if_fail (XFCE_IS_CLOCK (widget));
     g_return_if_fail (gc != NULL);
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
-    s = sin (clock->min_angle);
-    c = cos (clock->min_angle);
-    width = (gdouble) MAX (clock->pointer_width / 2, 1);
+    s = sin (xfclock->min_angle);
+    c = cos (xfclock->min_angle);
+    width = (gdouble) MAX (xfclock->pointer_width / 2, 1);
 
     points[0].x = xc + s * width;
     points[0].y = yc + c * width;
-    points[1].x = xc + 3.0 * c * clock->radius / 4.0 + s * 0.5;
-    points[1].y = yc - 3.0 * s * clock->radius / 4.0 + c * 0.5;
-    points[2].x = xc + 3.0 * c * clock->radius / 4.0 - s * 0.5;
-    points[2].y = yc - 3.0 * s * clock->radius / 4.0 - c * 0.5;
+    points[1].x = xc + 3.0 * c * xfclock->radius / 4.0 + s * 0.5;
+    points[1].y = yc - 3.0 * s * xfclock->radius / 4.0 + c * 0.5;
+    points[2].x = xc + 3.0 * c * xfclock->radius / 4.0 - s * 0.5;
+    points[2].y = yc - 3.0 * s * xfclock->radius / 4.0 - c * 0.5;
     points[3].x = xc - s * width;
     points[3].y = yc - c * width;
     points[4].x = xc - c * width;
@@ -1019,7 +974,7 @@ draw_min_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 static void
 draw_hrs_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     GdkPoint points[6];
     gdouble s, c;
     gdouble width;
@@ -1028,18 +983,18 @@ draw_hrs_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
     g_return_if_fail (XFCE_IS_CLOCK (widget));
     g_return_if_fail (gc != NULL);
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
-    s = sin (clock->hrs_angle);
-    c = cos (clock->hrs_angle);
-    width = (gdouble) MAX (clock->pointer_width / 2, 1);
+    s = sin (xfclock->hrs_angle);
+    c = cos (xfclock->hrs_angle);
+    width = (gdouble) MAX (xfclock->pointer_width / 2, 1);
 
     points[0].x = xc + s * width;
     points[0].y = yc + c * width;
-    points[1].x = xc + 2.0 * c * clock->radius / 5.0 + s * 0.5;
-    points[1].y = yc - 2.0 * s * clock->radius / 5.0 + c * 0.5;
-    points[2].x = xc + 2.0 * c * clock->radius / 5.0 - s * 0.5;
-    points[2].y = yc - 2.0 * s * clock->radius / 5.0 - c * 0.5;
+    points[1].x = xc + 2.0 * c * xfclock->radius / 5.0 + s * 0.5;
+    points[1].y = yc - 2.0 * s * xfclock->radius / 5.0 + c * 0.5;
+    points[2].x = xc + 2.0 * c * xfclock->radius / 5.0 - s * 0.5;
+    points[2].y = yc - 2.0 * s * xfclock->radius / 5.0 - c * 0.5;
     points[3].x = xc - s * width;
     points[3].y = yc - c * width;
     points[4].x = xc - c * width;
@@ -1054,7 +1009,7 @@ draw_hrs_pointer (GtkWidget * widget, GdkGC * gc, gint xc, gint yc)
 static void
 xfce_clock_draw_digital (GtkWidget * widget, GdkRectangle * area)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     time_t ticks;
     struct tm *tm;
     gint h, m, s;
@@ -1067,7 +1022,7 @@ xfce_clock_draw_digital (GtkWidget * widget, GdkRectangle * area)
     g_return_if_fail (widget != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (widget));
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
     ticks = time (0);
     tm = localtime (&ticks);
@@ -1080,7 +1035,7 @@ xfce_clock_draw_digital (GtkWidget * widget, GdkRectangle * area)
     if (h >= 12)
         ampm[0] = 'P';
 
-    if (!(clock->military_time))
+    if (!(xfclock->military_time))
     {
         if (h > 12)
             h -= 12;
@@ -1088,30 +1043,30 @@ xfce_clock_draw_digital (GtkWidget * widget, GdkRectangle * area)
             h = 12;
     }
 
-    if ((clock->show_formatted) &&
-        (clock->format_string != NULL) && 
-        (strlen (clock->format_string) != 0))
+    if ((xfclock->show_formatted) &&
+        (xfclock->format_string != NULL) && 
+        (strlen (xfclock->format_string) != 0))
     {
-        xfce_clock_format_time_to_utf8 (time_buf, sizeof(time_buf), clock->format_string, tm);
+        xfce_clock_format_time_to_utf8 (time_buf, sizeof(time_buf), xfclock->format_string, tm);
 
     }
-    else if (clock->military_time)
+    else if (xfclock->military_time)
     {
-        if (clock->display_secs)
+        if (xfclock->display_secs)
             sprintf (time_buf, "%d:%02d:%02d", h, m, s);
         else
             sprintf (time_buf, "%d:%02d", h, m);
     }
-    else if (clock->display_am_pm)
+    else if (xfclock->display_am_pm)
     {
-        if (clock->display_secs)
+        if (xfclock->display_secs)
             sprintf (time_buf, "%d:%02d:%02d %s", h, m, s, ampm);
         else
             sprintf (time_buf, "%d:%02d %s", h, m, ampm);
     }
     else
     {
-        if (clock->display_secs)
+        if (xfclock->display_secs)
             sprintf (time_buf, "%d:%02d:%02d", h, m, s);
         else
             sprintf (time_buf, "%d:%02d", h, m);
@@ -1161,35 +1116,35 @@ xfce_clock_draw_digital (GtkWidget * widget, GdkRectangle * area)
 }
 
 void
-xfce_clock_set_formatted_view (XfceClock * clock, gboolean formatted)
+xfce_clock_set_formatted_view (XfceClock * xfclock, gboolean formatted)
 {
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
-    clock->show_formatted = formatted;
+    xfclock->show_formatted = formatted;
 }
 
 gboolean
-xfce_clock_get_formatted_view (XfceClock * clock)
+xfce_clock_get_formatted_view (XfceClock * xfclock)
 {
-    g_return_val_if_fail (clock != NULL, 0);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), 0);
+    g_return_val_if_fail (xfclock != NULL, 0);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), 0);
 
-    return clock->show_formatted;
+    return xfclock->show_formatted;
 }
 
 
 static void
 xfce_clock_draw_analog (GtkWidget * widget, GdkRectangle * area)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
 
     gint xc, yc;
 
     g_return_if_fail (widget != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (widget));
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
     xc = widget->allocation.width / 2 + 1;
     yc = widget->allocation.height / 2 + 1;
@@ -1214,7 +1169,7 @@ xfce_clock_draw_analog (GtkWidget * widget, GdkRectangle * area)
     }
 
     /* 
-     * Here we decide arbitrary that if the clock widget is smaller than 
+     * Here we decide arbitrary that if the xfclock widget is smaller than 
      * 20 pixels, we don't draw the shadow.
      */
     if (MIN (xc, yc) >= 20)
@@ -1224,7 +1179,7 @@ xfce_clock_draw_analog (GtkWidget * widget, GdkRectangle * area)
                           yc);
         draw_min_pointer (widget, widget->style->dark_gc[widget->state], xc,
                           yc);
-        if (clock->display_secs)
+        if (xfclock->display_secs)
         {
             draw_sec_pointer (widget, widget->style->dark_gc[widget->state],
                               xc, yc);
@@ -1236,7 +1191,7 @@ xfce_clock_draw_analog (GtkWidget * widget, GdkRectangle * area)
                       yc - 1);
     draw_min_pointer (widget, widget->style->text_gc[widget->state], xc - 1,
                       yc - 1);
-    if (clock->display_secs)
+    if (xfclock->display_secs)
     {
         draw_sec_pointer (widget, widget->style->text_gc[widget->state],
                           xc - 1, yc - 1);
@@ -1258,7 +1213,7 @@ xfce_clock_draw_analog (GtkWidget * widget, GdkRectangle * area)
 static void
 xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
     time_t ticks;
     struct tm *tm;
     gint h, m, s;
@@ -1273,7 +1228,7 @@ xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
     g_return_if_fail (widget != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (widget));
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
     ticks = time (0);
     tm = localtime (&ticks);
@@ -1289,7 +1244,7 @@ xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
     else
         separator[0] = ' ';
 
-    if (!(clock->military_time))
+    if (!(xfclock->military_time))
     {
         if (h > 12)
             h -= 12;
@@ -1297,17 +1252,17 @@ xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
             h = 12;
     }
 
-    if (clock->military_time)
+    if (xfclock->military_time)
     {
-        if (clock->display_secs)
+        if (xfclock->display_secs)
             sprintf (time_buf, "%02d%s%02d%s%02d", h, separator, m, separator, s);
         else
             sprintf (time_buf, "%02d%s%02d", h, separator, m);
     }
-    else if (clock->display_am_pm)
+    else if (xfclock->display_am_pm)
     {
 
-        if (clock->display_secs)
+        if (xfclock->display_secs)
             sprintf (time_buf, "%02d%s%02d%s%02d%s", h, separator, m,
                      separator, s, ampm);
         else
@@ -1315,7 +1270,7 @@ xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
     }
     else
     {
-        if (clock->display_secs)
+        if (xfclock->display_secs)
             sprintf (time_buf, "%02d%s%02d%s%02d", h, separator, m,
                      separator, s);
         else
@@ -1327,17 +1282,17 @@ xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
     len = strlen (time_buf);
 
 
-    if (clock->led_size == DIGIT_HUGE)
+    if (xfclock->led_size == DIGIT_HUGE)
     {
         c_width = DIGITS_HUGE_WIDTH;
         c_height = DIGITS_HUGE_HEIGHT;
     }
-    else if (clock->led_size == DIGIT_LARGE)
+    else if (xfclock->led_size == DIGIT_LARGE)
     {
         c_width = DIGITS_LARGE_WIDTH;
         c_height = DIGITS_LARGE_HEIGHT;
     }
-    else if (clock->led_size == DIGIT_MEDIUM)
+    else if (xfclock->led_size == DIGIT_MEDIUM)
     {
         c_width = DIGITS_MEDIUM_WIDTH;
         c_height = DIGITS_MEDIUM_HEIGHT;
@@ -1380,9 +1335,9 @@ xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
 
     for (i = 0; i < len; i++)
     {
-        draw_digits (clock, widget->style->dark_gc[widget->state],
+        draw_digits (xfclock, widget->style->dark_gc[widget->state],
                      x + i * c_width + 1, y + 1, time_buf[i]);
-        draw_digits (clock, widget->style->text_gc[widget->state],
+        draw_digits (xfclock, widget->style->text_gc[widget->state],
                      x + i * c_width, y, time_buf[i]);
     }
 
@@ -1402,16 +1357,16 @@ xfce_clock_draw_leds (GtkWidget * widget, GdkRectangle * area)
 static void
 xfce_clock_draw_internal (GtkWidget * widget, GdkRectangle * area)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
 
     g_return_if_fail (widget != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (widget));
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
     if (GTK_WIDGET_DRAWABLE (widget))
     {
-        switch (clock->mode)
+        switch (xfclock->mode)
         {
             case XFCE_CLOCK_ANALOG:
                 xfce_clock_draw_analog (widget, area);
@@ -1444,57 +1399,57 @@ xfce_clock_expose (GtkWidget * widget, GdkEventExpose * event)
 static void
 xfce_clock_draw (GtkWidget * widget, GdkRectangle * area)
 {
-    XfceClock *clock;
+    XfceClock *xfclock;
 
     g_return_if_fail (widget != NULL);
     g_return_if_fail (XFCE_IS_CLOCK (widget));
     g_return_if_fail (GTK_WIDGET_DRAWABLE (widget));
     g_return_if_fail (!GTK_WIDGET_NO_WINDOW (widget));
 
-    clock = XFCE_CLOCK (widget);
+    xfclock = XFCE_CLOCK (widget);
 
     xfce_clock_draw_internal (widget, area);
 }
 
 static gint
-xfce_clock_timer (XfceClock * clock)
+xfce_clock_timer (XfceClock * xfclock)
 {
     time_t ticks;
     struct tm *tm;
     gint h, m, s;
 
-    g_return_val_if_fail (clock != NULL, FALSE);
-    g_return_val_if_fail (XFCE_IS_CLOCK (clock), FALSE);
+    g_return_val_if_fail (xfclock != NULL, FALSE);
+    g_return_val_if_fail (XFCE_IS_CLOCK (xfclock), FALSE);
 
     ticks = time (0);
     tm = localtime (&ticks);
     h = tm->tm_hour;
     m = tm->tm_min;
     s = tm->tm_sec;
-    if (!(((!((clock->display_secs) || (clock->mode == XFCE_CLOCK_LEDS)))
-           || (s == (gint)clock->old_second)) && (m == (gint)clock->old_minute)
-          && (h == (gint)clock->old_hour)))
+    if (!(((!((xfclock->display_secs) || (xfclock->mode == XFCE_CLOCK_LEDS)))
+           || (s == (gint)xfclock->old_second)) && (m == (gint)xfclock->old_minute)
+          && (h == (gint)xfclock->old_hour)))
     {
-        clock->old_hour = h;
-        clock->old_minute = m;
-        clock->old_second = s;
-        clock->hrs_angle = 2.5 * M_PI - (h % 12) * M_PI / 6 - m * M_PI / 360;
-        clock->min_angle = 2.5 * M_PI - m * M_PI / 30;
-        clock->sec_angle = 2.5 * M_PI - s * M_PI / 30;
-        gtk_widget_queue_draw (GTK_WIDGET (clock));
+        xfclock->old_hour = h;
+        xfclock->old_minute = m;
+        xfclock->old_second = s;
+        xfclock->hrs_angle = 2.5 * M_PI - (h % 12) * M_PI / 6 - m * M_PI / 360;
+        xfclock->min_angle = 2.5 * M_PI - m * M_PI / 30;
+        xfclock->sec_angle = 2.5 * M_PI - s * M_PI / 30;
+        gtk_widget_queue_draw (GTK_WIDGET (xfclock));
     }
 
     return TRUE;
 }
 
 static void
-draw_digits (XfceClock * clock, GdkGC * gc, gint x, gint y, gchar c)
+draw_digits (XfceClock * xfclock, GdkGC * gc, gint x, gint y, gchar c)
 {
     gint tsx, tsy, tsw, tsh;
     guint tc = 0;
 
-    g_return_if_fail (clock != NULL);
-    g_return_if_fail (XFCE_IS_CLOCK (clock));
+    g_return_if_fail (xfclock != NULL);
+    g_return_if_fail (XFCE_IS_CLOCK (xfclock));
 
     if ((c >= '0') && (c <= '9'))
         tc = c - '0';
@@ -1507,7 +1462,7 @@ draw_digits (XfceClock * clock, GdkGC * gc, gint x, gint y, gchar c)
     else
         return;
 
-    switch (clock->led_size)
+    switch (xfclock->led_size)
     {
         case DIGIT_HUGE:
             tsx = tc * DIGITS_HUGE_WIDTH;
@@ -1538,12 +1493,12 @@ draw_digits (XfceClock * clock, GdkGC * gc, gint x, gint y, gchar c)
             break;
     }
 
-    gdk_gc_set_stipple (gc, clock->digits_bmap);
+    gdk_gc_set_stipple (gc, xfclock->digits_bmap);
     gdk_gc_set_fill (gc, GDK_STIPPLED);
     gdk_gc_set_ts_origin (gc, DIGITS_WIDTH - tsx + x,
                           DIGITS_HEIGHT - tsy + y);
 
-    gdk_draw_rectangle (GTK_WIDGET (clock)->window, gc, TRUE, x, y, tsw, tsh);
+    gdk_draw_rectangle (GTK_WIDGET (xfclock)->window, gc, TRUE, x, y, tsw, tsh);
 
     gdk_gc_set_fill (gc, GDK_SOLID);
 
diff --git a/libxfcegui4/xfce_clock.h b/libxfcegui4/xfce_clock.h
index b48a69f..d33e100 100644
--- a/libxfcegui4/xfce_clock.h
+++ b/libxfcegui4/xfce_clock.h
@@ -28,7 +28,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define XFCE_TYPE_CLOCK (xfce_clock_get_type ())
 #define XFCE_CLOCK(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, xfce_clock_get_type (), XfceClock)
@@ -98,27 +98,28 @@ G_BEGIN_DECLS
 
     GtkType xfce_clock_get_type (void);
     GtkWidget *xfce_clock_new (void);
-    void xfce_clock_show_ampm (XfceClock * clock, gboolean show);
-    void xfce_clock_ampm_toggle (XfceClock * clock);
-    gboolean xfce_clock_ampm_shown (XfceClock * clock);
-    void xfce_clock_show_secs (XfceClock * clock, gboolean show);
-    void xfce_clock_secs_toggle (XfceClock * clock);
-    gboolean xfce_clock_secs_shown (XfceClock * clock);
-    void xfce_clock_show_military (XfceClock * clock, gboolean show);
-    void xfce_clock_military_toggle (XfceClock * clock);
-    gboolean xfce_clock_military_shown (XfceClock * clock);
-    void xfce_clock_set_interval (XfceClock * clock, guint interval);
-    guint xfce_clock_get_interval (XfceClock * clock);
-    void xfce_clock_set_led_size (XfceClock * clock, XfceClockLedSize size);
-    XfceClockLedSize xfce_clock_get_led_size (XfceClock * clock);
-    void xfce_clock_suspend (XfceClock * clock);
-    void xfce_clock_resume (XfceClock * clock);
-    void xfce_clock_set_mode (XfceClock * clock, XfceClockMode mode);
-    void xfce_clock_toggle_mode (XfceClock * clock);
-    void xfce_clock_set_format (XfceClock * clock, const gchar * format);
-    void xfce_clock_set_formatted_view (XfceClock * clock, gboolean formatted);
-    gboolean xfce_clock_get_formatted_view (XfceClock * clock);
-    XfceClockMode xfce_clock_get_mode (XfceClock * clock);
+    void xfce_clock_show_ampm (XfceClock * xfclock, gboolean show);
+    void xfce_clock_ampm_toggle (XfceClock * xfclock);
+    gboolean xfce_clock_ampm_shown (XfceClock * xfclock);
+    void xfce_clock_show_secs (XfceClock * xfclock, gboolean show);
+    void xfce_clock_secs_toggle (XfceClock * xfclock);
+    gboolean xfce_clock_secs_shown (XfceClock * xfclock);
+    void xfce_clock_show_military (XfceClock * xfclock, gboolean show);
+    void xfce_clock_military_toggle (XfceClock * xfclock);
+    gboolean xfce_clock_military_shown (XfceClock * xfclock);
+    void xfce_clock_set_interval (XfceClock * xfclock, guint interval);
+    guint xfce_clock_get_interval (XfceClock * xfclock);
+    void xfce_clock_set_led_size (XfceClock * xfclock, XfceClockLedSize size);
+    XfceClockLedSize xfce_clock_get_led_size (XfceClock * xfclock);
+    void xfce_clock_suspend (XfceClock * xfclock);
+    void xfce_clock_resume (XfceClock * xfclock);
+    void xfce_clock_set_digit_size (XfceClock * xfclock, XfceClockMode mode);
+    void xfce_clock_set_mode (XfceClock * xfclock, XfceClockMode mode);
+    void xfce_clock_toggle_mode (XfceClock * xfclock);
+    void xfce_clock_set_format (XfceClock * xfclock, const gchar * format);
+    void xfce_clock_set_formatted_view (XfceClock * xfclock, gboolean formatted);
+    gboolean xfce_clock_get_formatted_view (XfceClock * xfclock);
+    XfceClockMode xfce_clock_get_mode (XfceClock * xfclock);
 
 #endif /* !XFCE_DISABLE_DEPRECATED */
 
diff --git a/libxfcegui4/xfce_decorbutton.c b/libxfcegui4/xfce_decorbutton.c
index e303f69..54cfb85 100644
--- a/libxfcegui4/xfce_decorbutton.c
+++ b/libxfcegui4/xfce_decorbutton.c
@@ -56,9 +56,6 @@ static const unsigned char hide_dark_bits[] = {
 
 /* Forward declarations */
 
-static void xfce_decorbutton_class_init (XfceDecorbuttonClass * class);
-static void xfce_decorbutton_init (XfceDecorbutton * decorbutton);
-static void xfce_decorbutton_destroy (GtkObject * object);
 static void xfce_decorbutton_finalize (GObject * object);
 static void xfce_decorbutton_size_request (GtkWidget * widget,
 					   GtkRequisition * requisition);
@@ -67,36 +64,7 @@ static gint xfce_decorbutton_expose (GtkWidget * widget,
 static void xfce_decorbutton_draw (GtkWidget * widget, GdkRectangle * area);
 
 /* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_decorbutton_get_type (void)
-{
-    static GtkType decorbutton_type = 0;
-
-    if (!decorbutton_type)
-    {
-	static const GTypeInfo decorbutton_info = {
-	    sizeof (XfceDecorbuttonClass),
-	    NULL,		/* base_init */
-	    NULL,		/* base_finalize */
-	    (GClassInitFunc) xfce_decorbutton_class_init,
-	    NULL,		/* class_finalize */
-	    NULL,		/* class_data */
-	    sizeof (XfceDecorbutton),
-	    0,			/* n_preallocs */
-	    (GInstanceInitFunc) xfce_decorbutton_init,
-	    NULL		/* value_table */
-	};
-
-	decorbutton_type =
-	    g_type_register_static (GTK_TYPE_MISC, "XfceDecorbutton",
-				    &decorbutton_info, 0);
-    }
-
-    return decorbutton_type;
-}
+G_DEFINE_TYPE (XfceDecorbutton, xfce_decorbutton, GTK_TYPE_MISC)
 
 static void
 xfce_decorbutton_class_init (XfceDecorbuttonClass * class)
@@ -109,10 +77,7 @@ xfce_decorbutton_class_init (XfceDecorbuttonClass * class)
     widget_class = (GtkWidgetClass *) class;
     gobject_class = G_OBJECT_CLASS (class);
 
-    parent_class = gtk_type_class (gtk_misc_get_type ());
-
     widget_class->size_request = xfce_decorbutton_size_request;
-    object_class->destroy = xfce_decorbutton_destroy;
     gobject_class->finalize = xfce_decorbutton_finalize;
 
     widget_class->expose_event = xfce_decorbutton_expose;
@@ -142,16 +107,6 @@ xfce_decorbutton_new (XfceDecorbuttonType type)
 }
 
 static void
-xfce_decorbutton_destroy (GtkObject * object)
-{
-    g_return_if_fail (object != NULL);
-    g_return_if_fail (XFCE_IS_DECORBUTTON (object));
-
-    if (GTK_OBJECT_CLASS (parent_class)->destroy)
-	(*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
 xfce_decorbutton_finalize (GObject * object)
 {
     XfceDecorbutton *decorbutton;
@@ -191,7 +146,7 @@ xfce_decorbutton_finalize (GObject * object)
 	g_object_unref (G_OBJECT (decorbutton->hide_light_bmap));
 	decorbutton->hide_light_bmap = NULL;
     }
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+    G_OBJECT_CLASS (xfce_decorbutton_parent_class)->finalize (object);
 }
 
 static void
diff --git a/libxfcegui4/xfce_decorbutton.h b/libxfcegui4/xfce_decorbutton.h
index b8d7e8f..f3bb3dd 100644
--- a/libxfcegui4/xfce_decorbutton.h
+++ b/libxfcegui4/xfce_decorbutton.h
@@ -25,7 +25,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define XFCE_TYPE_DECORBUTTON          (xfce_decorbutton_get_type ())
 #define XFCE_DECORBUTTON(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, xfce_decorbutton_get_type (), XfceDecorbutton)
diff --git a/libxfcegui4/xfce_decortoggle.c b/libxfcegui4/xfce_decortoggle.c
index a575dba..4b45887 100644
--- a/libxfcegui4/xfce_decortoggle.c
+++ b/libxfcegui4/xfce_decortoggle.c
@@ -24,7 +24,7 @@
 #include <gdk/gdk.h>
 #include <gtk/gtkmisc.h>
 
-#include "xfce_decortoggle.h"
+#include <libxfcegui4/libxfcegui4.h>
 
 #define DECORTOGGLE_WIDTH  10
 #define DECORTOGGLE_HEIGHT 10
@@ -82,10 +82,6 @@ static const unsigned char arrow_right_light_bits[] = {
 };
 
 /* Forward declarations */
-
-static void xfce_decortoggle_class_init (XfceDecortoggleClass * class);
-static void xfce_decortoggle_init (XfceDecortoggle * decortoggle);
-static void xfce_decortoggle_destroy (GtkObject * object);
 static void xfce_decortoggle_finalize (GObject * object);
 static void xfce_decortoggle_size_request (GtkWidget * widget,
 					   GtkRequisition * requisition);
@@ -94,36 +90,7 @@ static gint xfce_decortoggle_expose (GtkWidget * widget,
 static void xfce_decortoggle_draw (GtkWidget * widget, GdkRectangle * area);
 
 /* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_decortoggle_get_type (void)
-{
-    static GtkType decortoggle_type = 0;
-
-    if (!decortoggle_type)
-    {
-	static const GTypeInfo decortoggle_info = {
-	    sizeof (XfceDecortoggleClass),
-	    NULL,		/* base_init */
-	    NULL,		/* base_finalize */
-	    (GClassInitFunc) xfce_decortoggle_class_init,
-	    NULL,		/* class_finalize */
-	    NULL,		/* class_data */
-	    sizeof (XfceDecortoggle),
-	    0,			/* n_preallocs */
-	    (GInstanceInitFunc) xfce_decortoggle_init,
-	    NULL		/* value_table */
-	};
-
-	decortoggle_type =
-	    g_type_register_static (GTK_TYPE_MISC, "XfceDecortoggle",
-				    &decortoggle_info, 0);
-    }
-
-    return decortoggle_type;
-}
+G_DEFINE_TYPE (XfceDecortoggle, xfce_decortoggle, GTK_TYPE_MISC)
 
 static void
 xfce_decortoggle_class_init (XfceDecortoggleClass * class)
@@ -136,10 +103,7 @@ xfce_decortoggle_class_init (XfceDecortoggleClass * class)
     widget_class = (GtkWidgetClass *) class;
     gobject_class = G_OBJECT_CLASS (class);
 
-    parent_class = gtk_type_class (gtk_misc_get_type ());
-
     widget_class->size_request = xfce_decortoggle_size_request;
-    object_class->destroy = xfce_decortoggle_destroy;
     gobject_class->finalize = xfce_decortoggle_finalize;
 
     widget_class->expose_event = xfce_decortoggle_expose;
@@ -178,16 +142,6 @@ xfce_decortoggle_new (GtkArrowType arrow_type)
 }
 
 static void
-xfce_decortoggle_destroy (GtkObject * object)
-{
-    g_return_if_fail (object != NULL);
-    g_return_if_fail (XFCE_IS_DECORTOGGLE (object));
-
-    if (GTK_OBJECT_CLASS (parent_class)->destroy)
-	(*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
 xfce_decortoggle_finalize (GObject * object)
 {
     XfceDecortoggle *decortoggle;
@@ -261,7 +215,7 @@ xfce_decortoggle_finalize (GObject * object)
 	decortoggle->arrow_right_light_bmap = NULL;
     }
     decortoggle->initialized = FALSE;
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+    G_OBJECT_CLASS (xfce_decortoggle_parent_class)->finalize (object);
 }
 
 static void
diff --git a/libxfcegui4/xfce_decortoggle.h b/libxfcegui4/xfce_decortoggle.h
index 2478b6e..bfe8034 100644
--- a/libxfcegui4/xfce_decortoggle.h
+++ b/libxfcegui4/xfce_decortoggle.h
@@ -66,7 +66,7 @@ G_BEGIN_DECLS
 	GtkMiscClass parent_class;
     };
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
     GtkType xfce_decortoggle_get_type (void);
     GtkWidget *xfce_decortoggle_new (GtkArrowType arrow_type);
diff --git a/libxfcegui4/xfce_framebox.c b/libxfcegui4/xfce_framebox.c
index ce33a52..d32175f 100644
--- a/libxfcegui4/xfce_framebox.c
+++ b/libxfcegui4/xfce_framebox.c
@@ -31,53 +31,18 @@
 
 /* Forward declarations */
 
-static void xfce_framebox_class_init (XfceFrameboxClass * class);
-
 /* Local data */
+G_DEFINE_TYPE (XfceFramebox, xfce_framebox, GTK_TYPE_FRAME)
 
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_framebox_get_type (void)
+static void
+xfce_framebox_class_init (XfceFrameboxClass * class)
 {
-    static GtkType framebox_type = 0;
-
-    if (!framebox_type)
-    {
-        static const GTypeInfo framebox_info = {
-            sizeof (XfceFrameboxClass),
-            NULL,               /* base_init */
-            NULL,               /* base_finalize */
-            (GClassInitFunc) xfce_framebox_class_init,
-            NULL,               /* class_finalize */
-            NULL,               /* class_data */
-            sizeof (XfceFramebox),
-            0,                  /* n_preallocs */
-            NULL,               /* instance_init */
-            NULL                /* value_table */
-        };
-
-        framebox_type =
-            g_type_register_static (GTK_TYPE_FRAME,
-                                    "XfceFramebox", &framebox_info,
-                                    0);
-    }
 
-    return framebox_type;
 }
 
 static void
-xfce_framebox_class_init (XfceFrameboxClass * class)
+xfce_framebox_init (XfceFramebox * box)
 {
-    GObjectClass *gobject_class = G_OBJECT_CLASS (class);
-    GtkObjectClass *object_class;
-    GtkWidgetClass *widget_class;
-
-    object_class = (GtkObjectClass *) class;
-    widget_class = (GtkWidgetClass *) class;
-    gobject_class = G_OBJECT_CLASS (class);
-
-    parent_class = gtk_type_class (gtk_frame_get_type ());
 }
 
 /**
diff --git a/libxfcegui4/xfce_framebox.h b/libxfcegui4/xfce_framebox.h
index eebd606..b54e841 100644
--- a/libxfcegui4/xfce_framebox.h
+++ b/libxfcegui4/xfce_framebox.h
@@ -25,7 +25,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 #define XFCE_TYPE_FRAMEBOX          (xfce_framebox_get_type())
 #define XFCE_FRAMEBOX(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, xfce_framebox_get_type (), XfceFramebox)
diff --git a/libxfcegui4/xfce_iconbutton.c b/libxfcegui4/xfce_iconbutton.c
index 4ba97a2..c114647 100644
--- a/libxfcegui4/xfce_iconbutton.c
+++ b/libxfcegui4/xfce_iconbutton.c
@@ -35,14 +35,7 @@
 /* XXX: this is used by gtkbutton. hope they won't change it soon ... */
 #define CHILD_SPACING 1
 
-/* Forward declarations */
-
-static void xfce_iconbutton_class_init (XfceIconbuttonClass * class);
-static void xfce_iconbutton_init (XfceIconbutton * iconbutton);
-
-/* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
+G_DEFINE_TYPE (XfceIconbutton, xfce_iconbutton, GTK_TYPE_BUTTON)
 
 /* workaround for http://bugzilla.gnome.org/show_bug.cgi?id=142417 */
 static void
@@ -58,38 +51,9 @@ _style_set_cb(GtkWidget *w, GtkStyle *prev_style, gpointer user_data)
     }
 }
 
-GtkType
-xfce_iconbutton_get_type (void)
-{
-    static GtkType iconbutton_type = 0;
-
-    if (!iconbutton_type)
-    {
-	static const GTypeInfo iconbutton_info = {
-	    sizeof (XfceIconbuttonClass),
-	    NULL,		/* base_init */
-	    NULL,		/* base_finalize */
-	    (GClassInitFunc) xfce_iconbutton_class_init,
-	    NULL,		/* class_finalize */
-	    NULL,		/* class_data */
-	    sizeof (XfceIconbutton),
-	    0,			/* n_preallocs */
-	    (GInstanceInitFunc) xfce_iconbutton_init,
-	    NULL		/* value_table */
-	};
-
-	iconbutton_type =
-	    g_type_register_static (GTK_TYPE_BUTTON, "XfceIconbutton",
-				    &iconbutton_info, 0);
-    }
-
-    return iconbutton_type;
-}
-
 static void
 xfce_iconbutton_class_init (XfceIconbuttonClass * class)
 {
-    parent_class = gtk_type_class (gtk_button_get_type ());
 }
 
 static void
diff --git a/libxfcegui4/xfce_menubutton.c b/libxfcegui4/xfce_menubutton.c
index 7133d8e..e9fc300 100644
--- a/libxfcegui4/xfce_menubutton.c
+++ b/libxfcegui4/xfce_menubutton.c
@@ -38,64 +38,21 @@
 #define CHILD_SPACING 1
 
 /* Forward declarations */
-
-static void xfce_menubutton_class_init (XfceMenubuttonClass * class);
-static void xfce_menubutton_init (XfceMenubutton * menubutton);
-static void xfce_menubutton_finalize (GObject * object);
-
 static void xfce_menubutton_size_allocate (GtkWidget * widget,
 					   GtkAllocation * allocation);
 
 static void hbox_style_set (GtkWidget * widget, GtkStyle * old);
 
 /* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_menubutton_get_type (void)
-{
-    static GtkType menubutton_type = 0;
-
-    if (!menubutton_type)
-    {
-	static const GTypeInfo menubutton_info = {
-	    sizeof (XfceMenubuttonClass),
-	    NULL,		/* base_init */
-	    NULL,		/* base_finalize */
-	    (GClassInitFunc) xfce_menubutton_class_init,
-	    NULL,		/* class_finalize */
-	    NULL,		/* class_data */
-	    sizeof (XfceMenubutton),
-	    0,			/* n_preallocs */
-	    (GInstanceInitFunc) xfce_menubutton_init,
-	    NULL		/* value_table */
-	};
-
-	menubutton_type =
-	    g_type_register_static (GTK_TYPE_BUTTON, "XfceMenubutton",
-				    &menubutton_info, 0);
-    }
-
-    return menubutton_type;
-}
+G_DEFINE_TYPE (XfceMenubutton, xfce_menubutton, GTK_TYPE_BUTTON)
 
 static void
 xfce_menubutton_class_init (XfceMenubuttonClass * class)
 {
-    GObjectClass *gobject_class = G_OBJECT_CLASS (class);
-    GtkObjectClass *object_class;
     GtkWidgetClass *widget_class;
 
-    object_class = (GtkObjectClass *) class;
     widget_class = (GtkWidgetClass *) class;
-    gobject_class = G_OBJECT_CLASS (class);
-
-    parent_class = gtk_type_class (gtk_button_get_type ());
-
     widget_class->size_allocate = xfce_menubutton_size_allocate;
-
-    gobject_class->finalize = xfce_menubutton_finalize;
 }
 
 static void
@@ -194,12 +151,6 @@ xfce_menubutton_set_stock_icon (XfceMenubutton * menubutton,
 }
 
 static void
-xfce_menubutton_finalize (GObject * object)
-{
-    G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
 xfce_menubutton_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
 {
     XfceMenubutton *menubutton;
@@ -238,7 +189,7 @@ xfce_menubutton_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
 				     menubutton->icon_size);
     }
 
-    parent_class->size_allocate (widget, allocation);
+    GTK_WIDGET_CLASS (xfce_menubutton_parent_class)->size_allocate (widget, allocation);
 
 #if DEBUGGING
     g_print (" ** xfce_menubutton.c: requested size: %d\n",
diff --git a/libxfcegui4/xfce_movehandler.c b/libxfcegui4/xfce_movehandler.c
index 5331e7f..cb8d90e 100644
--- a/libxfcegui4/xfce_movehandler.c
+++ b/libxfcegui4/xfce_movehandler.c
@@ -55,10 +55,7 @@ enum
 
 /* Forward declarations */
 
-static void xfce_movehandler_class_init (XfceMovehandlerClass * class);
 static void xfce_movehandler_realize (GtkWidget * widget);
-static void xfce_movehandler_init (XfceMovehandler * movehandler);
-static void xfce_movehandler_destroy (GtkObject * object);
 static void xfce_movehandler_finalize (GObject * object);
 static void xfce_movehandler_size_request (GtkWidget * widget,
 					   GtkRequisition * requisition);
@@ -73,36 +70,7 @@ static gint xfce_movehandler_motion (GtkWidget * widget,
 static guint signals[SIGNAL_LAST] = { 0 };
 
 /* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_movehandler_get_type (void)
-{
-    static GtkType movehandler_type = 0;
-
-    if (!movehandler_type)
-    {
-	static const GTypeInfo movehandler_info = {
-	    sizeof (XfceMovehandlerClass),
-	    NULL,		/* base_init */
-	    NULL,		/* base_finalize */
-	    (GClassInitFunc) xfce_movehandler_class_init,
-	    NULL,		/* class_finalize */
-	    NULL,		/* class_data */
-	    sizeof (XfceMovehandler),
-	    0,			/* n_preallocs */
-	    (GInstanceInitFunc) xfce_movehandler_init,
-	    NULL		/* value_table */
-	};
-
-	movehandler_type =
-	    g_type_register_static (GTK_TYPE_WIDGET, "XfceMovehandler",
-				    &movehandler_info, 0);
-    }
-
-    return movehandler_type;
-}
+G_DEFINE_TYPE (XfceMovehandler, xfce_movehandler, GTK_TYPE_WIDGET)
 
 static void
 xfce_movehandler_class_init (XfceMovehandlerClass * class)
@@ -115,9 +83,6 @@ xfce_movehandler_class_init (XfceMovehandlerClass * class)
     widget_class = (GtkWidgetClass *) class;
     gobject_class = G_OBJECT_CLASS (class);
 
-    parent_class = gtk_type_class (gtk_widget_get_type ());
-
-    object_class->destroy = xfce_movehandler_destroy;
     gobject_class->finalize = xfce_movehandler_finalize;
 
     widget_class->realize = xfce_movehandler_realize;
@@ -242,16 +207,6 @@ xfce_movehandler_set_move_func (XfceMovehandler *handler, XfceMoveFunc move,
 }
 
 static void
-xfce_movehandler_destroy (GtkObject * object)
-{
-    g_return_if_fail (object != NULL);
-    g_return_if_fail (XFCE_IS_MOVEHANDLER (object));
-
-    if (GTK_OBJECT_CLASS (parent_class)->destroy)
-	(*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
 xfce_movehandler_finalize (GObject * object)
 {
     XfceMovehandler *movehandler;
@@ -276,7 +231,7 @@ xfce_movehandler_finalize (GObject * object)
 	g_object_unref (G_OBJECT (movehandler->light_bmap));
 	movehandler->light_bmap = NULL;
     }
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+    G_OBJECT_CLASS (xfce_movehandler_parent_class)->finalize (object);
 }
 
 static void
diff --git a/libxfcegui4/xfce_scaled_image.c b/libxfcegui4/xfce_scaled_image.c
index 9a79ba3..0e0c5f9 100644
--- a/libxfcegui4/xfce_scaled_image.c
+++ b/libxfcegui4/xfce_scaled_image.c
@@ -32,11 +32,6 @@
 
 
 /* Forward declarations */
-
-static void xfce_scaled_image_class_init (XfceScaledImageClass * class);
-
-static void xfce_scaled_image_init (XfceScaledImage * image);
-
 static void xfce_scaled_image_finalize (GObject * object);
 
 static void xfce_scaled_image_size_allocate (GtkWidget * widget,
@@ -46,36 +41,7 @@ static gboolean xfce_scaled_image_scale (XfceScaledImage * image);
 
 
 /* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_scaled_image_get_type (void)
-{
-    static GtkType scaled_image_type = 0;
-
-    if (!scaled_image_type)
-    {
-	static const GTypeInfo scaled_image_info = {
-	    sizeof (XfceScaledImageClass),
-	    NULL,		/* base_init */
-	    NULL,		/* base_finalize */
-	    (GClassInitFunc) xfce_scaled_image_class_init,
-	    NULL,		/* class_finalize */
-	    NULL,		/* class_data */
-	    sizeof (XfceScaledImage),
-	    0,			/* n_preallocs */
-	    (GInstanceInitFunc) xfce_scaled_image_init,
-	    NULL		/* value_table */
-	};
-
-	scaled_image_type =
-	    g_type_register_static (GTK_TYPE_IMAGE, "XfceScaledImage",
-				    &scaled_image_info, 0);
-    }
-
-    return scaled_image_type;
-}
+G_DEFINE_TYPE (XfceScaledImage, xfce_scaled_image, GTK_TYPE_IMAGE)
 
 static void
 xfce_scaled_image_class_init (XfceScaledImageClass * class)
@@ -88,8 +54,6 @@ xfce_scaled_image_class_init (XfceScaledImageClass * class)
     widget_class = (GtkWidgetClass *) class;
     gobject_class = G_OBJECT_CLASS (class);
 
-    parent_class = gtk_type_class (gtk_image_get_type ());
-
     widget_class->size_allocate = xfce_scaled_image_size_allocate;
 
     gobject_class->finalize = xfce_scaled_image_finalize;
@@ -174,7 +138,7 @@ xfce_scaled_image_finalize (GObject * object)
 	image->pb = NULL;
     }
 
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+    G_OBJECT_CLASS (xfce_scaled_image_parent_class)->finalize (object);
 }
 
 static gboolean
@@ -218,7 +182,7 @@ xfce_scaled_image_size_allocate (GtkWidget * widget,
 	xfce_scaled_image_scale (image);
     }
     
-    GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
+    GTK_WIDGET_CLASS (xfce_scaled_image_parent_class)->size_allocate (widget, allocation);
 
 #if DEBUGGING
     g_print (" ** xfce_scaled_image.c: allocated size: %d x %d\n",
diff --git a/libxfcegui4/xfce_systemtray.c b/libxfcegui4/xfce_systemtray.c
index 482d9ce..fedc501 100644
--- a/libxfcegui4/xfce_systemtray.c
+++ b/libxfcegui4/xfce_systemtray.c
@@ -72,8 +72,6 @@ struct message
 };
 
 /* prototypes */
-static void xfce_system_tray_init (XfceSystemTray *);
-static void xfce_system_tray_class_init (XfceSystemTrayClass *);
 static void xfce_system_tray_finalize (GObject *);
 static void xfce_system_tray_dock_request (XClientMessageEvent *,
                                            XfceSystemTray *);
@@ -86,8 +84,6 @@ xfce_system_tray_opcode (XfceSystemTray *tray, GdkXEvent * xevent);
 static GdkFilterReturn
 xfce_system_tray_filter (GdkXEvent *xev, GdkEvent *event, gpointer data);
 
-/* */
-static GObjectClass *parent_class;
 
 /* */
 static guint tray_signals[LAST_SIGNAL];
@@ -105,34 +101,8 @@ xfce_system_tray_error_quark (void)
     return (quark);
 }
 
-GType
-xfce_system_tray_get_type (void)
-{
-    static GType xfce_system_tray_type = 0;
 
-    if (!xfce_system_tray_type)
-    {
-        static const GTypeInfo xfce_system_tray_info = {
-            sizeof (XfceSystemTrayClass),
-            NULL,		/* base_init */
-            NULL,		/* base_finalize */
-            (GClassInitFunc) xfce_system_tray_class_init,
-            NULL,		/* class_finalize */
-            NULL,		/* class_data */
-            sizeof (XfceSystemTray),
-            0,			/* n_preallocs */
-            (GInstanceInitFunc) xfce_system_tray_init,
-            NULL		/* value_table */
-        };
-
-        xfce_system_tray_type = g_type_register_static (G_TYPE_OBJECT,
-                                                        "XfceSystemTray",
-                                                        &xfce_system_tray_info,
-                                                        0);
-    }
-
-    return (xfce_system_tray_type);
-}
+G_DEFINE_TYPE (XfceSystemTray, xfce_system_tray, G_TYPE_OBJECT)
 
 static void
 xfce_system_tray_class_init (XfceSystemTrayClass * klass)
@@ -142,8 +112,6 @@ xfce_system_tray_class_init (XfceSystemTrayClass * klass)
     /* be sure to initialize the libraries i18n support first */
     _xfce_i18n_init ();
 
-    parent_class = g_type_class_peek_parent (klass);
-
     gobject_class = G_OBJECT_CLASS (klass);
     gobject_class->finalize = xfce_system_tray_finalize;
 
@@ -222,7 +190,7 @@ xfce_system_tray_finalize (GObject * object)
     g_list_free (tray->messages);
     g_hash_table_destroy (tray->sockets);
 
-    G_OBJECT_CLASS (parent_class)->finalize (object);
+    G_OBJECT_CLASS (xfce_system_tray_parent_class)->finalize (object);
 }
 
 
diff --git a/libxfcegui4/xfce_systemtray.h b/libxfcegui4/xfce_systemtray.h
index db98c60..edf580e 100644
--- a/libxfcegui4/xfce_systemtray.h
+++ b/libxfcegui4/xfce_systemtray.h
@@ -38,7 +38,7 @@
 
 G_BEGIN_DECLS
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 /*
  * Tray icons can send "opcodes" to the system tray. These are X client
diff --git a/libxfcegui4/xfce_togglebutton.c b/libxfcegui4/xfce_togglebutton.c
index 870a8b3..8793b62 100644
--- a/libxfcegui4/xfce_togglebutton.c
+++ b/libxfcegui4/xfce_togglebutton.c
@@ -24,66 +24,20 @@
 #include <gdk/gdk.h>
 #include <gtk/gtktogglebutton.h>
 
-/* needed so --enable-debug=full doesn't fail */
-#ifdef XFCE_DISABLE_DEPRECATED
-#undef XFCE_DISABLE_DEPRECATED
-#endif
 #include "xfce_decortoggle.h"
 
 #include "xfce_togglebutton.h"
 
 /* Forward declarations */
-
-static void xfce_togglebutton_class_init (XfceTogglebuttonClass * class);
-static void xfce_togglebutton_init (XfceTogglebutton * togglebutton);
 static void xfce_togglebutton_toggle (GtkWidget * widget,
 				      XfceTogglebutton * togglebutton);
 
 /* Local data */
-
-static GtkWidgetClass *parent_class = NULL;
-
-GtkType
-xfce_togglebutton_get_type (void)
-{
-    static GtkType togglebutton_type = 0;
-
-    if (!togglebutton_type)
-    {
-	static const GTypeInfo togglebutton_info = {
-	    sizeof (XfceTogglebuttonClass),
-	    NULL,		/* base_init */
-	    NULL,		/* base_finalize */
-	    (GClassInitFunc) xfce_togglebutton_class_init,
-	    NULL,		/* class_finalize */
-	    NULL,		/* class_data */
-	    sizeof (XfceTogglebutton),
-	    0,			/* n_preallocs */
-	    (GInstanceInitFunc) xfce_togglebutton_init,
-	    NULL		/* value_table */
-	};
-
-	togglebutton_type =
-	    g_type_register_static (GTK_TYPE_TOGGLE_BUTTON,
-				    "XfceTogglebutton", &togglebutton_info,
-				    0);
-    }
-
-    return togglebutton_type;
-}
+G_DEFINE_TYPE (XfceTogglebutton, xfce_togglebutton, GTK_TYPE_TOGGLE_BUTTON)
 
 static void
 xfce_togglebutton_class_init (XfceTogglebuttonClass * class)
 {
-    GObjectClass *gobject_class = G_OBJECT_CLASS (class);
-    GtkObjectClass *object_class;
-    GtkWidgetClass *widget_class;
-
-    object_class = (GtkObjectClass *) class;
-    widget_class = (GtkWidgetClass *) class;
-    gobject_class = G_OBJECT_CLASS (class);
-
-    parent_class = gtk_type_class (gtk_toggle_button_get_type ());
 }
 
 static void
diff --git a/libxfcegui4/xinerama.h b/libxfcegui4/xinerama.h
index b3a3db1..ea554cd 100644
--- a/libxfcegui4/xinerama.h
+++ b/libxfcegui4/xinerama.h
@@ -26,7 +26,7 @@
 
 G_BEGIN_DECLS;
 
-#ifndef XFCE_DISABLE_DEPRECATED
+#if defined(LIBXFCEGUI4_COMPILATION) || !defined(XFCE_DISABLE_DEPRECATED)
 
 gboolean xineramaInit (Display * dpy);
 void xineramaFree (void);



More information about the Xfce4-commits mailing list