diff options
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 |