[gnome-control-center] mouse: use a smiley face instead of old ugly lightbulb to test click



commit 2f4e88b4a3f9ad10848465ec9cbfb5e2573e0ccb
Author: William Jon McCann <jmccann redhat com>
Date:   Sun Nov 14 12:34:37 2010 -0500

    mouse: use a smiley face instead of old ugly lightbulb to test click

 panels/mouse/Makefile.am               |    4 +-
 panels/mouse/capplet-stock-icons.c     |  101 --------------------------------
 panels/mouse/capplet-stock-icons.h     |   62 -------------------
 panels/mouse/gnome-mouse-properties.c  |   22 ++-----
 panels/mouse/gnome-mouse-properties.ui |    2 +-
 5 files changed, 9 insertions(+), 182 deletions(-)
---
diff --git a/panels/mouse/Makefile.am b/panels/mouse/Makefile.am
index 8248d3e..4cecfe2 100644
--- a/panels/mouse/Makefile.am
+++ b/panels/mouse/Makefile.am
@@ -22,9 +22,7 @@ libmouse_properties_la_SOURCES =	\
 	gnome-mouse-properties.c	\
 	gnome-mouse-properties.h	\
 	gnome-mouse-accessibility.c	\
-	gnome-mouse-accessibility.h	\
-	capplet-stock-icons.c		\
-	capplet-stock-icons.h
+	gnome-mouse-accessibility.h
 
 libmouse_properties_la_LIBADD = $(PANEL_LIBS) $(GSD_DBUS_LIBS)
 libmouse_properties_la_LDFLAGS = $(PANEL_LDFLAGS)
diff --git a/panels/mouse/gnome-mouse-properties.c b/panels/mouse/gnome-mouse-properties.c
index 356f984..14a1f6a 100644
--- a/panels/mouse/gnome-mouse-properties.c
+++ b/panels/mouse/gnome-mouse-properties.c
@@ -1,6 +1,5 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mouse-properties-capplet.c
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
  * Copyright (C) 2001 Red Hat, Inc.
  * Copyright (C) 2001 Ximian, Inc.
  *
@@ -32,7 +31,6 @@
 #include <math.h>
 
 #include "gnome-mouse-accessibility.h"
-#include "capplet-stock-icons.h"
 #include "gnome-mouse-properties.h"
 
 #include <sys/types.h>
@@ -98,8 +96,7 @@ test_maybe_timeout (struct test_data_t *data)
 {
 	double_click_state = DOUBLE_CLICK_TEST_OFF;
 
-	gtk_image_set_from_stock (GTK_IMAGE (data->image),
-				  MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size());
+	gtk_image_set_from_icon_name (GTK_IMAGE (data->image), "face-plain", GTK_ICON_SIZE_DIALOG);
 
 	*data->timeout_id = 0;
 
@@ -156,16 +153,13 @@ event_box_button_press_event (GtkWidget   *widget,
 
 	switch (double_click_state) {
 	case DOUBLE_CLICK_TEST_ON:
-		gtk_image_set_from_stock (GTK_IMAGE (image),
-					  MOUSE_DBLCLCK_ON, mouse_capplet_dblclck_icon_get_size());
+		gtk_image_set_from_icon_name (GTK_IMAGE (image), "face-laugh", GTK_ICON_SIZE_DIALOG);
 		break;
 	case DOUBLE_CLICK_TEST_MAYBE:
-		gtk_image_set_from_stock (GTK_IMAGE (image),
-					  MOUSE_DBLCLCK_MAYBE, mouse_capplet_dblclck_icon_get_size());
+		gtk_image_set_from_icon_name (GTK_IMAGE (image), "face-smile", GTK_ICON_SIZE_DIALOG);
 		break;
 	case DOUBLE_CLICK_TEST_OFF:
-		gtk_image_set_from_stock (GTK_IMAGE (image),
-					  MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size());
+		gtk_image_set_from_icon_name (GTK_IMAGE (image), "face-plain", GTK_ICON_SIZE_DIALOG);
 		break;
 	}
 
@@ -329,7 +323,7 @@ setup_dialog (GtkBuilder *dialog)
 	g_settings_bind (mouse_settings, "double-click",
 			 gtk_range_get_adjustment (GTK_RANGE (WID ("delay_scale"))), "value",
 			 G_SETTINGS_BIND_DEFAULT);
-	gtk_image_set_from_stock (GTK_IMAGE (WID ("double_click_image")), MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size ());
+	gtk_image_set_from_icon_name (GTK_IMAGE (WID ("double_click_image")), "face-plain", GTK_ICON_SIZE_DIALOG);
 	g_object_set_data (G_OBJECT (WID ("double_click_eventbox")), "image", WID ("double_click_image"));
 	g_signal_connect (WID ("double_click_eventbox"), "button_press_event",
 			  G_CALLBACK (event_box_button_press_event), dialog);
@@ -442,8 +436,6 @@ gnome_mouse_properties_init (GtkBuilder *dialog)
 	GtkWidget      *dialog_win, *w;
 	gchar *start_page = NULL;
 
-	capplet_init_stock_icons ();
-
 	mouse_settings = g_settings_new ("org.gnome.settings-daemon.peripherals.mouse");
 	touchpad_settings = g_settings_new ("org.gnome.settings-daemon.peripherals.touchpad");
 
diff --git a/panels/mouse/gnome-mouse-properties.ui b/panels/mouse/gnome-mouse-properties.ui
index adcd11c..e6e3f6c 100644
--- a/panels/mouse/gnome-mouse-properties.ui
+++ b/panels/mouse/gnome-mouse-properties.ui
@@ -634,7 +634,7 @@
                                     <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">To test your double-click settings, try to double-click on the light bulb.</property>
+                                    <property name="label" translatable="yes">To test your settings, try to double-click on the face.</property>
                                     <property name="wrap">True</property>
                                     <attributes>
                                       <attribute name="style" value="italic"/>



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