libegg r890 - in trunk: . libegg/toolpalette



Author: hasselmm
Date: Thu Jul 10 12:33:14 2008
New Revision: 890
URL: http://svn.gnome.org/viewvc/libegg?rev=890&view=rev

Log:
Set focus-on-click when buttons are added to the tool palette.

* libegg/toolpalette/eggtoolitemgroup.c
 (egg_tool_item_group_insert()): See above.


Modified:
   trunk/ChangeLog
   trunk/libegg/toolpalette/eggtoolitemgroup.c

Modified: trunk/libegg/toolpalette/eggtoolitemgroup.c
==============================================================================
--- trunk/libegg/toolpalette/eggtoolitemgroup.c	(original)
+++ trunk/libegg/toolpalette/eggtoolitemgroup.c	Thu Jul 10 12:33:14 2008
@@ -1807,7 +1807,7 @@
                             GtkToolItem      *item,
                             gint              position)
 {
-  GtkWidget *parent;
+  GtkWidget *parent, *child_widget;
   EggToolItemGroupChild *child;
 
   g_return_if_fail (EGG_IS_TOOL_ITEM_GROUP (group));
@@ -1828,6 +1828,11 @@
   if (EGG_IS_TOOL_PALETTE (parent))
     _egg_tool_palette_child_set_drag_source (GTK_WIDGET (item), parent);
 
+  child_widget = gtk_bin_get_child (GTK_BIN (item));
+
+  if (GTK_IS_BUTTON (child_widget))
+    gtk_button_set_focus_on_click (GTK_BUTTON (child_widget), TRUE);
+
   gtk_widget_set_parent (GTK_WIDGET (item), GTK_WIDGET (group));
 }
 



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