diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-03-23 07:59:04 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-03-23 07:59:04 +0800 |
commit | 1cbf7f5f14b162826d5c016d836d8c2243986f58 (patch) | |
tree | 8342dd600cf3714ce92d0f1115914bfd23576955 /src/window-commands.c | |
parent | 63135332334125311908d415423cd15602cd6535 (diff) | |
download | gsoc2013-epiphany-1cbf7f5f14b162826d5c016d836d8c2243986f58.tar.gz gsoc2013-epiphany-1cbf7f5f14b162826d5c016d836d8c2243986f58.tar.zst gsoc2013-epiphany-1cbf7f5f14b162826d5c016d836d8c2243986f58.zip |
Never destroy but hide the bme. Present the window on activate. Allow to
2003-03-23 Marco Pesenti Gritti <marco@it.gnome.org>
* src/bookmarks/ephy-bookmarks-editor.c: (get_target_window),
(cmd_open_bookmarks_in_tabs), (cmd_open_bookmarks_in_browser),
(ephy_bookmarks_editor_finalize),
(ephy_bookmarks_editor_node_activated_cb), (delete_event_cb),
(ephy_bookmarks_editor_construct),
(ephy_bookmarks_editor_set_parent), (ephy_bookmarks_editor_new):
* src/bookmarks/ephy-bookmarks-editor.h:
* src/window-commands.c: (window_cmd_go_bookmarks):
Never destroy but hide the bme.
Present the window on activate.
Allow to put the editor in the background.
Smarter way to choose the window where to load the bookmark.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index bc793234d..c64761092 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -236,13 +236,19 @@ void window_cmd_go_bookmarks (EggAction *action, EphyWindow *window) { - GtkWidget *dialog; + static GtkWidget *dialog = NULL; EphyBookmarks *bookmarks; - bookmarks = ephy_shell_get_bookmarks (ephy_shell); - g_assert (bookmarks != NULL); - dialog = ephy_bookmarks_editor_new (bookmarks, GTK_WINDOW (window)); - gtk_widget_show (dialog); + if (dialog == NULL) + { + bookmarks = ephy_shell_get_bookmarks (ephy_shell); + g_assert (bookmarks != NULL); + dialog = ephy_bookmarks_editor_new (bookmarks); + } + + ephy_bookmarks_editor_set_parent (EPHY_BOOKMARKS_EDITOR (dialog), + GTK_WIDGET (window)); + gtk_window_present (GTK_WINDOW (dialog)); } void |