mousetweaks r24 - in trunk: . data po src



Author: gerdk
Date: Sun Jan 20 21:31:23 2008
New Revision: 24
URL: http://svn.gnome.org/viewvc/mousetweaks?rev=24&view=rev

Log:
2008-01-20 Gerd Kohlberger <gerdk svn gnome org>
	* data/PointerCapture.xml:
	* data/DwellClick.xml:
	* data/Makefile.am:
	* src/dwell-click-applet.c:
	* src/pointer-capture-applet.c:
	
	Move applet context menus to external XML file
	
	* po/POTFILES.in: Add new XML files



Added:
   trunk/data/DwellClick.xml
   trunk/data/PointerCapture.xml
Modified:
   trunk/ChangeLog
   trunk/data/Makefile.am
   trunk/po/POTFILES.in
   trunk/src/dwell-click-applet.c
   trunk/src/pointer-capture-applet.c

Added: trunk/data/DwellClick.xml
==============================================================================
--- (empty file)
+++ trunk/data/DwellClick.xml	Sun Jan 20 21:31:23 2008
@@ -0,0 +1,9 @@
+<Root>
+  <popups>
+    <popup name="button3">
+      <menuitem name="Properties Item" verb="PropertiesVerb" _label="_Preferences" pixtype="stock" pixname="gtk-properties" />
+      <menuitem name="Help Item" verb="HelpVerb" _label="_Help" pixtype="stock" pixname="gtk-help"/>
+      <menuitem name="About Item" verb="AboutVerb" _label="_About" pixtype="stock" pixname="gtk-about"/>
+    </popup>
+  </popups>
+</Root>

Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am	(original)
+++ trunk/data/Makefile.am	Sun Jan 20 21:31:23 2008
@@ -2,11 +2,13 @@
 pca_schemas = pointer-capture-applet.schemas
 pca_glade   = pointer-capture-applet.glade
 pca_server  = PointerCapture_Factory.server.in
+pca_menu    = PointerCapture.xml
 endif
 
 if BUILD_CTA
 cta_glade  = dwell-click-applet.glade
 cta_server = DwellClick_Factory.server.in
+cta_menu   = DwellClick.xml
 endif
 
 serverdir = $(libdir)/bonobo/servers
@@ -31,6 +33,9 @@
 
 @INTLTOOL_DESKTOP_RULE@
 
+uidir = $(datadir)/mousetweaks
+ui_DATA = $(pca_menu) $(cta_menu)
+
 schemasdir = @GCONF_SCHEMA_FILE_DIR@
 schemas_DATA = mousetweaks.schemas $(pca_schemas)
 
@@ -55,7 +60,8 @@
 EXTRA_DIST =		      \
 	$(xml_DATA)	      \
 	$(schemas_DATA)       \
-	$(server_in_in_files)
+	$(server_in_in_files) \
+	$(ui_DATA)
 
 DISTCLEANFILES =           \
 	$(server_DATA)     \

Added: trunk/data/PointerCapture.xml
==============================================================================
--- (empty file)
+++ trunk/data/PointerCapture.xml	Sun Jan 20 21:31:23 2008
@@ -0,0 +1,9 @@
+<Root>
+  <popups>
+    <popup name="button3">
+      <menuitem name="Properties Item" verb="PropertiesVerb" _label="_Preferences" pixtype="stock" pixname="gtk-properties" />
+      <menuitem name="Help Item" verb="HelpVerb" _label="_Help" pixtype="stock" pixname="gtk-help"/>
+      <menuitem name="About Item" verb="AboutVerb" _label="_About" pixtype="stock" pixname="gtk-about"/>
+    </popup>
+  </popups>
+</Root>

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Sun Jan 20 21:31:23 2008
@@ -3,6 +3,8 @@
 data/ctw.glade
 data/DwellClick_Factory.server.in.in
 data/PointerCapture_Factory.server.in.in
+data/DwellClick.xml
+data/PointerCapture.xml
 src/mt-main.c
 src/mt-ctw.c
 src/mt-dbus.c

Modified: trunk/src/dwell-click-applet.c
==============================================================================
--- trunk/src/dwell-click-applet.c	(original)
+++ trunk/src/dwell-click-applet.c	Sun Jan 20 21:31:23 2008
@@ -54,18 +54,6 @@
     "single_click_img_v"
 };
 
-static const gchar menu_xml[] =
-    "<popup name=\"button3\">\n"
-    "  <menuitem name=\"Properties Item\" verb=\"PropertiesVerb\" "
-    "          _label=\"_Preferences\"\n"
-    "         pixtype=\"stock\" pixname=\"gtk-properties\"/>\n"
-    "  <menuitem name=\"Help Item\" verb=\"HelpVerb\" "
-    "          _label=\"_Help\"\n"
-    "         pixtype=\"stock\" pixname=\"gtk-help\"/>\n"
-    "  <menuitem name=\"About Item\" verb=\"AboutVerb\" _label=\"_About\"\n"
-    "         pixtype=\"stock\" pixname=\"gtk-about\"/>\n"
-    "</popup>\n";
-
 static void update_sensitivity (DwellData *dd);
 
 static void preferences_dialog (BonoboUIComponent *component,
@@ -237,7 +225,7 @@
     if (dd->conn)
 	dbus_connection_unref (dd->conn);
 
-     if (dd->client)
+    if (dd->client)
 	g_object_unref (dd->client);
 
     for (i = 0; i < N_CLICK_TYPES; i++)
@@ -494,7 +482,9 @@
 			    PANEL_APPLET_EXPAND_MINOR |
 			    PANEL_APPLET_HAS_HANDLE);
     panel_applet_set_background_widget (applet, GTK_WIDGET(applet));
-    panel_applet_setup_menu (applet, menu_xml, menu_verb, dd);
+    panel_applet_setup_menu_from_file (applet,
+				       GLADEDIR, "DwellClick.xml",
+				       NULL, menu_verb, dd);
 
     g_signal_connect (applet, "change-orient",
 		      G_CALLBACK(applet_orient_changed), dd);

Modified: trunk/src/pointer-capture-applet.c
==============================================================================
--- trunk/src/pointer-capture-applet.c	(original)
+++ trunk/src/pointer-capture-applet.c	Sun Jan 20 21:31:23 2008
@@ -48,18 +48,6 @@
     guint rel_mask;
 };
 
-static const gchar menu_xml[] =
-    "<popup name=\"button3\">\n"
-    "  <menuitem name=\"Properties Item\" verb=\"PropertiesVerb\" "
-    "          _label=\"_Preferences\"\n"
-    "         pixtype=\"stock\" pixname=\"gtk-properties\"/>\n"
-    "  <menuitem name=\"Help Item\" verb=\"HelpVerb\" "
-    "          _label=\"_Help\"\n"
-    "         pixtype=\"stock\" pixname=\"gtk-help\"/>\n"
-    "  <menuitem name=\"About Item\" verb=\"AboutVerb\" _label=\"_About\"\n"
-    "         pixtype=\"stock\" pixname=\"gtk-about\"/>\n"
-    "</popup>\n";
-
 static void fini_capture_data (CaptureData *cd);
 
 static void
@@ -634,7 +622,9 @@
 			    PANEL_APPLET_EXPAND_MINOR |
 			    PANEL_APPLET_HAS_HANDLE);
     panel_applet_set_background_widget (applet, GTK_WIDGET(applet));
-    panel_applet_setup_menu (applet, menu_xml, menu_verb, cd);
+    panel_applet_setup_menu_from_file (applet,
+				       GLADEDIR, "PointerCapture.xml",
+				       NULL, menu_verb, cd);
 
     g_signal_connect (applet, "change-orient",
 		      G_CALLBACK(applet_orient_changed), cd);



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