Commit 1d1b1b00 authored by Nick Schermer's avatar Nick Schermer

* dialogs/mouse-settings/mouse-dialog.glade,

	  dialogs/mouse-settings/main.c,
	  dialogs/mouse-settings/Makefile.am,
	  xfce4-settings-helper/pointers.h,
	  xfce4-settings-helper/pointers.c: Merge multi pointer
	  branch code.
	* dialogs/keyboard-settings/main.c: Release the channels
	  after running the dialog.
	* xfce4-settings-helper/accessx.c, 
	  xfce4-settings-helper/accessx.h,
	  xfce4-settings-helper/xkb.c,
	  xfce4-settings-helper/xkb.h: Move code into objects. Will
	  make things look nice and allows the code to cleanup when
	  the objects are released in main.c.
	* xfce4-settings-helper/main.c: Use the objects and do some
	  more checking before running the dialog.
	* xfce4-settings-helper/accessx.c: Make disabling the mouse
	  keys work; don't call channel_get functions when not needed.
	* dialogs/keyboard-settings/main.c: Release the channels after
	  running the dialog, also destroy the dialog after using it.

(Old svn revision: 27274)
parent 82f323d3
2008-07-13 Nick Schermer <nick@xfce.org>
* dialogs/mouse-settings/mouse-dialog.glade,
dialogs/mouse-settings/main.c,
dialogs/mouse-settings/Makefile.am,
xfce4-settings-helper/pointers.h,
xfce4-settings-helper/pointers.c: Merge multi pointer
branch code.
* dialogs/keyboard-settings/main.c: Release the channels
after running the dialog.
* xfce4-settings-helper/accessx.c,
xfce4-settings-helper/accessx.h,
xfce4-settings-helper/xkb.c,
xfce4-settings-helper/xkb.h: Move code into objects. Will
make things look nice and allows the code to cleanup when
the objects are released in main.c.
* xfce4-settings-helper/main.c: Use the objects and do some
more checking before running the dialog.
* xfce4-settings-helper/accessx.c: Make disabling the mouse
keys work; don't call channel_get functions when not needed.
* dialogs/keyboard-settings/main.c: Release the channels after
running the dialog, also destroy the dialog after using it.
2008-07-11 Nick Schermer <nick@xfce.org>
* dialogs/mouse-settings/mouse-dialog.glade: Add some tooltips
......
......@@ -9,8 +9,6 @@ Keyboard settings (Jannis)
Mouse settings (Nick)
------------------------------------------------------------------------
* Integrate multi pointer branch.
* Make hal and libxcursor an optional dependency.
* Check dependency versions of libxi and libxcursor.
* Make it work a bit better with onyl 1 pointer.
* Move the device information into a separate xfconf channel.
* Fixup some of the Makefiles.
* Add signal watch to xfce4-setting-helper to quit the main loop when
receiving a sigterm.
dnl
dnl Copyright (c) 2006
dnl Copyright (c) 2006 - 2008
dnl The Xfce development team. All rights reserved.
dnl
dnl Originally written for Xfce by Benedikt Meurer <benny@xfce.org>
......@@ -21,52 +21,183 @@ dnl *** Debugging support for SVN snapshots ***
dnl *******************************************
m4_define([xfce4_settings_debug_default], [ifelse(xfce4_settings_version_tag(), [svn], [full], [minimum])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2008
The Xfce development team. All rights reserved.
Written for Xfce by Stephan Arts <stephan@xfce.org>.])
The Xfce development team. All rights reserved.])
AC_INIT([xfce4-settings], [xfce4_settings_version], [http://bugzilla.xfce.org/])
AC_PREREQ([2.50])
AC_REVISION([$Id])
XFCE4_SETTINGS_VERSION=xfce4_settings_version
AM_INIT_AUTOMAKE([xfce4-settings], [$XFCE4_SETTINGS_VERSION])
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
dnl check for UNIX variants
AC_AIX
AC_ISC_POSIX
AC_MINIX
AM_CONDITIONAL([HAVE_CYGWIN], [test "`uname | grep \"CYGWIN\"`" != ""])
dnl check for standard header files
AC_PROG_CC
AM_MAINTAINER_MODE()
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_AIX()
AC_ISC_POSIX()
AC_MINIX()
dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_PROG_LD()
AC_PROG_INSTALL()
AC_PROG_INTLTOOL([0.31], [no-xml])
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h math.h stdio.h stdlib.h])
dnl **************************
dnl *** Initialize libtool ***
dnl **************************
AC_PROG_LIBTOOL()
dnl Check for i18n support
XDT_I18N([@LINGUAS@])
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
AC_CHECK_HEADERS([errno.h memory.h math.h stdlib.h stdio.h string.h unistd.h])
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0])
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.12.0])
XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.34])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [0])
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.12.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.0])
XDT_CHECK_OPTIONAL_PACKAGE([GLADE], [libglade-2.0], [2.0.0])
XDT_CHECK_PACKAGE([LIBNOTIFY], [libnotify], [0.1.3])
dnl check for debugging support
XDT_FEATURE_DEBUG
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
XDT_CHECK_PACKAGE([GLADE], [libglade-2.0], [2.0.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [0])
XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.34])
XDT_CHECK_PACKAGE([XI], [xi], [1.1.0])
XDT_CHECK_PACKAGE([LIBX11], [x11], [1.1.0])
dnl **************************************
dnl *** Optional support for Libnotify ***
dnl **************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.1.3],
[libnotify], [Notification support])
dnl ********************************
dnl *** Optional support for HAL ***
dnl ********************************
XDT_CHECK_OPTIONAL_PACKAGE([HAL], [hal], [0.5.0],
[hal], [Hotplugging support])
dnl ************************************
dnl *** Optional support for Xcursor ***
dnl ************************************
XDT_CHECK_OPTIONAL_PACKAGE([XCURSOR], [xcursor], [1.1.0],
[xcursor], [Cursor themes support])
dnl *************************************
dnl *** Optional support for Xf86misc ***
dnl *************************************
XDT_CHECK_OPTIONAL_PACKAGE([XF86MISC], [libxxf86misc], [0.9.0],
[xf86misc], [Support for the X Miscellaneous extension wire protocol])
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=xfce4_settings_debug_default@:>@]),
[], [enable_debug=xfce4_settings_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 Print the result
AC_MSG_RESULT([$enable_debug])
dnl Make sure we detect possible errors (if supported)
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"
AC_MSG_CHECKING([whether $CC accepts -Wall -Werror])
AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
AC_MSG_RESULT([yes])
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall -Werror"
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
dnl Paranoia for --enable-debug=full
if test x"$enable_debug" = x"full"; then
dnl Enable extensive debugging
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_ENABLE_DEBUG"
dnl Use -O0 -g3 if the compiler supports it
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -O0 -g3"
AC_MSG_CHECKING([whether $CC accepts -O0 -g3])
AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
AC_MSG_RESULT([yes])
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
fi
else
dnl Print the result
AC_MSG_RESULT([$enable_debug])
dnl Disable debugging (release build)
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DNDEBUG"
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
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
AC_MSG_CHECKING([whether $LD accepts --as-needed])
case `$LD --as-needed -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
LDFLAGS="$LDFLAGS -Wl,--as-needed"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
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
dnl *********************************
dnl *** Substitute platform flags ***
dnl *********************************
AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
AC_SUBST([PLATFORM_CPPFLAGS])
AC_MSG_CHECKING([PLATFORM_CFLAGS])
AC_MSG_RESULT([$PLATFORM_CFLAGS])
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
AC_SUBST([PLATFORM_LDFLAGS])
AC_OUTPUT([
Makefile
......@@ -80,9 +211,27 @@ xfce4-settings-helper/Makefile
xfce4-settings-manager/Makefile
])
echo "----------------------------------------"
echo "$PACKAGE $VERSION"
echo ""
echo "The binary will be installed in $prefix/bin"
echo ""
echo "Configure finished, type 'make' to build."
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Installation prefix: $prefix"
echo "* Debug Support: $enable_debug"
if test x"$LIBNOTIFY_FOUND" = x"yes"; then
echo "* Libnotify support: yes"
else
echo "* Libnotify support: no"
fi
if test x"$HAL_FOUND" = x"yes"; then
echo "* HAL support: yes"
else
echo "* HAL support: no"
fi
if test x"$XCURSOR_FOUND" = x"yes"; then
echo "* Xcursor support: yes"
else
echo "* Xcursor support: no"
fi
echo
......@@ -479,10 +479,6 @@ keyboard_settings_dialog_new_from_xml (GladeXML *gxml)
gtk_widget_show_all(dialog);
gtk_widget_hide(dialog);
g_object_unref (xsettings_channel);
g_object_unref (xkb_channel);
g_object_unref (kbd_channel);
return dialog;
}
......@@ -523,6 +519,13 @@ main(int argc, char **argv)
/* Create settings dialog and run it */
dialog = keyboard_settings_dialog_new_from_xml (gxml);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy (dialog);
g_object_unref (xsettings_channel);
g_object_unref (xkb_channel);
g_object_unref (kbd_channel);
xfconf_shutdown();
......
bin_PROGRAMS = xfce4-mouse-settings
xfce4_mouse_settings_SOURCES = \
main.c \
mouse-dialog_glade.h
mouse-dialog-glade.h
xfce4_mouse_settings_CFLAGS = \
$(GTK_CFLAGS) \
......@@ -10,6 +10,10 @@ xfce4_mouse_settings_CFLAGS = \
$(DBUS_GLIB_CFLAGS) \
$(LIBXFCEGUI4_CFLAGS) \
$(XFCONF_CFLAGS) \
$(XI_CFLAGS) \
$(XCURSOR_CFLAGS) \
$(HAL_CFLAGS) \
$(XFCONF_CFLAGS) \
-DDATADIR=\"$(datadir)\" \
-DSRCDIR=\"$(top_srcdir)\" \
-DLOCALEDIR=\"$(localedir)\"
......@@ -20,7 +24,10 @@ xfce4_mouse_settings_LDADD = \
$(GLADE_LIBS) \
$(DBUS_GLIB_LIBS) \
$(LIBXFCEGUI4_LIBS) \
$(XFCONF_LIBS)
$(XFCONF_LIBS) \
$(HAL_LIBS) \
$(XI_LIBS) \
$(XCURSOR_LIBS)
INCLUDES = \
-I${top_srcdir} \
......@@ -29,9 +36,9 @@ INCLUDES = \
if MAINTAINER_MODE
BUILT_SOURCES = \
mouse-dialog_glade.h
mouse-dialog-glade.h
mouse-dialog_glade.h: mouse-dialog.glade
mouse-dialog-glade.h: mouse-dialog.glade
exo-csource --static --name=mouse_dialog_glade $< >$@
endif
......
/*
* Copyright (c) 2008 Stephan Arts <stephan@xfce.org>
* Copyright (c) 2008 Nick Schermer <nick@xfce.org>
* Copyright (c) 2008 Mike Massonnet <mmassonnet@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -36,38 +34,61 @@
#endif
#include <X11/Xlib.h>
#include <X11/extensions/XInput.h>
#ifdef HAVE_XCURSOR
#include <X11/Xcursor/Xcursor.h>
#endif /* !HAVE_XCURSOR */
#ifdef HAVE_HAL
#include <dbus/dbus.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <hal/libhal.h>
#endif /* !HAVE_HAL */
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <glade/glade.h>
#include <xfconf/xfconf.h>
#include <libxfce4util/libxfce4util.h>
#include <libxfcegui4/libxfcegui4.h>
#include "mouse-dialog_glade.h"
#include "mouse-dialog-glade.h"
/* settings */
#ifdef HAVE_XCURSOR
#define PREVIEW_ROWS (3)
#define PREVIEW_COLUMNS (6)
#define PREVIEW_SIZE (24)
#define PREVIEW_SPACING (2)
#endif /* !HAVE_XCURSOR */
/* global setting channels */
XfconfChannel *xsettings_channel;
XfconfChannel *xdevices_channel;
/* treeview columns */
enum
{
COLUMN_THEME_PIXBUF,
COLUMN_THEME_PATH,
COLUMN_THEME_NAME,
COLUMN_THEME_REAL_NAME,
COLUMN_THEME_COMMENT,
N_THEME_COLUMNS
};
/* lock counter to avoid signals during updates */
static gint locked = 0;
/* the display for this window */
static GdkDisplay *display;
/* device update id */
static guint timeout_id = 0;
/* option entries */
static gboolean opt_version = FALSE;
static GOptionEntry option_entries[] =
{
{ "version", 'v', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_version, N_("Version information"), NULL },
{ NULL }
};
#ifdef HAVE_XCURSOR
/* icon names for the preview widget */
static const gchar *preview_names[] = {
"left_ptr", "left_ptr_watch", "watch", "hand2",
......@@ -81,22 +102,29 @@ static const gchar *preview_names[] = {
"top_side", "top_tee"
};
/* option entries */
static gboolean opt_version = FALSE;
static GOptionEntry option_entries[] =
enum
{
{ "version", 'v', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_version, N_("Version information"), NULL },
{ NULL }
COLUMN_THEME_PIXBUF,
COLUMN_THEME_PATH,
COLUMN_THEME_NAME,
COLUMN_THEME_DISPLAY_NAME,
COLUMN_THEME_COMMENT,
N_THEME_COLUMNS
};
#endif /* !HAVE_XCURSOR */
/* global xfconf channel */
static XfconfChannel *xsettings_channel;
enum
{
COLUMN_DEVICE_ICON,
COLUMN_DEVICE_NAME,
COLUMN_DEVICE_DISPLAY_NAME,
COLUMN_DEVICE_XID,
COLUMN_DEVICE_NBUTTONS,
N_DEVICE_COLUMNS
};
#ifdef HAVE_XCURSOR
static GdkPixbuf *
mouse_settings_themes_pixbuf_from_filename (const gchar *filename,
guint size)
......@@ -194,7 +222,7 @@ mouse_settings_themes_preview_icon (const gchar *path)
static void
mouse_settings_themes_preview_image (const gchar *path,
GtkWidget *image)
GtkImage *image)
{
GdkPixbuf *pixbuf;
GdkPixbuf *preview;
......@@ -257,25 +285,99 @@ mouse_settings_themes_preview_image (const gchar *path,
static GtkTreePath *
mouse_settings_themes_populate_store (GtkListStore *store)
static void
mouse_settings_themes_selection_changed (GtkTreeSelection *selection,
GladeXML *gxml)
{
const gchar *path;
gchar **basedirs;
gint i;
gchar *homedir;
GDir *dir;
const gchar *theme;
gchar *filename;
gchar *index_file;
XfceRc *rc;
const gchar *name;
const gchar *comment;
GtkTreeModel *model;
GtkTreeIter iter;
gint position = 0;
GdkPixbuf *pixbuf;
gchar *active_theme;
GtkTreePath *active_path = NULL;
gboolean has_selection;
gchar *path, *name;
GtkWidget *image;
has_selection = gtk_tree_selection_get_selected (selection, &model, &iter);
if (G_LIKELY (has_selection))
{
/* get theme information from model */
gtk_tree_model_get (model, &iter, COLUMN_THEME_PATH, &path,
COLUMN_THEME_NAME, &name, -1);
/* update the preview widget */
image = glade_xml_get_widget (gxml, "mouse-theme-preview");
mouse_settings_themes_preview_image (path, GTK_IMAGE (image));
/* write configuration (not during a lock) */
if (locked == 0)
xfconf_channel_set_string (xsettings_channel, "/Gtk/CursorThemeName", name);
/* cleanup */
g_free (path);
g_free (name);
}
}
static gint
mouse_settings_themes_sort_func (GtkTreeModel *model,
GtkTreeIter *a,
GtkTreeIter *b,
gpointer user_data)
{
gchar *name_a, *name_b;
gint retval;
/* get the names from the model */
gtk_tree_model_get (model, a, COLUMN_THEME_DISPLAY_NAME, &name_a, -1);
gtk_tree_model_get (model, b, COLUMN_THEME_DISPLAY_NAME, &name_b, -1);
/* make sure the names are not null */
if (G_UNLIKELY (name_a == NULL))
name_a = g_strdup ("");
if (G_UNLIKELY (name_b == NULL))
name_b = g_strdup ("");
/* sort the names but keep Default on top */
if (g_utf8_collate (name_a, _("Default")) == 0)
retval = -1;
else if (g_utf8_collate (name_b, _("Default")) == 0)
retval = 1;
else
retval = g_utf8_collate (name_a, name_b);
/* cleanup */
g_free (name_a);
g_free (name_b);
return retval;
}
static void
mouse_settings_themes_populate_store (GladeXML *gxml)
{
const gchar *path;
gchar **basedirs;
gint i;
gchar *homedir;
GDir *dir;
const gchar *theme;
gchar *filename;
gchar *index_file;
XfceRc *rc;
const gchar *name;
const gchar *comment;
GtkTreeIter iter;
gint position = 0;
GdkPixbuf *pixbuf;
gchar *active_theme;
GtkTreePath *active_path = NULL;
GtkListStore *store;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkWidget *treeview;
GtkTreeSelection *selection;
/* get the cursor paths */
#if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR < 1
......@@ -289,15 +391,18 @@ mouse_settings_themes_populate_store (GtkListStore *store)
/* get the active theme */
active_theme = xfconf_channel_get_string (xsettings_channel, "/Gtk/CursorThemeName", "default");
/* create the store */
store = gtk_list_store_new (N_THEME_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
/* insert default */
gtk_list_store_insert_with_values (store, &iter, position++,
COLUMN_THEME_NAME, "default",
COLUMN_THEME_REAL_NAME, _("Default"), -1);
COLUMN_THEME_DISPLAY_NAME, _("Default"), -1);
/* check if the users uses the default theme */
if (strcmp (active_theme, "default") == 0)
active_path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
/* store the default path, so we always select a theme */
active_path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
if (G_LIKELY (basedirs))
{
......@@ -337,12 +442,15 @@ mouse_settings_themes_populate_store (GtkListStore *store)
gtk_list_store_insert_with_values (store, &iter, position++,
COLUMN_THEME_PIXBUF, pixbuf,
COLUMN_THEME_NAME, theme,
COLUMN_THEME_REAL_NAME, theme,
COLUMN_THEME_DISPLAY_NAME, theme,
COLUMN_THEME_PATH, filename, -1);
/* check if this is the active theme, set the path */
if (strcmp (active_theme, theme) == 0 && active_path == NULL)
if (strcmp (active_theme, theme) == 0)
{
gtk_tree_path_free (active_path);
active_path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
}
/* release pixbuf */
if (G_LIKELY (pixbuf))
......@@ -368,7 +476,7 @@ mouse_settings_themes_populate_store (GtkListStore *store)
/* update store */
gtk_list_store_set (store, &iter,
COLUMN_THEME_REAL_NAME, name,
COLUMN_THEME_DISPLAY_NAME, name,
COLUMN_THEME_COMMENT, comment, -1);
}
......@@ -400,155 +508,536 @@ mouse_settings_themes_populate_store (GtkListStore *store)
/* cleanup */
g_free (active_theme);
return active_path;
/* set the treeview store */
treeview = glade_xml_get_widget (gxml, "mouse-theme-treeview");
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
#if GTK_CHECK_VERSION (2, 12, 0)