[gnumeric] Allow function tooltips to be closed temporarily [#641355]



commit 458e7d4cabd7b8098374bcf5dd109771d483229f
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sun Feb 13 11:25:30 2011 -0700

    Allow function tooltips to be closed temporarily [#641355]
    
    2011-02-13  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (gee_set_tooltip): add Ctrl-F4 info
    	(cb_gee_key_press_event): Ctrl-F4 temporarily closes the tooltip

 NEWS                              |    1 +
 src/widgets/ChangeLog             |    5 +++++
 src/widgets/gnumeric-expr-entry.c |   10 +++++++++-
 3 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 9d2e881..89cb941 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.10.14
 
 Andreas:
 	* Fix width of translated lists in various dialogs [#641626]
+	* Allow function tooltips to be closed temporarily [#641355]
 
 Jean:
 	* Fix cursor position inside a cell edited in a zoomed sheet. [#641709]
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 5ad2d1e..c5ed319 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-13  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* gnumeric-expr-entry.c (gee_set_tooltip): add Ctrl-F4 info
+	(cb_gee_key_press_event): Ctrl-F4 temporarily closes the tooltip
+
 2011-02-02  Morten Welinder <terra gnome org>
 
 	* Release 1.10.13
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 20eda83..d89fc32 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -789,7 +789,8 @@ gee_set_tooltip (GnmExprEntry *gee, GnmFunc *fd, gint args, gboolean had_stuff)
 		g_free (extra);
 	}
 
-	gee->tooltip.tooltip = gee_create_tooltip (gee, str->str, NULL, FALSE);
+	gee->tooltip.tooltip = gee_create_tooltip 
+		(gee, str->str, _("\n\n<i>Ctrl-F4 to close tooltip</i>"), FALSE);
 	gee->tooltip.args = args;
 	gee->tooltip.had_stuff = (max == 0 && args == 0 && had_stuff);
 
@@ -1154,6 +1155,8 @@ cb_gee_key_press_event (GtkEntry	*entry,
 		 * abs/abs, rel/abs, abs/rel and back to rel/rel. Update text
 		 * displayed in entry.
 		 */
+		/* Shift F4 provides the paste names dialog based on the current name */
+		/* Control F4 closes the tooltips */
 		Rangesel *rs = &gee->rangesel;
 		gboolean c, r;
 
@@ -1168,6 +1171,11 @@ cb_gee_key_press_event (GtkEntry	*entry,
 					(gee->wbcg, -1, -1);
 			return TRUE;
 		}
+		if (state == GDK_CONTROL_MASK) {
+			gnm_expr_entry_close_tips (gee);
+			return TRUE;
+		}
+		
 		if (gee->tooltip.completion != NULL) {
 			guint start = gee->tooltip.completion_start;
 			guint end = gee->tooltip.completion_end;



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