[gnumeric] Enable direct editing of sheet tab labels. (But editing has to be terminated by enter)



commit caaa1da7b3417a91e0f2ec68d82b9c710d1f3906
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Aug 2 20:16:49 2011 -0600

    Enable direct editing of sheet tab labels. (But editing has to be terminated by enter)
    
    2011-08-02  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* widget-editable-label.c (el_button_press_event): enable most

 src/widgets/ChangeLog               |    4 ++++
 src/widgets/widget-editable-label.c |   14 +++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 4954d80..ea8b56e 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,5 +1,9 @@
 2011-08-02  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* widget-editable-label.c (el_button_press_event): enable most
+
+2011-08-02  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* widget-editable-label.c (el_button_press_event): temporarily
 	disable
 
diff --git a/src/widgets/widget-editable-label.c b/src/widgets/widget-editable-label.c
index e927aa3..6177e35 100644
--- a/src/widgets/widget-editable-label.c
+++ b/src/widgets/widget-editable-label.c
@@ -165,7 +165,7 @@ el_destroy (GtkWidget *widget)
 static gint
 el_button_press_event (GtkWidget *widget, GdkEventButton *button)
 {
-	/* EditableLabel *el = EDITABLE_LABEL (widget); */
+	EditableLabel *el = EDITABLE_LABEL (widget);
 
 	/* if (button->window != gtk_widget_get_window (widget)) { */
 	/* 	/\* Accept the name change *\/ */
@@ -174,15 +174,15 @@ el_button_press_event (GtkWidget *widget, GdkEventButton *button)
 	/* 	return TRUE; */
 	/* } */
 
-	/* if (button->type == GDK_2BUTTON_PRESS) { */
-	/* 	editable_label_start_editing (el); */
-	/* 	return FALSE; */
-	/* } */
+	if (button->type == GDK_2BUTTON_PRESS) {
+		editable_label_start_editing (el);
+		return FALSE;
+	}
 
-	/* if (el->unedited_text == NULL) */
+	if (el->unedited_text == NULL)
 		return FALSE;
 
-	/* return parent_class->button_press_event (widget, button); */
+	return parent_class->button_press_event (widget, button);
 }
 
 /*



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