aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-03-25 02:01:35 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-03-25 02:01:35 +0800
commitbb4528f9eef4b9417a4d7a2c7c012d8a3136170a (patch)
tree84b00ab9e0ca17eee787127bb79a1e3f8607b498 /src/window-commands.c
parent2dba798e1f6e6c29db3bffa922b9831197bd3e16 (diff)
downloadgsoc2013-epiphany-bb4528f9eef4b9417a4d7a2c7c012d8a3136170a.tar
gsoc2013-epiphany-bb4528f9eef4b9417a4d7a2c7c012d8a3136170a.tar.gz
gsoc2013-epiphany-bb4528f9eef4b9417a4d7a2c7c012d8a3136170a.tar.bz2
gsoc2013-epiphany-bb4528f9eef4b9417a4d7a2c7c012d8a3136170a.tar.lz
gsoc2013-epiphany-bb4528f9eef4b9417a4d7a2c7c012d8a3136170a.tar.xz
gsoc2013-epiphany-bb4528f9eef4b9417a4d7a2c7c012d8a3136170a.tar.zst
gsoc2013-epiphany-bb4528f9eef4b9417a4d7a2c7c012d8a3136170a.zip
Fix warning opening selector. Destroy the editor on exit, ref the shell so
2003-03-24 Marco Pesenti Gritti <marco@it.gnome.org> * src/bookmarks/ephy-bookmarks.c: (update_topics_list), (ephy_bookmarks_set_keyword), (ephy_bookmarks_unset_keyword): * src/bookmarks/ephy-topics-selector.c: (ephy_topics_selector_set_property): * src/window-commands.c: (bookmarks_hide_cb), (shell_weak_notify_cb), (window_cmd_go_bookmarks): Fix warning opening selector. Destroy the editor on exit, ref the shell so you can have just the editor open. Build the key list and set is as property of the node (should solve autocompletion problems).
Diffstat (limited to 'src/window-commands.c')
-rw-r--r--src/window-commands.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index c64761092..3da431353 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -19,6 +19,7 @@
#include <config.h>
#include "ephy-shell.h"
+#include "ephy-debug.h"
#include "window-commands.h"
#include "find-dialog.h"
#include "print-dialog.h"
@@ -232,6 +233,20 @@ window_cmd_file_new_tab (EggAction *action,
EPHY_NEW_TAB_JUMP);
}
+static void
+bookmarks_hide_cb (GtkWidget *widget, gpointer data)
+{
+ LOG ("Unref shell for bookmarks editor")
+ g_object_unref (ephy_shell);
+}
+
+static void
+shell_weak_notify_cb (gpointer data, GObject *object)
+{
+ LOG ("Bookmarks editor destroyed")
+ gtk_widget_destroy (GTK_WIDGET (data));
+}
+
void
window_cmd_go_bookmarks (EggAction *action,
EphyWindow *window)
@@ -244,6 +259,16 @@ window_cmd_go_bookmarks (EggAction *action,
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
g_assert (bookmarks != NULL);
dialog = ephy_bookmarks_editor_new (bookmarks);
+ g_object_weak_ref (G_OBJECT (ephy_shell),
+ shell_weak_notify_cb, dialog);
+ g_signal_connect (dialog, "hide",
+ G_CALLBACK (bookmarks_hide_cb), NULL);
+ }
+
+ if (!GTK_WIDGET_VISIBLE (dialog))
+ {
+ LOG ("Ref shell for bookmarks editor")
+ g_object_ref (ephy_shell);
}
ephy_bookmarks_editor_set_parent (EPHY_BOOKMARKS_EDITOR (dialog),