Hi,

Here's a patch that fixes a bug where the Graph Entry didn't emit an
update signal when the entry lose the focus.

Does it look ok ?

        Emmanuel.
diff --git a/ChangeLog b/ChangeLog
index aaaa52c..3d81266 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-08-07  Emmanuel Pacaud <[EMAIL PROTECTED]>
+
+	Make Graph entry emit an update signal on focus out event, instead on
+	monitoring unmap and unrealize signals. Fix a bug where the update
+	signal was not emited when leaving the entry.
+
+	* src/wbcg-gtk.c (cb_graph_dim_entry_unmap),
+	(cb_graph_dim_entry_unrealize): removed.
+	(cb_graph_dim_entry_focus_out_event): new.
+	(wbcg_data_allocator_editor): connect to gee->entry focus-out-event.
+	Remove unmap and unrealize connections.
+
 2007-08-07  Morten Welinder  <[EMAIL PROTECTED]>
 
 	* src/sheet.c (sheet_insert_rows): Plug leak.
diff --git a/INSTALL b/INSTALL
diff --git a/po-functions/Makefile.in.in b/po-functions/Makefile.in.in
diff --git a/po-functions/POTFILES.in b/po-functions/POTFILES.in
diff --git a/po-functions/POTFILES.skip b/po-functions/POTFILES.skip
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 928c12f..5c40757 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -4090,16 +4090,14 @@ cb_graph_dim_editor_update (GnmExprEntry *gee,
 	gog_dataset_set_dim (editor->dataset, editor->dim_i, data, NULL);
 }
 
-static void
-cb_graph_dim_entry_unmap (GnmExprEntry *gee, GraphDimEditor *editor)
+static gboolean
+cb_graph_dim_entry_focus_out_event (G_GNUC_UNUSED GtkEntry 	*ignored,
+				    G_GNUC_UNUSED GdkEventFocus	*event,
+				    GraphDimEditor 		*editor)
 {
-	cb_graph_dim_editor_update (gee, FALSE, editor);
-}
+	cb_graph_dim_editor_update (editor->entry, FALSE, editor);
 
-static void
-cb_graph_dim_entry_unrealize (GnmExprEntry *gee, GraphDimEditor *editor)
-{
-	cb_graph_dim_editor_update (gee, FALSE, editor);
+	return FALSE;
 }
 
 static void
@@ -4149,12 +4147,9 @@ wbcg_data_allocator_editor (GogDataAllocator *dalloc,
 	g_signal_connect (G_OBJECT (editor->entry),
 		"update",
 		G_CALLBACK (cb_graph_dim_editor_update), editor);
-	g_signal_connect (G_OBJECT (editor->entry),
-		"unmap",
-		G_CALLBACK (cb_graph_dim_entry_unmap), editor);
-	g_signal_connect (G_OBJECT (editor->entry),
-		"unrealize",
-		G_CALLBACK (cb_graph_dim_entry_unrealize), editor);
+	g_signal_connect (G_OBJECT (gnm_expr_entry_get_entry (editor->entry)),
+		"focus-out-event",
+		G_CALLBACK (cb_graph_dim_entry_focus_out_event), editor);
 	g_object_set_data_full (G_OBJECT (editor->entry),
 		"editor", editor, (GDestroyNotify) graph_dim_editor_free);
 
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
_______________________________________________
gnumeric-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to