mousetweaks r339 - in trunk: . data src



Author: gerdk
Date: Thu Oct 23 09:05:59 2008
New Revision: 339
URL: http://svn.gnome.org/viewvc/mousetweaks?rev=339&view=rev

Log:
2008-10-23  Gerd Kohlberger  <gerdk svn gnome org>
	
	Migrate to GtkBuilder and remove libglade dependency.

	* configure.ac: Remove libglade check.
	* src/mt-main.c:
	* src/mt-main.h:
	* src/mt-ctw.c:
	* src/mt-ctw.h:
	* src/dwell-click-applet.c:
	* src/pointer-capture-applet.c: Switch to GtkBuilder.
	* data/Makfile.am:
	* data/dwell-click-applet.ui:
	* data/pointer-capture-applet.ui:
	* data/mousetweaks.ui: New files.



Added:
   trunk/data/dwell-click-applet.ui
   trunk/data/mousetweaks.glade   (props changed)
      - copied unchanged from r332, /trunk/data/ctw.glade
   trunk/data/mousetweaks.ui
   trunk/data/pointer-capture-applet.ui
Removed:
   trunk/data/ctw.glade
Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/data/Makefile.am
   trunk/src/dwell-click-applet.c
   trunk/src/mt-ctw.c
   trunk/src/mt-ctw.h
   trunk/src/mt-main.c
   trunk/src/mt-main.h
   trunk/src/pointer-capture-applet.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Thu Oct 23 09:05:59 2008
@@ -38,7 +38,6 @@
 
 PKG_CHECK_MODULES(DEPENDENCIES,
 	gtk+-2.0 >= 2.13.1
-	libglade-2.0 >= 2.4.0
 	gconf-2.0 >= 2.16.0
 	dbus-glib-1 >= 0.7
 	cspi-1.0

Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am	(original)
+++ trunk/data/Makefile.am	Thu Oct 23 09:05:59 2008
@@ -1,12 +1,12 @@
 if BUILD_PCA
 pca_schemas = pointer-capture-applet.schemas.in
-pca_glade   = pointer-capture-applet.glade
+pca_ui      = pointer-capture-applet.ui
 pca_server  = PointerCapture_Factory.server.in
 pca_menu    = PointerCapture.xml
 endif
 
 if BUILD_DCA
-dca_glade  = dwell-click-applet.glade
+dca_ui     = dwell-click-applet.ui
 dca_server = DwellClick_Factory.server.in
 dca_menu   = DwellClick.xml
 endif
@@ -27,11 +27,11 @@
 	sed -e "s|\ bindir\@|$(bindir)|g" < $< > $@
 endif
 
-xmldir = $(datadir)/mousetweaks
-xml_DATA = ctw.glade $(pca_glade) $(dca_glade)
-
 uidir = $(datadir)/mousetweaks
-ui_DATA = $(pca_menu) $(dca_menu)
+ui_DATA = mousetweaks.ui $(pca_ui) $(dca_ui)
+
+menudir = $(datadir)/mousetweaks
+menu_DATA = $(pca_menu) $(dca_menu)
 
 @INTLTOOL_SCHEMAS_RULE@
 schemasdir = @GCONF_SCHEMA_FILE_DIR@
@@ -57,10 +57,10 @@
 endif
 
 EXTRA_DIST =		      \
-	$(xml_DATA)	      \
+	$(ui_DATA)	      \
 	$(schemas_in_files)   \
 	$(server_in_in_files) \
-	$(ui_DATA)
+	$(menu_DATA)
 
 DISTCLEANFILES =           \
 	$(server_DATA)     \

Added: trunk/data/dwell-click-applet.ui
==============================================================================
--- (empty file)
+++ trunk/data/dwell-click-applet.ui	Thu Oct 23 09:05:59 2008
@@ -0,0 +1,296 @@
+<?xml version="1.0"?>
+<!--Generated with glade3 3.4.5 on Thu Sep 11 10:22:25 2008 -->
+<interface>
+  <object class="GtkWindow" id="horizontal">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Click Type Window</property>
+    <child>
+      <object class="GtkHBox" id="box_hori">
+        <property name="visible">True</property>
+        <property name="spacing">4</property>
+        <child>
+          <object class="GtkToggleButton" id="enable">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="tooltip-text" translatable="yes">Enable dwell click</property>
+            <property name="label" translatable="yes">On</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVSeparator" id="vseparator1">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="ct_box">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkRadioButton" id="single_click">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Single Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="active">True</property>
+                <child>
+                  <object class="GtkImage" id="single_click_img">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="double_click">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Double Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="group">single_click</property>
+                <child>
+                  <object class="GtkImage" id="double_click_img">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="drag_click">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Drag Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="group">single_click</property>
+                <child>
+                  <object class="GtkImage" id="drag_click_img">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="right_click">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Right Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="group">single_click</property>
+                <child>
+                  <object class="GtkImage" id="right_click_img">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="vertical">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <child>
+      <object class="GtkVBox" id="box_vert">
+        <property name="visible">True</property>
+        <property name="spacing">4</property>
+        <child>
+          <object class="GtkToggleButton" id="enable_v">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="tooltip-text" translatable="yes">Enable dwell click</property>
+            <property name="label" translatable="yes">On</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHSeparator" id="hseparator1">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="ct_box_v">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <object class="GtkRadioButton" id="single_click_v">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Single Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="active">True</property>
+                <child>
+                  <object class="GtkImage" id="single_click_img_v">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="double_click_v">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Double Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="group">single_click_v</property>
+                <child>
+                  <object class="GtkImage" id="double_click_img_v">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="drag_click_v">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Drag Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="group">single_click_v</property>
+                <child>
+                  <object class="GtkImage" id="drag_click_img_v">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="right_click_v">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="tooltip-text" translatable="yes">Right Click</property>
+                <property name="relief">GTK_RELIEF_NONE</property>
+                <property name="focus_on_click">False</property>
+                <property name="image_position">GTK_POS_TOP</property>
+                <property name="group">single_click_v</property>
+                <child>
+                  <object class="GtkImage" id="right_click_img_v">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-missing-image</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAboutDialog" id="about">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title">Info zu</property>
+    <property name="resizable">False</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon_name">gnome-dev-mouse-optical</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <property name="copyright">Copyright 2007-2008 &#xA9; Gerd Kohlberger</property>
+    <property name="comments" translatable="yes">Applet to select different dwell-click types.
+Part of Mousetweaks</property>
+    <property name="authors">Gerd Kohlberger &lt;lowfi chello at&gt;</property>
+    <property name="documenters">Francesco Fumanti &lt;francesco fumanti gmx net&gt;</property>
+    <property name="translator_credits">GNOME Translation Team</property>
+    <property name="logo_icon_name">gnome-dev-mouse-optical</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>

Added: trunk/data/mousetweaks.ui
==============================================================================
--- (empty file)
+++ trunk/data/mousetweaks.ui	Thu Oct 23 09:05:59 2008
@@ -0,0 +1,200 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <object class="GtkUIManager" id="uimanager"/>
+  <object class="GtkMenu" id="popup">
+    <property name="visible">True</property>
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+  </object>
+  <object class="GtkWindow" id="ctw">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">4</property>
+    <property name="title" translatable="yes">Dwell Click Type</property>
+    <property name="icon_name">gnome-dev-mouse-optical</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <child>
+      <object class="GtkHBox" id="box">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <property name="homogeneous">True</property>
+        <child>
+          <object class="GtkRadioButton" id="single">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="relief">GTK_RELIEF_NONE</property>
+            <property name="image_position">GTK_POS_TOP</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">False</property>
+            <child>
+              <object class="GtkVBox" id="vbox13">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkImage" id="single_i">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">1</property>
+                    <property name="pixbuf">single-click.png</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="single_l">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">Single Click</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="double">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="relief">GTK_RELIEF_NONE</property>
+            <property name="image_position">GTK_POS_TOP</property>
+            <property name="draw_indicator">False</property>
+            <property name="group">single</property>
+            <child>
+              <object class="GtkVBox" id="vbox14">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkImage" id="double_i">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">1</property>
+                    <property name="pixbuf">double-click.png</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="double_l">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">Double Click</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="drag">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="relief">GTK_RELIEF_NONE</property>
+            <property name="image_position">GTK_POS_TOP</property>
+            <property name="draw_indicator">False</property>
+            <property name="group">single</property>
+            <child>
+              <object class="GtkVBox" id="vbox15">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkImage" id="drag_i">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">1</property>
+                    <property name="pixbuf">drag-click.png</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="drag_l">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">Drag Click</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="right">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="relief">GTK_RELIEF_NONE</property>
+            <property name="image_position">GTK_POS_TOP</property>
+            <property name="draw_indicator">False</property>
+            <property name="group">single</property>
+            <child>
+              <object class="GtkVBox" id="vbox16">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkImage" id="right_i">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">1</property>
+                    <property name="pixbuf">right-click.png</property>
+                    <property name="icon_size">5</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="right_l">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">Right Click</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>

Added: trunk/data/pointer-capture-applet.ui
==============================================================================
--- (empty file)
+++ trunk/data/pointer-capture-applet.ui	Thu Oct 23 09:05:59 2008
@@ -0,0 +1,513 @@
+<?xml version="1.0"?>
+<!--Generated with glade3 3.4.5 on Sun Jul  6 13:51:35 2008 -->
+<interface>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">3</property>
+    <property name="lower">0</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">0</property>
+    <property name="value">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">3</property>
+    <property name="lower">1</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">0</property>
+    <property name="value">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">200</property>
+    <property name="lower">20</property>
+    <property name="page_increment">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">0</property>
+    <property name="value">20</property>
+  </object>
+  <object class="GtkAboutDialog" id="about">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title">Info zu</property>
+    <property name="resizable">False</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon_name">gnome-dev-mouse-optical</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <property name="copyright">Copyright 2007-2008 &#xA9; Gerd Kohlberger</property>
+    <property name="comments" translatable="yes">Area to freeze the mouse pointer on the panel.
+Part of Mousetweaks</property>
+    <property name="authors">Gerd Kohlberger &lt;lowfi chello at&gt;</property>
+    <property name="documenters">Francesco Fumanti &lt;francesco fumanti gmx net&gt;</property>
+    <property name="translator_credits">GNOME Translation Team</property>
+    <property name="logo_icon_name">gnome-dev-mouse-optical</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkWindow" id="capture_preferences">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Pointer Capture Preferences</property>
+    <property name="resizable">False</property>
+    <property name="icon_name">gnome-dev-mouse-optical</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <child>
+      <object class="GtkVBox" id="vbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">24</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">18</property>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="top_padding">8</property>
+                    <property name="left_padding">18</property>
+                    <child>
+                      <object class="GtkTable" id="table1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">12</property>
+                        <property name="row_spacing">8</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox1">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkSpinButton" id="cap_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="tooltip-text" translatable="yes">Selecting Button 0 will capture the pointer immediately</property>
+                                <property name="max_length">1</property>
+                                <property name="adjustment">adjustment1</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label22">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="spacing">12</property>
+                            <child>
+                              <object class="GtkCheckButton" id="cap_ctrl">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">C_trl</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="cap_alt">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">_Alt</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="cap_shift">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">S_hift</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Modifier:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label10">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Mouse _button:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">cap_button</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Capture Pointer&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="top_padding">8</property>
+                    <property name="left_padding">18</property>
+                    <child>
+                      <object class="GtkTable" id="table5">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">12</property>
+                        <property name="row_spacing">8</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox6">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkSpinButton" id="rel_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="max_length">1</property>
+                                <property name="adjustment">adjustment2</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label4">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox4">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="spacing">12</property>
+                            <child>
+                              <object class="GtkCheckButton" id="rel_ctrl">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Ct_rl</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="rel_alt">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">A_lt</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="rel_shift">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Sh_ift</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label20">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Modifier:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label19">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Mouse b_utton:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">rel_button</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label21">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Release Pointer&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame4">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">GTK_SHADOW_NONE</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="top_padding">8</property>
+                    <property name="left_padding">18</property>
+                    <child>
+                      <object class="GtkHBox" id="hbox5">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="spacing">24</property>
+                        <child>
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Width:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">size</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox7">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="spacing">12</property>
+                            <child>
+                              <object class="GtkSpinButton" id="size">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="max_length">3</property>
+                                <property name="adjustment">adjustment3</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label2">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">pixels</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Size of Capture Area&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">GTK_BUTTONBOX_EDGE</property>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label">gtk-help</property>
+                <property name="use_stock">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="close">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label">gtk-close</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>

Modified: trunk/src/dwell-click-applet.c
==============================================================================
--- trunk/src/dwell-click-applet.c	(original)
+++ trunk/src/dwell-click-applet.c	Thu Oct 23 09:05:59 2008
@@ -16,20 +16,19 @@
  */
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <panel-applet.h>
 #include <gconf/gconf-client.h>
 #include <dbus/dbus-glib.h>
 
 #include "mt-common.h"
 
-#define WID(n) (glade_xml_get_widget (dd->xml, (n)))
+#define WID(n) (GTK_WIDGET (gtk_builder_get_object (dd->ui, n)))
 
 typedef struct _DwellData DwellData;
 struct _DwellData {
     GConfClient *client;
     DBusGProxy  *proxy;
-    GladeXML    *xml;
+    GtkBuilder  *ui;
     GtkWidget   *box;
     GtkWidget   *ct_box;
     GtkWidget   *enable;
@@ -186,9 +185,11 @@
 
     cr = gdk_cairo_create (widget->window);
     cairo_set_source_rgba (cr,
-			   c.red / 65535., c.green / 65535., c.blue / 65535.,
+			   c.red   / 65535.,
+			   c.green / 65535.,
+			   c.blue  / 65535.,
 			   0.5); 
-    cairo_rectangle (cr, x, y, w, (h * dd->elapsed) / dd->delay);
+    cairo_rectangle (cr, x, y, w, h * dd->elapsed / dd->delay);
     cairo_fill (cr);
     cairo_destroy (cr);
 
@@ -219,15 +220,13 @@
     DwellData *dd = data;
     GtkWidget *w;
     GdkPixbuf *tmp;
-    const gchar *name;
     gint i;
 
     if (dd->button_width == alloc->width &&
 	dd->button_height == alloc->height)
 	return;
 
-    name = glade_get_widget_name (dd->box);
-    if (g_str_equal (name, "box_vert")) {
+    if (g_str_equal (gtk_widget_get_name (dd->box), "box_vert")) {
 	/* vertical */
 	for (i = 0; i < N_CLICK_TYPES; i++) {
 	    w = WID (img_widgets_v[i]);
@@ -316,10 +315,11 @@
 	if (dd->click[i])
 	    g_object_unref (dd->click[i]);
 
+    g_object_unref (dd->ui);
     g_object_unref (dd->client);
     g_object_unref (dd->proxy);
-    g_object_unref (dd->xml);
     g_timer_destroy (dd->timer);
+
     g_slice_free (DwellData, dd);
 }
 
@@ -550,31 +550,38 @@
 fill_applet (PanelApplet *applet)
 {
     DwellData *dd;
+    GError *error = NULL;
     GtkWidget *about;
     PanelAppletOrient orient;
     gboolean dwell;
 
-    dd = g_slice_new0 (DwellData);
-    if (!dd)
-	return FALSE;
-
     bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
     bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
     textdomain (GETTEXT_PACKAGE);
 
-    g_set_application_name (_("Dwell Click Applet"));
+    g_set_application_name (_("Dwell Click"));
     gtk_window_set_default_icon_name (MT_ICON_NAME);
 
-    dd->xml = glade_xml_new (DATADIR "/dwell-click-applet.glade", NULL, NULL);
-    if (!dd->xml) {
+    dd = g_slice_new0 (DwellData);
+
+    /* user interface */
+    dd->ui = gtk_builder_new ();
+    gtk_builder_add_from_file (dd->ui, DATADIR "/dwell-click-applet.ui", &error);
+    if (error) {
+	g_print ("%s\n", error->message);
+	g_error_free (error);
+
+	g_object_unref (dd->ui);
 	g_slice_free (DwellData, dd);
+
 	return FALSE;
     }
 
     /* dbus */
     if (!setup_dbus_proxy (dd)) {
-	g_object_unref (dd->xml);
+	g_object_unref (dd->ui);
 	g_slice_free (DwellData, dd);
+
 	return FALSE;
     }
 

Modified: trunk/src/mt-ctw.c
==============================================================================
--- trunk/src/mt-ctw.c	(original)
+++ trunk/src/mt-ctw.c	Thu Oct 23 09:05:59 2008
@@ -18,14 +18,13 @@
  */
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 
 #include "mt-main.h"
 #include "mt-service.h"
 #include "mt-common.h"
 #include "mt-ctw.h"
 
-#define WID(n) (glade_xml_get_widget (xml, n))
+#define WID(n) (GTK_WIDGET (gtk_builder_get_object (mt->ui, n)))
 
 enum {
     BUTTON_STYLE_TEXT = 0,
@@ -33,10 +32,8 @@
     BUTTON_STYLE_BOTH
 };
 
-static GladeXML *xml = NULL;
-
 void
-mt_ctw_set_clicktype (guint clicktype)
+mt_ctw_set_clicktype (MTClosure *mt, guint clicktype)
 {
     GSList *group;
     gpointer data;
@@ -53,7 +50,7 @@
     GtkWidget *ctw;
     GdkScreen *screen;
 
-    ctw = mt_ctw_get_window ();
+    ctw = mt_ctw_get_window (mt);
 
     if (mt->dwell_enabled && mt->dwell_show_ctw) {
 	if (mt->n_screens > 1) {
@@ -78,7 +75,7 @@
 }
 
 void
-mt_ctw_update_style (gint style)
+mt_ctw_update_style (MTClosure *mt, gint style)
 {
     GtkWidget *icon, *label;
     const gchar *l[] = { "single_l", "double_l", "drag_l", "right_l" };
@@ -116,7 +113,7 @@
 static void
 ctw_button_cb (GtkToggleButton *button, gpointer data)
 {
-    MTClosure *mt = (MTClosure *) data;
+    MTClosure *mt = data;
 
     if (gtk_toggle_button_get_active (button)) {
 	GSList *group;
@@ -131,6 +128,8 @@
 static gboolean
 ctw_context_menu (GtkWidget *widget, GdkEventButton *bev, gpointer data)
 {
+    MTClosure *mt = data;
+
     if (bev->button == 3) {
 	gtk_menu_popup (GTK_MENU (WID ("popup")),
 			0, 0, 0, 0, bev->button, bev->time);
@@ -143,7 +142,7 @@
 static void
 ctw_menu_toggled (GtkCheckMenuItem *item, gpointer data)
 {
-    MTClosure *mt = (MTClosure *) data;
+    MTClosure *mt = data;
     GSList *group;
     gint index;
 
@@ -158,7 +157,7 @@
 static gboolean
 ctw_delete_cb (GtkWidget *win, GdkEvent *ev, gpointer data)
 {
-    MTClosure *mt = (MTClosure *) data;
+    MTClosure *mt = data;
 
     gconf_client_set_bool (mt->client, OPT_CTW, FALSE, NULL);
 
@@ -166,7 +165,7 @@
 }
 
 GtkWidget *
-mt_ctw_get_window (void)
+mt_ctw_get_window (MTClosure *mt)
 {
     return WID ("ctw");
 }
@@ -175,16 +174,25 @@
 mt_ctw_init (MTClosure *mt, gint x, gint y)
 {
     GtkWidget *ctw, *w;
+    GError *error = NULL;
     const gchar *b[] = { "single", "double", "drag", "right" };
     GSList *group;
     gpointer data;
     gint i;
 
-    xml = glade_xml_new (DATADIR "/ctw.glade", NULL, NULL);
-    if (!xml)
+    mt->ui = gtk_builder_new ();
+    gtk_builder_add_from_file (mt->ui, DATADIR "/mousetweaks.ui", &error);
+    if (error) {
+	g_print ("%s\n", error->message);
+	g_error_free (error);
+
+	g_object_unref (mt->ui);
+	mt->ui = NULL;
+
 	return FALSE;
+    }
 
-    ctw = mt_ctw_get_window ();
+    ctw = mt_ctw_get_window (mt);
     gtk_window_stick (GTK_WINDOW (ctw));
     gtk_window_set_keep_above (GTK_WINDOW (ctw), TRUE);
     g_signal_connect (ctw, "delete-event", G_CALLBACK (ctw_delete_cb), mt);
@@ -194,7 +202,7 @@
 	gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (w), FALSE);
 	g_signal_connect (w, "toggled", G_CALLBACK (ctw_button_cb), mt);
 	g_signal_connect (w, "button-press-event",
-			  G_CALLBACK (ctw_context_menu), NULL);
+			  G_CALLBACK (ctw_context_menu), mt);
     }
 
     g_signal_connect (WID ("text"), "toggled", 
@@ -209,7 +217,7 @@
     gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (data), TRUE);
 
     gtk_widget_realize (ctw);
-    mt_ctw_update_style (mt->style);
+    mt_ctw_update_style (mt, mt->style);
     mt_ctw_update_sensitivity (mt);
     mt_ctw_update_visibility (mt);
 

Modified: trunk/src/mt-ctw.h
==============================================================================
--- trunk/src/mt-ctw.h	(original)
+++ trunk/src/mt-ctw.h	Thu Oct 23 09:05:59 2008
@@ -27,11 +27,13 @@
 gboolean    mt_ctw_init               (MTClosure *mt,
 				       gint       x,
 				       gint       y);
-GtkWidget * mt_ctw_get_window         (void);
-void        mt_ctw_set_clicktype      (guint      ct);
+GtkWidget * mt_ctw_get_window         (MTClosure *mt);
+void        mt_ctw_set_clicktype      (MTClosure *mt,
+				       guint      ct);
 void        mt_ctw_update_sensitivity (MTClosure *mt);
 void        mt_ctw_update_visibility  (MTClosure *mt);
-void        mt_ctw_update_style       (gint       style);
+void        mt_ctw_update_style       (MTClosure *mt,
+				       gint       style);
 
 G_END_DECLS
 

Modified: trunk/src/mt-main.c
==============================================================================
--- trunk/src/mt-main.c	(original)
+++ trunk/src/mt-main.c	Thu Oct 23 09:05:59 2008
@@ -130,7 +130,7 @@
 dwell_restore_single_click (MTClosure *mt)
 {
     if (mt->dwell_mode == DWELL_MODE_CTW)
-	mt_ctw_set_clicktype (DWELL_CLICK_TYPE_SINGLE);
+	mt_ctw_set_clicktype (mt, DWELL_CLICK_TYPE_SINGLE);
 
     mt_service_set_clicktype (mt->service, DWELL_CLICK_TYPE_SINGLE, NULL);
 }
@@ -490,11 +490,12 @@
 }
 
 static gboolean
-cursor_overlay_time (guchar  *image,
-		     gint     width,
-		     gint     height,
-		     MtTimer *timer,
-		     gdouble  time)
+cursor_overlay_time (MTClosure *mt,
+		     guchar    *image,
+		     gint       width,
+		     gint       height,
+		     MtTimer   *timer,
+		     gdouble    time)
 {
     GtkWidget *ctw;
     GdkColor c;
@@ -515,7 +516,7 @@
 	return FALSE;
     }
 
-    ctw = mt_ctw_get_window ();
+    ctw = mt_ctw_get_window (mt);
     c = ctw->style->bg[GTK_STATE_SELECTED];
     target = mt_timer_get_target (timer);
 
@@ -534,33 +535,32 @@
 }
 
 static void
-mt_main_update_cursor (MtCursor *cursor,
-		       MtTimer  *timer,
-		       gdouble   time)
+mt_main_update_cursor (MTClosure *mt,
+		       MtTimer   *timer,
+		       gdouble    time)
 {
     guchar *image;
     gushort width, height;
 
-    image = mt_cursor_get_image_copy (cursor);
-    if (image == NULL)
+    image = mt_cursor_get_image_copy (mt->cursor);
+    if (!image)
 	return;
 
-    mt_cursor_get_dimension (cursor, &width, &height);
+    mt_cursor_get_dimension (mt->cursor, &width, &height);
 
-    if (cursor_overlay_time (image, width, height, timer, time)) {
+    if (cursor_overlay_time (mt, image, width, height, timer, time)) {
 	MtCursorManager *manager;
 	MtCursor *new_cursor;
 	const gchar *name;
 	gushort xhot, yhot;
 
-	name = mt_cursor_get_name (cursor);
-	mt_cursor_get_hotspot (cursor, &xhot, &yhot);
+	name = mt_cursor_get_name (mt->cursor);
+	mt_cursor_get_hotspot (mt->cursor, &xhot, &yhot);
 	new_cursor = mt_cursor_new (name, image, width, height, xhot, yhot);
 	manager = mt_cursor_manager_get_default ();
 	mt_cursor_manager_set_cursor (manager, new_cursor);
 	g_object_unref (new_cursor);
     }
-
     g_free (image);
 }
 
@@ -571,8 +571,8 @@
 {
     MTClosure *mt = data;
 
-    if (mt->animate_cursor && mt->cursor != NULL)
-	mt_main_update_cursor (mt->cursor, timer, time);
+    if (mt->animate_cursor && mt->cursor)
+	mt_main_update_cursor (mt, timer, time);
 }
 
 static void
@@ -634,7 +634,7 @@
     }
     else if (g_str_equal (key, OPT_STYLE) && value->type == GCONF_VALUE_INT) {
 	mt->style = gconf_value_get_int (value);
-	mt_ctw_update_style (mt->style);
+	mt_ctw_update_style (mt, mt->style);
     }
     else if (g_str_equal (key, OPT_G_SINGLE) && value->type == GCONF_VALUE_INT)
 	mt->dwell_dirs[DWELL_CLICK_TYPE_SINGLE] = gconf_value_get_int (value);
@@ -794,6 +794,11 @@
     g_object_unref (mt->service);
     g_object_unref (mt->client);
 
+    if (mt->ui) {
+	gtk_widget_destroy (mt_ctw_get_window (mt));
+	g_object_unref (mt->ui);
+    }
+
     g_slice_free (MTClosure, mt);
 }
 

Modified: trunk/src/mt-main.h
==============================================================================
--- trunk/src/mt-main.h	(original)
+++ trunk/src/mt-main.h	Thu Oct 23 09:05:59 2008
@@ -32,6 +32,8 @@
 typedef struct _MTClosure MTClosure;
 struct _MTClosure {
     GConfClient *client;
+    GtkBuilder  *ui;
+
     MtService   *service;
     MtTimer     *delay_timer;
     MtTimer     *dwell_timer;

Modified: trunk/src/pointer-capture-applet.c
==============================================================================
--- trunk/src/pointer-capture-applet.c	(original)
+++ trunk/src/pointer-capture-applet.c	Thu Oct 23 09:05:59 2008
@@ -16,12 +16,13 @@
  */
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <panel-applet.h>
 #include <panel-applet-gconf.h>
 
 #include "mt-common.h"
 
+#define WID(n) (GTK_WIDGET (gtk_builder_get_object (cd->ui, n)))
+
 #define TANGO_CHAMELEON_DARK  0.305f, 0.603f, 0.023f
 #define TANGO_SCARLETRED_DARK 0.643f, 0.000f, 0.000f
 #define TANGO_ALUMINIUM2_DARK 0.180f, 0.203f, 0.211f
@@ -29,25 +30,24 @@
 typedef struct _CaptureData CaptureData;
 struct _CaptureData {
     PanelApplet *applet;
+    GtkBuilder  *ui;
+    GtkWidget   *area;
 
-    GladeXML  *xml;
-    GtkWidget *area;
-    GtkWidget *prefs;
-
-    GdkCursor *null_cursor;
-    gboolean   pointer_locked;
-    gint       pointer_x;
-    gint       pointer_y;
-    gboolean   vertical;
-
-    gint  size;
-    gint  cap_button;
-    guint cap_mask;
-    gint  rel_button;
-    guint rel_mask;
+    GdkCursor   *null_cursor;
+    gboolean     pointer_locked;
+    gint         pointer_x;
+    gint         pointer_y;
+    gboolean     vertical;
+
+    /* options */
+    gint         size;
+    gint         cap_button;
+    guint        cap_mask;
+    gint         rel_button;
+    guint        rel_mask;
 };
 
-static void fini_capture_data (CaptureData *cd);
+static void capture_data_free (CaptureData *cd);
 
 static void
 capture_preferences (BonoboUIComponent *component,
@@ -56,7 +56,7 @@
 {
     CaptureData *cd = data;
 
-    gtk_window_present (GTK_WINDOW (cd->prefs));
+    gtk_window_present (GTK_WINDOW (WID ("capture_preferences")));
 }
 
 static void
@@ -73,7 +73,7 @@
 {
     CaptureData *cd = data;
 
-    gtk_window_present (GTK_WINDOW (glade_xml_get_widget (cd->xml, "about")));
+    gtk_window_present (GTK_WINDOW (WID ("about")));
 }
 
 static const BonoboUIVerb menu_verb[] = {
@@ -271,28 +271,28 @@
 static void
 applet_unrealize (GtkWidget *widget, gpointer data)
 {
-    fini_capture_data ((CaptureData *) data);
+    capture_data_free (data);
 }
 
 static void
 applet_orient_changed (PanelApplet *applet, guint orient, gpointer data)
 {
-    update_orientation ((CaptureData *) data, orient);
+    update_orientation (data, orient);
 }
 
 static void
 about_response (GtkButton *button, gint response, gpointer data)
 {
-    CaptureData *cd = (CaptureData *) data;
+    CaptureData *cd = data;
 
-    gtk_widget_hide (glade_xml_get_widget (cd->xml, "about"));
+    gtk_widget_hide (WID ("about"));
 }
 
 /* preferences dialog callbacks */
 static void
 prefs_size_changed (GtkSpinButton *spin, gpointer data)
 {
-    CaptureData *cd = (CaptureData *) data;
+    CaptureData *cd = data;
 
     cd->size = gtk_spin_button_get_value_as_int (spin);
     panel_applet_gconf_set_int (cd->applet, "size", cd->size, NULL);
@@ -303,7 +303,9 @@
 static void
 prefs_closed (GtkButton *button, gpointer data)
 {
-    gtk_widget_hide (((CaptureData *) data)->prefs);
+    CaptureData *cd = data;
+
+    gtk_widget_hide (WID ("capture_preferences"));
 }
 
 static void
@@ -413,66 +415,73 @@
 init_preferences (CaptureData *cd)
 {
     GtkWidget *w;
+    GError *error = NULL;
 
-    cd->xml = glade_xml_new (DATADIR "/pointer-capture-applet.glade",
-			     NULL, NULL);
-    if (!cd->xml)
+    cd->ui = gtk_builder_new ();
+    gtk_builder_add_from_file (cd->ui,
+			       DATADIR "/pointer-capture-applet.ui",
+			       &error);
+    if (error) {
+	g_print ("%s\n", error->message);
+	g_error_free (error);
 	return FALSE;
+    }
 
-    cd->prefs = glade_xml_get_widget (cd->xml, "capture_preferences");
-    g_signal_connect (cd->prefs, "delete-event",
+    g_signal_connect (WID ("capture_preferences"), "delete-event",
 		      G_CALLBACK (gtk_widget_hide_on_delete), NULL);
-
-    w = glade_xml_get_widget (cd->xml, "close");
-    g_signal_connect (w, "clicked",
+    g_signal_connect (WID ("close"), "clicked",
 		      G_CALLBACK (prefs_closed), cd);
-
-    w = glade_xml_get_widget (cd->xml, "help");
-    g_signal_connect (w, "clicked",
+    g_signal_connect (WID ("help"), "clicked",
 		      G_CALLBACK (prefs_help), NULL);
 
-    w = glade_xml_get_widget (cd->xml, "size");
+    w = WID ("size");
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), cd->size);
     g_signal_connect (w, "value_changed",
 		      G_CALLBACK (prefs_size_changed), cd);
 
     /* capture modifier signals */
-    w = glade_xml_get_widget (cd->xml, "cap_button");
+    w = WID ("cap_button");
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), cd->cap_button);
     g_signal_connect (w, "value_changed",
 		      G_CALLBACK (prefs_cap_button), cd);
-    w = glade_xml_get_widget (cd->xml, "cap_alt");
+
+    w = WID ("cap_alt");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
 				  (cd->cap_mask & GDK_MOD1_MASK));
     g_signal_connect (w, "toggled",
 		      G_CALLBACK (prefs_cap_alt), cd);
-    w = glade_xml_get_widget (cd->xml, "cap_shift");
+
+    w = WID ("cap_shift");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
 				  (cd->cap_mask & GDK_SHIFT_MASK));
     g_signal_connect (w, "toggled",
 		      G_CALLBACK (prefs_cap_shift), cd);
-    w = glade_xml_get_widget (cd->xml, "cap_ctrl");
+
+    w = WID ("cap_ctrl");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
 				  (cd->cap_mask & GDK_CONTROL_MASK));
     g_signal_connect (w, "toggled",
 		      G_CALLBACK (prefs_cap_ctrl), cd);
 
     /* release modifier signals */
-    w = glade_xml_get_widget (cd->xml, "rel_button");
+    w = WID ("rel_button");
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), cd->rel_button);
     g_signal_connect (w, "value_changed",
 		      G_CALLBACK (prefs_rel_button), cd);
-    w = glade_xml_get_widget (cd->xml, "rel_alt");
+
+    w = WID ("rel_alt");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
 				  (cd->rel_mask & GDK_MOD1_MASK));
     g_signal_connect (w, "toggled",
 		      G_CALLBACK (prefs_rel_alt), cd);
-    w = glade_xml_get_widget (cd->xml, "rel_shift");
+
+    w = WID ("rel_shift");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
 				  (cd->rel_mask & GDK_SHIFT_MASK));
     g_signal_connect (w, "toggled",
 		      G_CALLBACK (prefs_rel_shift), cd);
-    w = glade_xml_get_widget (cd->xml, "rel_ctrl");
+
+    w = WID ("rel_ctrl");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
 				  (cd->rel_mask & GDK_CONTROL_MASK));
     g_signal_connect (w, "toggled",
@@ -482,14 +491,11 @@
 }
 
 static CaptureData *
-init_capture_data (PanelApplet *applet)
+capture_data_init (PanelApplet *applet)
 {
     CaptureData *cd;
 
     cd = g_slice_new0 (CaptureData);
-    if (!cd)
-	return NULL;
-
     cd->applet = applet;
     cd->size = 100;
     cd->rel_button = 1;
@@ -498,11 +504,14 @@
 }
 
 static void
-fini_capture_data (CaptureData *cd)
+capture_data_free (CaptureData *cd)
 {
     if (cd->null_cursor)
 	gdk_cursor_unref (cd->null_cursor);
 
+    if (cd->ui)
+	g_object_unref (cd->ui);
+
     g_slice_free (CaptureData, cd);
 }
 
@@ -516,14 +525,12 @@
     GdkColor c0 = { 0, 0, 0, 0 };
     AtkObject *obj;
 
-    cd = init_capture_data (applet);
-    if (!cd)
-	return FALSE;
+    cd = capture_data_init (applet);
 
     /* invisible cursor */
     bmp0 = gdk_bitmap_create_from_data (NULL, char0, 1, 1);
     if (!bmp0) {
-	g_free (cd);
+	capture_data_free (cd);
 	return FALSE;
     }
 
@@ -531,7 +538,7 @@
     g_object_unref (bmp0);
 
     if (!cd->null_cursor) {
-	g_free (cd);
+	capture_data_free (cd);
 	return FALSE;
     }
 
@@ -539,7 +546,7 @@
     bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
     textdomain (GETTEXT_PACKAGE);
 
-    g_set_application_name (_("Pointer Capture Applet"));
+    g_set_application_name (_("Pointer Capture"));
     gtk_window_set_default_icon_name (MT_ICON_NAME);
 
     /* gconf settings */
@@ -567,7 +574,7 @@
 
     /* preferences dialog */
     if (!init_preferences (cd)) {
-	fini_capture_data (cd);
+	capture_data_free (cd);
 	return FALSE;
     }
 
@@ -588,7 +595,7 @@
     gtk_widget_show (cd->area);
 
     /* about dialog */
-    about = glade_xml_get_widget (cd->xml, "about");
+    about = WID ("about");
     g_object_set (about, "version", VERSION, NULL);
 
     g_signal_connect (about, "delete-event",



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