From c8ca795c9291d5b85f5ed5ed818188477b012ed9 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Fri, 13 Jan 2006 10:31:05 +0000 Subject: edit menu implementation svn path=/trunk/; revision=31163 --- calendar/gui/dialogs/comp-editor-page.c | 53 ++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) (limited to 'calendar/gui/dialogs/comp-editor-page.c') diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index 2d656060e7..22461c5107 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -44,6 +44,8 @@ enum { SUMMARY_CHANGED, DATES_CHANGED, CLIENT_CHANGED, + FOCUS_IN, + FOCUS_OUT, LAST_SIGNAL }; @@ -140,7 +142,23 @@ comp_editor_page_class_init (CompEditorPageClass *class) NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); - + comp_editor_page_signals[FOCUS_IN] = + g_signal_new ("focus_in", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (CompEditorPageClass, focus_in), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); + comp_editor_page_signals[FOCUS_OUT] = + g_signal_new ("focus_out", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (CompEditorPageClass, focus_out), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); + class->changed = NULL; class->summary_changed = NULL; class->dates_changed = NULL; @@ -332,6 +350,39 @@ comp_editor_page_set_summary (CompEditorPage *page, const char *summary) (* CLASS (page)->set_summary) (page, summary); } +/** + * comp_editor_page_unset_focused_widget + * @page: An editor page + * @widget: The widget that has the current focus +**/ +void +comp_editor_page_unset_focused_widget (CompEditorPage *page, GtkWidget *widget) +{ + g_return_if_fail (page!= NULL); + g_return_if_fail (IS_COMP_EDITOR_PAGE (page)); + + gtk_signal_emit (GTK_OBJECT (page), + comp_editor_page_signals[FOCUS_OUT], + widget); + +} + +/** + * comp_editor_page_set_focussed_widget: + * @page: An editor page + * @widget: The widget that has the current focus +**/ +void +comp_editor_page_set_focused_widget (CompEditorPage *page, GtkWidget *widget) +{ + g_return_if_fail (page!= NULL); + g_return_if_fail (IS_COMP_EDITOR_PAGE (page)); + + gtk_signal_emit (GTK_OBJECT (page), + comp_editor_page_signals[FOCUS_IN], + widget); + +} /** * comp_editor_page_set_dates: * @page: An editor page -- cgit