From 8bf99315f462257613969c0ca0ab051ff86ca763 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 17 Oct 2003 11:13:07 +0000 Subject: Grab focus in the entry when showing because we dont rebuild the dialog. 2003-10-17 Marco Pesenti Gritti * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_show), (ephy_bookmarks_editor_class_init), (ephy_bookmarks_editor_construct): Grab focus in the entry when showing because we dont rebuild the dialog. --- ChangeLog | 9 +++++++++ src/bookmarks/ephy-bookmarks-editor.c | 15 +++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4bd70b0f..1e436e06d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-10-17 Marco Pesenti Gritti + + * src/bookmarks/ephy-bookmarks-editor.c: + (ephy_bookmarks_editor_show), (ephy_bookmarks_editor_class_init), + (ephy_bookmarks_editor_construct): + + Grab focus in the entry when showing because we dont + rebuild the dialog. + 2003-10-17 Marco Pesenti Gritti * embed/mozilla/mozilla-embed-persist.cpp: diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 982f87f7e..e902f3bdf 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -780,10 +780,21 @@ ephy_bookmarks_editor_get_type (void) return ephy_bookmarks_editor_type; } +static void +ephy_bookmarks_editor_show (GtkWidget *widget) +{ + EphyBookmarksEditor *editor = EPHY_BOOKMARKS_EDITOR (widget); + + gtk_widget_grab_focus (editor->priv->search_entry); + + GTK_WIDGET_CLASS (parent_class)->show (widget); +} + static void ephy_bookmarks_editor_class_init (EphyBookmarksEditorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); parent_class = g_type_class_peek_parent (klass); @@ -793,6 +804,8 @@ ephy_bookmarks_editor_class_init (EphyBookmarksEditorClass *klass) object_class->set_property = ephy_bookmarks_editor_set_property; object_class->get_property = ephy_bookmarks_editor_get_property; + widget_class->show = ephy_bookmarks_editor_show; + g_object_class_install_property (object_class, PROP_BOOKMARKS, g_param_spec_object ("bookmarks", @@ -1505,8 +1518,6 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) 130); set_columns_visibility (editor, details_value); - - gtk_widget_grab_focus (editor->priv->search_entry); } void -- cgit v1.2.3