[gnumeric] Change the default widget when rolling up or down the default widget. [#646612]



commit c44ac8effefdbe21303b2d166650e55b99913716
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Thu May 26 12:35:25 2011 -0600

    Change the default widget when rolling up or down the default widget. [#646612]
    
    2011-05-26  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (cb_icon_clicked): in rolled up state
    	make the icon the default

 NEWS                              |    4 ++--
 src/widgets/ChangeLog             |    5 +++++
 src/widgets/gnumeric-expr-entry.c |    3 +++
 3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 290fd7b..ba9c226 100644
--- a/NEWS
+++ b/NEWS
@@ -6,8 +6,8 @@ Andreas
 	* Extend the goto dialog.
 	* Extend the address box to handle both A1 and R1C1 style addresses.
 	  [#650941]
-	* Fix effect of rolling-up expression entries on the default
-	  widget. [#651173]
+	* Change the default widget when rolling up or down the default widget. 
+	  [#651173][#646612]
 
 Morten:
 	* Fix leaks in SHEET.  [#650761]
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 8808021..77b929d 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,5 +1,10 @@
 2011-05-26  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* gnumeric-expr-entry.c (cb_icon_clicked): in rolled up state
+	make the icon the default
+
+2011-05-26  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* gnumeric-expr-entry.c (cb_icon_clicked): reset default widget
 	(gnm_expr_entry_grab_focus): set position at the end of the entry
 
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 3d0780f..77935a0 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -306,6 +306,9 @@ cb_icon_clicked (GtkButton *icon,
 			gtk_widget_reparent (GTK_WIDGET (entry), toplevel);
 
 			gtk_widget_grab_focus (GTK_WIDGET (entry->entry));
+			gtk_widget_set_can_default (GTK_WIDGET (icon), TRUE);
+			gtk_widget_grab_default (GTK_WIDGET (icon));
+
 			gtk_window_resize (GTK_WINDOW (toplevel), 1, 1);
 
 		} else {



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