diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-11-09 02:27:06 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-11-09 02:27:06 +0800 |
commit | a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7 (patch) | |
tree | d809dce55014065007f3723d60cf51c8b8a7eca6 | |
parent | 5909a682ca0a7c1f10c775414c6a0e2ae5e0ec78 (diff) | |
download | gsoc2013-epiphany-a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7.tar gsoc2013-epiphany-a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7.tar.gz gsoc2013-epiphany-a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7.tar.bz2 gsoc2013-epiphany-a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7.tar.lz gsoc2013-epiphany-a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7.tar.xz gsoc2013-epiphany-a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7.tar.zst gsoc2013-epiphany-a8f5531f3faf5fd2166a0dc7357bbcdcb5075ef7.zip |
Focus history entry on _show. Do not try to update paste menu item using
2003-11-08 Marco Pesenti Gritti <marco@gnome.org>
* src/bookmarks/ephy-bookmarks-editor.c:
(ephy_bookmarks_editor_update_menu):
* src/ephy-history-window.c: (ephy_history_window_show),
(ephy_history_window_class_init),
(ephy_history_window_update_menu):
Focus history entry on _show.
Do not try to update paste menu item using the wait
api, it can cause a crash on a timeout and anyway
it's incosistent what we do in main window.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 5 | ||||
-rw-r--r-- | src/ephy-history-window.c | 18 |
3 files changed, 28 insertions, 8 deletions
@@ -1,3 +1,16 @@ +2003-11-08 Marco Pesenti Gritti <marco@gnome.org> + + * src/bookmarks/ephy-bookmarks-editor.c: + (ephy_bookmarks_editor_update_menu): + * src/ephy-history-window.c: (ephy_history_window_show), + (ephy_history_window_class_init), + (ephy_history_window_update_menu): + + Focus history entry on _show. + Do not try to update paste menu item using the wait + api, it can cause a crash on a timeout and anyway + it's incosistent what we do in main window. + 2003-11-05 Christian Persch <chpe@cvs.gnome.org> * data/glade/print.glade: diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index d34d8a805..6e468c900 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -803,16 +803,13 @@ ephy_bookmarks_editor_update_menu (EphyBookmarksEditor *editor) if (GTK_IS_EDITABLE (focus_widget)) { gboolean has_selection; - gboolean clipboard_contains_text; has_selection = gtk_editable_get_selection_bounds (GTK_EDITABLE (focus_widget), NULL, NULL); - clipboard_contains_text = gtk_clipboard_wait_is_text_available - (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); cut = has_selection; copy = has_selection; - paste = clipboard_contains_text; + paste = TRUE; select_all = TRUE; } else diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index cf99b62dd..1a6816764 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -543,9 +543,20 @@ ephy_history_window_get_type (void) } static void +ephy_history_window_show (GtkWidget *widget) +{ + EphyHistoryWindow *window = EPHY_HISTORY_WINDOW (widget); + + gtk_widget_grab_focus (window->priv->search_entry); + + GTK_WIDGET_CLASS (parent_class)->show (widget); +} + +static void ephy_history_window_class_init (EphyHistoryWindowClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); parent_class = g_type_class_peek_parent (klass); @@ -555,6 +566,8 @@ ephy_history_window_class_init (EphyHistoryWindowClass *klass) object_class->get_property = ephy_history_window_get_property; object_class->dispose = ephy_history_window_dispose; + widget_class->show = ephy_history_window_show; + g_object_class_install_property (object_class, PROP_HISTORY, g_param_spec_object ("history", @@ -636,16 +649,13 @@ ephy_history_window_update_menu (EphyHistoryWindow *editor) if (GTK_IS_EDITABLE (focus_widget)) { gboolean has_selection; - gboolean clipboard_contains_text; has_selection = gtk_editable_get_selection_bounds (GTK_EDITABLE (focus_widget), NULL, NULL); - clipboard_contains_text = gtk_clipboard_wait_is_text_available - (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); cut = has_selection; copy = has_selection; - paste = clipboard_contains_text; + paste = TRUE; select_all = TRUE; } else |