gpointing-device-settings r157 - in trunk: data modules



Author: hiikezoe
Date: Sat Mar  7 10:31:45 2009
New Revision: 157
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=157&view=rev

Log:
Show trackpoint icon only if the device seems trackpoint device.

Added:
   trunk/data/trackpoint.png
      - copied, changed from r156, /trunk/data/mouse.png
Removed:
   trunk/data/mouse.png
Modified:
   trunk/data/Makefile.am
   trunk/data/mouse.ui.in
   trunk/modules/gpds-mouse-ui.c

Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am	(original)
+++ trunk/data/Makefile.am	Sat Mar  7 10:31:45 2009
@@ -3,7 +3,7 @@
 	touchpad.ui
 
 gpds_icon_DATA = 	\
-	mouse.png	\
+	trackpoint.png	\
 	touchpad.png
 
 @INTLTOOL_SCHEMAS_RULE@

Modified: trunk/data/mouse.ui.in
==============================================================================
--- trunk/data/mouse.ui.in	(original)
+++ trunk/data/mouse.ui.in	Sat Mar  7 10:31:45 2009
@@ -5,7 +5,6 @@
     <child>
       <object class="GtkImage" id ="main-widget-label-icon">
         <property name="visible">True</property>
-        <property name="file">@prefix@/share/gpointing-device-settings/icon/mouse.png</property>
       </object>
     </child>
     <child>

Copied: trunk/data/trackpoint.png (from r156, /trunk/data/mouse.png)
==============================================================================

Modified: trunk/modules/gpds-mouse-ui.c
==============================================================================
--- trunk/modules/gpds-mouse-ui.c	(original)
+++ trunk/modules/gpds-mouse-ui.c	Sat Mar  7 10:31:45 2009
@@ -574,7 +574,7 @@
 get_label_widget (GpdsUI *ui, GError **error)
 {
     GtkBuilder *builder;
-    GObject *widget, *label;
+    GObject *widget, *label, *image;
 
     builder = gpds_ui_get_builder(ui);
 
@@ -592,6 +592,10 @@
     if (label)
         gtk_label_set_text(GTK_LABEL(label), gpds_ui_get_device_name(ui));
 
+    image = gtk_builder_get_object(builder, "main-widget-label-icon");
+    if (image && strstr(gpds_ui_get_device_name(ui), "TrackPoint"))
+        gtk_image_set_from_file(GTK_IMAGE(image), GPDS_ICONDIR "/trackpoint.png");
+
     return GTK_WIDGET(widget);
 }
 



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