[Xfce4-commits] r27049 - in xfce-mcs-plugins/branches/xfce-plugins-stephan: . dialogs dialogs/accessibility-settings dialogs/keyboard-settings dialogs/mouse-settings

Stephan Arts stephan at xfce.org
Thu Jun 12 00:12:01 CEST 2008


Author: stephan
Date: 2008-06-11 22:12:01 +0000 (Wed, 11 Jun 2008)
New Revision: 27049

Added:
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/Makefile.am
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/accessibility-dialog.glade
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/main.c
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/xfce4-accessibility-settings.desktop.in
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/Makefile.am
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/keyboard-dialog.glade
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/main.c
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/xfce4-keyboard-settings.desktop.in
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/Makefile.am
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/main.c
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/mouse-dialog.glade
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/xfce4-mouse-settings.desktop.in
Modified:
   xfce-mcs-plugins/branches/xfce-plugins-stephan/configure.ac.in
   xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/Makefile.am
Log:
Add skeletons for the accessibility, keyboard and mouse settings



Modified: xfce-mcs-plugins/branches/xfce-plugins-stephan/configure.ac.in
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/configure.ac.in	2008-06-10 22:27:18 UTC (rev 27048)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/configure.ac.in	2008-06-11 22:12:01 UTC (rev 27049)
@@ -68,6 +68,9 @@
 po/Makefile.in
 dialogs/Makefile
 dialogs/appearance-settings/Makefile
+dialogs/accessibility-settings/Makefile
+dialogs/keyboard-settings/Makefile
+dialogs/mouse-settings/Makefile
 plugins/Makefile
 ])
 

Modified: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/Makefile.am
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/Makefile.am	2008-06-10 22:27:18 UTC (rev 27048)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/Makefile.am	2008-06-11 22:12:01 UTC (rev 27049)
@@ -1,2 +1,5 @@
 SUBDIRS = \
-	appearance-settings
+	appearance-settings \
+	accessibility-settings \
+	keyboard-settings \
+	mouse-settings

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/Makefile.am
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/Makefile.am	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/Makefile.am	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,47 @@
+bin_PROGRAMS = xfce4-accessibility-settings 
+
+xfce4_accessibility_settings_SOURCES = \
+	main.c \
+	accessibility-dialog.glade.h
+
+xfce4_accessibility_settings_CFLAGS = \
+	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(GLADE_CFLAGS) \
+	$(DBUS_GLIB_CFLAGS) \
+	$(LIBXFCEGUI4_CFLAGS) \
+	$(XFCONF_CFLAGS) \
+	-DDATADIR=\"$(datadir)\" \
+	-DSRCDIR=\"$(top_srcdir)\" \
+	-DLOCALEDIR=\"$(localedir)\"
+
+xfce4_accessibility_settings_LDADD = \
+	$(GTK_LIBS) \
+	$(GLIB_LIBS) \
+	$(GLADE_LIBS) \
+	$(DBUS_GLIB_LIBS) \
+	$(LIBXFCEGUI4_LIBS) \
+	$(XFCONF_LIBS)
+
+INCLUDES = \
+	-I${top_srcdir}
+
+if MAINTAINER_MODE
+
+BUILT_SOURCES = \
+accessibility-dialog.glade.h
+
+accessibility-dialog.glade.h: accessibility-dialog.glade
+	exo-csource --static --name=accessibility_dialog_glade $< >$@
+
+endif
+
+desktopdir = $(datadir)/applications
+desktop_in_files = xfce4-accessibility-settings.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ at INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = \
+	$(desktop_in_files)							\
+	accessibility-dialog.glade
+

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/accessibility-dialog.glade
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/accessibility-dialog.glade	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/accessibility-dialog.glade	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Thu Jun 12 00:10:34 2008 -->
+<glade-interface>
+  <requires lib="xfce4"/>
+  <widget class="GtkDialog" id="accessibility-settings-dialog">
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="XfceHeading" id="xfce-heading1">
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="icon_name">preferences-desktop-accessibility</property>
+                <property name="title" translatable="yes">Accessibility settings</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkNotebook" id="notebook1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Keyboard</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Mouse</property>
+                  </widget>
+                  <packing>
+                    <property name="type">tab</property>
+                    <property name="position">1</property>
+                    <property name="tab_fill">False</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_EDGE</property>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/main.c
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/main.c	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/main.c	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,107 @@
+/*
+ *  Copyright (c) 2008 Stephan Arts <stephan at 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <string.h>
+
+#include <glib.h>
+
+#if defined(GETTEXT_PACKAGE)
+#include <glib/gi18n-lib.h>
+#else
+#include <glib/gi18n.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include <libxfcegui4/libxfcegui4.h>
+#include <xfconf/xfconf.h>
+#include "accessibility-dialog.glade.h"
+
+typedef struct {
+    GtkWidget *slave;
+    XfconfChannel *channel;
+} PropertyPair;
+
+gboolean version = FALSE;
+
+static GOptionEntry entries[] =
+{
+    {    "version", 'v', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &version,
+        N_("Version information"),
+        NULL
+    },
+    { NULL }
+};
+
+GtkWidget *
+accessibility_settings_dialog_new_from_xml (GladeXML *gxml)
+{
+    XfconfChannel *xsettings_channel = xfconf_channel_new("xsettings");
+
+    GtkWidget *dialog = glade_xml_get_widget (gxml, "accessibility-settings-dialog");
+    gtk_widget_show_all(dialog);
+    gtk_widget_hide(dialog);
+    return dialog;
+}
+
+int
+main(int argc, char **argv)
+{
+    GladeXML *gxml;
+    XfconfChannel *channel;
+    GError *cli_error = NULL;
+    gchar *data_dirs = NULL;
+
+    #ifdef ENABLE_NLS
+    bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+    textdomain (GETTEXT_PACKAGE);
+    #endif
+
+    if(!gtk_init_with_args(&argc, &argv, _("."), entries, PACKAGE, &cli_error))
+    {
+        if (cli_error != NULL)
+        {
+            g_print (_("%s: %s\nTry %s --help to see a full list of available command line options.\n"), PACKAGE, cli_error->message, PACKAGE_NAME);
+            g_error_free (cli_error);
+            return 1;
+        }
+    }
+
+    if(version)
+    {
+        g_print("%s\n", PACKAGE_STRING);
+        return 0;
+    }
+
+    xfconf_init(NULL);
+
+    gxml = glade_xml_new_from_buffer (accessibility_dialog_glade,
+                                      accessibility_dialog_glade_length,
+                                      NULL, NULL);
+
+    GtkWidget *dialog = accessibility_settings_dialog_new_from_xml (gxml);
+
+    gtk_dialog_run(GTK_DIALOG(dialog));
+
+    xfconf_shutdown();
+
+    return 0;
+}

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/xfce4-accessibility-settings.desktop.in
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/xfce4-accessibility-settings.desktop.in	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/accessibility-settings/xfce4-accessibility-settings.desktop.in	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+_Name=Xfce 4 Appearance Settings
+_GenericName=Appearance Settings
+_Comment= Appearance Settings (themes and fonts)
+Exec=xfce4-appearance-settings
+Icon=preferences-desktop-theme
+Terminal=false
+Type=Application
+Categories=X-XFCE;Settings;DesktopSettings;
+StartupNotify=true
+OnlyShowIn=XFCE;

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/Makefile.am
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/Makefile.am	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/Makefile.am	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,47 @@
+bin_PROGRAMS = xfce4-keyboard-settings 
+
+xfce4_keyboard_settings_SOURCES = \
+	main.c \
+	keyboard-dialog.glade.h
+
+xfce4_keyboard_settings_CFLAGS = \
+	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(GLADE_CFLAGS) \
+	$(DBUS_GLIB_CFLAGS) \
+	$(LIBXFCEGUI4_CFLAGS) \
+	$(XFCONF_CFLAGS) \
+	-DDATADIR=\"$(datadir)\" \
+	-DSRCDIR=\"$(top_srcdir)\" \
+	-DLOCALEDIR=\"$(localedir)\"
+
+xfce4_keyboard_settings_LDADD = \
+	$(GTK_LIBS) \
+	$(GLIB_LIBS) \
+	$(GLADE_LIBS) \
+	$(DBUS_GLIB_LIBS) \
+	$(LIBXFCEGUI4_LIBS) \
+	$(XFCONF_LIBS)
+
+INCLUDES = \
+	-I${top_srcdir}
+
+if MAINTAINER_MODE
+
+BUILT_SOURCES = \
+keyboard-dialog.glade.h
+
+keyboard-dialog.glade.h: keyboard-dialog.glade
+	exo-csource --static --name=keyboard_dialog_glade $< >$@
+
+endif
+
+desktopdir = $(datadir)/applications
+desktop_in_files = xfce4-keyboard-settings.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ at INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = \
+	$(desktop_in_files)							\
+	keyboard-dialog.glade
+

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/keyboard-dialog.glade
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/keyboard-dialog.glade	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/keyboard-dialog.glade	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Wed Jun 11 23:38:27 2008 -->
+<glade-interface>
+  <requires lib="xfce4"/>
+  <widget class="GtkDialog" id="keyboard-settings-dialog">
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="XfceHeading" id="xfce-heading1">
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="icon_name">preferences-desktop-keyboard</property>
+                <property name="title" translatable="yes">Keyboard settings</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkFixed" id="fixed1">
+                <property name="visible">True</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_EDGE</property>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/main.c
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/main.c	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/main.c	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,107 @@
+/*
+ *  Copyright (c) 2008 Stephan Arts <stephan at 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <string.h>
+
+#include <glib.h>
+
+#if defined(GETTEXT_PACKAGE)
+#include <glib/gi18n-lib.h>
+#else
+#include <glib/gi18n.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include <libxfcegui4/libxfcegui4.h>
+#include <xfconf/xfconf.h>
+#include "keyboard-dialog.glade.h"
+
+typedef struct {
+    GtkWidget *slave;
+    XfconfChannel *channel;
+} PropertyPair;
+
+gboolean version = FALSE;
+
+static GOptionEntry entries[] =
+{
+    {    "version", 'v', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &version,
+        N_("Version information"),
+        NULL
+    },
+    { NULL }
+};
+
+GtkWidget *
+keyboard_settings_dialog_new_from_xml (GladeXML *gxml)
+{
+    XfconfChannel *xsettings_channel = xfconf_channel_new("xsettings");
+
+    GtkWidget *dialog = glade_xml_get_widget (gxml, "keyboard-settings-dialog");
+    gtk_widget_show_all(dialog);
+    gtk_widget_hide(dialog);
+    return dialog;
+}
+
+int
+main(int argc, char **argv)
+{
+    GladeXML *gxml;
+    XfconfChannel *channel;
+    GError *cli_error = NULL;
+    gchar *data_dirs = NULL;
+
+    #ifdef ENABLE_NLS
+    bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+    textdomain (GETTEXT_PACKAGE);
+    #endif
+
+    if(!gtk_init_with_args(&argc, &argv, _("."), entries, PACKAGE, &cli_error))
+    {
+        if (cli_error != NULL)
+        {
+            g_print (_("%s: %s\nTry %s --help to see a full list of available command line options.\n"), PACKAGE, cli_error->message, PACKAGE_NAME);
+            g_error_free (cli_error);
+            return 1;
+        }
+    }
+
+    if(version)
+    {
+        g_print("%s\n", PACKAGE_STRING);
+        return 0;
+    }
+
+    xfconf_init(NULL);
+
+    gxml = glade_xml_new_from_buffer (keyboard_dialog_glade,
+                                      keyboard_dialog_glade_length,
+                                      NULL, NULL);
+
+    GtkWidget *dialog = keyboard_settings_dialog_new_from_xml (gxml);
+
+    gtk_dialog_run(GTK_DIALOG(dialog));
+
+    xfconf_shutdown();
+
+    return 0;
+}

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/xfce4-keyboard-settings.desktop.in
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/xfce4-keyboard-settings.desktop.in	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/keyboard-settings/xfce4-keyboard-settings.desktop.in	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+_Name=Xfce 4 Appearance Settings
+_GenericName=Appearance Settings
+_Comment= Appearance Settings (themes and fonts)
+Exec=xfce4-appearance-settings
+Icon=preferences-desktop-theme
+Terminal=false
+Type=Application
+Categories=X-XFCE;Settings;DesktopSettings;
+StartupNotify=true
+OnlyShowIn=XFCE;

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/Makefile.am
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/Makefile.am	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/Makefile.am	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,47 @@
+bin_PROGRAMS = xfce4-mouse-settings 
+
+xfce4_mouse_settings_SOURCES = \
+	main.c \
+	mouse-dialog.glade.h
+
+xfce4_mouse_settings_CFLAGS = \
+	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(GLADE_CFLAGS) \
+	$(DBUS_GLIB_CFLAGS) \
+	$(LIBXFCEGUI4_CFLAGS) \
+	$(XFCONF_CFLAGS) \
+	-DDATADIR=\"$(datadir)\" \
+	-DSRCDIR=\"$(top_srcdir)\" \
+	-DLOCALEDIR=\"$(localedir)\"
+
+xfce4_mouse_settings_LDADD = \
+	$(GTK_LIBS) \
+	$(GLIB_LIBS) \
+	$(GLADE_LIBS) \
+	$(DBUS_GLIB_LIBS) \
+	$(LIBXFCEGUI4_LIBS) \
+	$(XFCONF_LIBS)
+
+INCLUDES = \
+	-I${top_srcdir}
+
+if MAINTAINER_MODE
+
+BUILT_SOURCES = \
+mouse-dialog.glade.h
+
+mouse-dialog.glade.h: mouse-dialog.glade
+	exo-csource --static --name=mouse_dialog_glade $< >$@
+
+endif
+
+desktopdir = $(datadir)/applications
+desktop_in_files = xfce4-mouse-settings.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ at INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = \
+	$(desktop_in_files)							\
+	mouse-dialog.glade
+

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/main.c
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/main.c	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/main.c	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,107 @@
+/*
+ *  Copyright (c) 2008 Stephan Arts <stephan at 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <string.h>
+
+#include <glib.h>
+
+#if defined(GETTEXT_PACKAGE)
+#include <glib/gi18n-lib.h>
+#else
+#include <glib/gi18n.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include <libxfcegui4/libxfcegui4.h>
+#include <xfconf/xfconf.h>
+#include "mouse-dialog.glade.h"
+
+typedef struct {
+    GtkWidget *slave;
+    XfconfChannel *channel;
+} PropertyPair;
+
+gboolean version = FALSE;
+
+static GOptionEntry entries[] =
+{
+    {    "version", 'v', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &version,
+        N_("Version information"),
+        NULL
+    },
+    { NULL }
+};
+
+GtkWidget *
+mouse_settings_dialog_new_from_xml (GladeXML *gxml)
+{
+    XfconfChannel *xsettings_channel = xfconf_channel_new("xsettings");
+
+    GtkWidget *dialog = glade_xml_get_widget (gxml, "mouse-settings-dialog");
+    gtk_widget_show_all(dialog);
+    gtk_widget_hide(dialog);
+    return dialog;
+}
+
+int
+main(int argc, char **argv)
+{
+    GladeXML *gxml;
+    XfconfChannel *channel;
+    GError *cli_error = NULL;
+    gchar *data_dirs = NULL;
+
+    #ifdef ENABLE_NLS
+    bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+    textdomain (GETTEXT_PACKAGE);
+    #endif
+
+    if(!gtk_init_with_args(&argc, &argv, _("."), entries, PACKAGE, &cli_error))
+    {
+        if (cli_error != NULL)
+        {
+            g_print (_("%s: %s\nTry %s --help to see a full list of available command line options.\n"), PACKAGE, cli_error->message, PACKAGE_NAME);
+            g_error_free (cli_error);
+            return 1;
+        }
+    }
+
+    if(version)
+    {
+        g_print("%s\n", PACKAGE_STRING);
+        return 0;
+    }
+
+    xfconf_init(NULL);
+
+    gxml = glade_xml_new_from_buffer (mouse_dialog_glade,
+                                      mouse_dialog_glade_length,
+                                      NULL, NULL);
+
+    GtkWidget *dialog = mouse_settings_dialog_new_from_xml (gxml);
+
+    gtk_dialog_run(GTK_DIALOG(dialog));
+
+    xfconf_shutdown();
+
+    return 0;
+}

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/mouse-dialog.glade
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/mouse-dialog.glade	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/mouse-dialog.glade	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Wed Jun 11 23:46:02 2008 -->
+<glade-interface>
+  <requires lib="xfce4"/>
+  <widget class="GtkDialog" id="mouse-settings-dialog">
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="XfceHeading" id="xfce-heading1">
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="icon_name">preferences-desktop-peripherals</property>
+                <property name="title" translatable="yes">Mouse Settings</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkFixed" id="fixed1">
+                <property name="visible">True</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_EDGE</property>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/xfce4-mouse-settings.desktop.in
===================================================================
--- xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/xfce4-mouse-settings.desktop.in	                        (rev 0)
+++ xfce-mcs-plugins/branches/xfce-plugins-stephan/dialogs/mouse-settings/xfce4-mouse-settings.desktop.in	2008-06-11 22:12:01 UTC (rev 27049)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+_Name=Xfce 4 Appearance Settings
+_GenericName=Appearance Settings
+_Comment= Appearance Settings (themes and fonts)
+Exec=xfce4-appearance-settings
+Icon=preferences-desktop-theme
+Terminal=false
+Type=Application
+Categories=X-XFCE;Settings;DesktopSettings;
+StartupNotify=true
+OnlyShowIn=XFCE;



More information about the Xfce4-commits mailing list