summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/gtk+/gtk+-2.6.4-1.osso7/gtktoolbutton.c.diff
blob: 15e15fe79681ea377c12d766687a9d671d4f3408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- gtk+-2.6.4/gtk/gtktoolbutton.c	2004-11-20 01:18:38.000000000 +0200
+++ gtk+-2.6.4/gtk/gtktoolbutton.c	2005-04-06 16:19:38.167735984 +0300
@@ -41,6 +41,7 @@
 
 enum {
   CLICKED,
+  INSENSITIVE_PRESS,
   LAST_SIGNAL
 };
 
@@ -74,7 +75,10 @@
 						     GtkToolButton   *button);
 
 static void gtk_tool_button_construct_contents (GtkToolItem *tool_item);
-      
+
+ static void insensitive_press (GtkWidget       *widget,
+						                    GtkToolButton   *button);
+    
 static GObjectClass *parent_class = NULL;
 static guint         toolbutton_signals[LAST_SIGNAL] = { 0 };
 
@@ -226,7 +230,7 @@
 		  NULL, NULL,
 		  g_cclosure_marshal_VOID__VOID,
 		  G_TYPE_NONE, 0);
-  
+
   g_type_class_add_private (object_class, sizeof (GtkToolButtonPrivate));
 }
 
@@ -246,6 +250,10 @@
   g_signal_connect_object (button->priv->button, "clicked",
 			   G_CALLBACK (button_clicked), button, 0);
 
+  /* Hildon: connect "insensitive_press" signal for private button */
+  g_signal_connect_object (button->priv->button, "insensitive_press",
+			   G_CALLBACK (insensitive_press), button, 0);
+
   gtk_container_add (GTK_CONTAINER (button), button->priv->button);
   gtk_widget_show (button->priv->button);
 }
@@ -519,7 +527,7 @@
 
 	  src_pixbuf = gtk_image_get_pixbuf (image);
 	  dest_pixbuf = gdk_pixbuf_scale_simple (src_pixbuf, width, height,
-						 GDK_INTERP_BILINEAR);
+						 GDK_INTERP_NEAREST);
 
 	  return gtk_image_new_from_pixbuf (dest_pixbuf);
 	}
@@ -594,6 +602,13 @@
 }
 
 static void
+insensitive_press (GtkWidget     *widget,
+		GtkToolButton *button)
+{
+  g_signal_emit_by_name (button, "insensitive_press");
+}
+
+static void
 gtk_tool_button_toolbar_reconfigured (GtkToolItem *tool_item)
 {
   gtk_tool_button_construct_contents (tool_item);