diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 18:31:05 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 18:31:05 +0800 |
commit | c8ca795c9291d5b85f5ed5ed818188477b012ed9 (patch) | |
tree | 2bc851870de67c3318cf59394474bc7098cbf614 /calendar/gui/dialogs/task-page.c | |
parent | 796c0f96c7f20f1a0e2b188e79eb909f8ebf6665 (diff) | |
download | gsoc2013-evolution-c8ca795c9291d5b85f5ed5ed818188477b012ed9.tar.gz gsoc2013-evolution-c8ca795c9291d5b85f5ed5ed818188477b012ed9.tar.zst gsoc2013-evolution-c8ca795c9291d5b85f5ed5ed818188477b012ed9.zip |
edit menu implementation
svn path=/trunk/; revision=31163
Diffstat (limited to 'calendar/gui/dialogs/task-page.c')
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 93386e9b6a..c8c21082fe 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1565,7 +1565,28 @@ categories_clicked_cb (GtkWidget *button, gpointer data) entry = priv->categories; e_categories_config_open_dialog_for_entry (GTK_ENTRY (entry)); } +/* sets the current focused widget */ +static gboolean +widget_focus_in_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + TaskPage *tpage; + tpage = TASK_PAGE (data); + + comp_editor_page_set_focused_widget (COMP_EDITOR_PAGE(tpage), widget); + + return FALSE; +} +/* unsets the current focused widget */ +static gboolean +widget_focus_out_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + TaskPage *tpage; + tpage = TASK_PAGE (data); + comp_editor_page_unset_focused_widget (COMP_EDITOR_PAGE(tpage), widget); + + return FALSE; +} /* This is called when any field is changed; it notifies upstream. */ static void field_changed_cb (GtkWidget *widget, gpointer data) @@ -1703,6 +1724,18 @@ init_widgets (TaskPage *tpage) /* Connect the default signal handler to use to make sure the "changed" field gets set whenever a field is changed. */ + /* Set the current focus entry */ + g_signal_connect (priv->summary, "focus-in-event", + G_CALLBACK (widget_focus_in_cb), tpage); + g_signal_connect (priv->summary, "focus-out-event", + G_CALLBACK (widget_focus_out_cb), tpage); + + g_signal_connect (priv->description, "focus-in-event", + G_CALLBACK (widget_focus_in_cb), tpage); + g_signal_connect (priv->description, "focus-out-event", + G_CALLBACK (widget_focus_out_cb), tpage); + + /* Belongs to priv->description */ g_signal_connect ((text_buffer), "changed", G_CALLBACK (field_changed_cb), tpage); |