From dcb5ea4101ffdd79ff7849867f8c32426e88da7f Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 4 Jul 2001 21:25:30 +0000 Subject: Fixes bug #4018 and what would be the analogous bugs for the other 2001-07-04 Federico Mena Quintero Fixes bug #4018 and what would be the analogous bugs for the other component editors. * gui/dialogs/comp-editor-page.h (CompEditorPageClass): New virtual method "::focus_main_widget()". * gui/dialogs/comp-editor-page.c (comp_editor_page_focus_main_widget): New function. * gui/dialogs/comp-editor.c (comp_editor_append_page): If we are inserting the main page, ask it to focus its main widget. * gui/dialogs/alarm-page.c (alarm_page_focus_main_widget): Implemented. * gui/dialogs/event-page.c (event_page_focus_main_widget): Implemented. #include "e-util/e-categories-config.h". * gui/dialogs/meeting-page.c (meeting_page_focus_main_widget): Implemented. * gui/dialogs/recurrence-page.c (recurrence_page_focus_main_widget): Implemented. * gui/dialogs/task-details-page.c (task_details_page_focus_main_widget): Implemented. * gui/dialogs/task-page.c (task_page_focus_main_widget): Implemented. svn path=/trunk/; revision=10784 --- calendar/gui/dialogs/task-page.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'calendar/gui/dialogs/task-page.c') diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 2fc7bbf23e..6127087b3b 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -116,6 +116,7 @@ static void task_page_init (TaskPage *tpage); static void task_page_destroy (GtkObject *object); static GtkWidget *task_page_get_widget (CompEditorPage *page); +static void task_page_focus_main_widget (CompEditorPage *page); static void task_page_fill_widgets (CompEditorPage *page, CalComponent *comp); static void task_page_fill_component (CompEditorPage *page, CalComponent *comp); static void task_page_set_summary (CompEditorPage *page, const char *summary); @@ -170,6 +171,7 @@ task_page_class_init (TaskPageClass *class) parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE); editor_page_class->get_widget = task_page_get_widget; + editor_page_class->focus_main_widget = task_page_focus_main_widget; editor_page_class->fill_widgets = task_page_fill_widgets; editor_page_class->fill_component = task_page_fill_component; editor_page_class->set_summary = task_page_set_summary; @@ -249,6 +251,19 @@ task_page_get_widget (CompEditorPage *page) return priv->main; } +/* focus_main_widget handler for the task page */ +static void +task_page_focus_main_widget (CompEditorPage *page) +{ + TaskPage *tpage; + TaskPagePrivate *priv; + + tpage = TASK_PAGE (page); + priv = tpage->priv; + + gtk_widget_grab_focus (priv->summary); +} + /* Fills the widgets with default values */ static void clear_widgets (TaskPage *tpage) -- cgit v1.2.3