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