diff options
author | JP Rosevear <jpr@ximian.com> | 2004-01-06 22:55:27 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-01-06 22:55:27 +0800 |
commit | 0234e67a4bb17367c1044d7a05090de0cb5ebba4 (patch) | |
tree | b3b4f1779086456f7805a600aa884f0bae83b3c4 | |
parent | 6f2710f8e6ffd7e354da7262d63f6f234dee70e9 (diff) | |
download | gsoc2013-evolution-0234e67a4bb17367c1044d7a05090de0cb5ebba4.tar gsoc2013-evolution-0234e67a4bb17367c1044d7a05090de0cb5ebba4.tar.gz gsoc2013-evolution-0234e67a4bb17367c1044d7a05090de0cb5ebba4.tar.bz2 gsoc2013-evolution-0234e67a4bb17367c1044d7a05090de0cb5ebba4.tar.lz gsoc2013-evolution-0234e67a4bb17367c1044d7a05090de0cb5ebba4.tar.xz gsoc2013-evolution-0234e67a4bb17367c1044d7a05090de0cb5ebba4.tar.zst gsoc2013-evolution-0234e67a4bb17367c1044d7a05090de0cb5ebba4.zip |
if we are de-activated, the editing is done (esnr_start_editing): listen
2004-01-06 JP Rosevear <jpr@ximian.com>
* gui/e-select-names-renderer.c (esnr_activated): if we are
de-activated, the editing is done
(esnr_start_editing): listen for activated signal on the control
frame
Fixes #52196
svn path=/trunk/; revision=24065
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/e-select-names-renderer.c | 14 |
2 files changed, 23 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0d23c49db7..59e5c894e1 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2004-01-06 JP Rosevear <jpr@ximian.com> + + * gui/e-select-names-renderer.c (esnr_activated): if we are + de-activated, the editing is done + (esnr_start_editing): listen for activated signal on the control + frame + + Fixes #52196 + 2004-01-06 Kidd Wang <kidd.wang@sun.com> * gui/e-calendar-table.[ch] (e_calendar_table_open_selected): diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c index 0571e3a29a..9ab1a2eb83 100644 --- a/calendar/gui/e-select-names-renderer.c +++ b/calendar/gui/e-select-names-renderer.c @@ -64,6 +64,13 @@ esnr_editing_done (GtkCellEditable *editable, ESelectNamesRenderer *cell) cell->priv->path = NULL; } +static void +esnr_activated (BonoboControlFrame *cf, gboolean activated, ESelectNamesRenderer *cell) +{ + if (!activated) + esnr_editing_done (GTK_CELL_EDITABLE (cell->priv->editable), cell); +} + static GtkCellEditable * esnr_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *bg_area, GdkRectangle *cell_area, GtkCellRendererState flags) @@ -71,6 +78,7 @@ esnr_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, c ESelectNamesRenderer *sn_cell = E_SELECT_NAMES_RENDERER (cell); GtkCellRendererText *text_cell = GTK_CELL_RENDERER_TEXT (cell); ESelectNamesEditable *editable; + BonoboControlFrame *cf; if (!text_cell->editable) return NULL; @@ -81,6 +89,12 @@ esnr_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, c g_signal_connect (editable, "editing_done", G_CALLBACK (esnr_editing_done), sn_cell); + /* Listen for de-activation/loss of focus */ + cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (editable)); + bonobo_control_frame_set_autoactivate (cf, TRUE); + + g_signal_connect (cf, "activated", G_CALLBACK (esnr_activated), sn_cell); + sn_cell->priv->editable = g_object_ref (editable); sn_cell->priv->path = g_strdup (path); |