aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-editor.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-01 22:00:06 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-01 22:00:06 +0800
commitf686d272ac4558e0ebda8f3aa873d2d9eefb17b5 (patch)
treea1acf44a816af5c379c39df916735dc2882fb1d1 /src/bookmarks/ephy-bookmarks-editor.c
parenta716fbc5466f2f33a094062745f2d07b60df340d (diff)
downloadgsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.tar
gsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.tar.gz
gsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.tar.bz2
gsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.tar.lz
gsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.tar.xz
gsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.tar.zst
gsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.zip
Make sure there's only one bookmark properties dialogue for each bookmark.
2004-11-01 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmark-action.c: (properties_activate_cb), (bookmark_destroy_cb), (ephy_bookmark_action_finalize): * src/bookmarks/ephy-bookmark-properties.c: (ephy_bookmark_properties_new): * src/bookmarks/ephy-bookmark-properties.h: * src/bookmarks/ephy-bookmarks-editor.c: (show_properties_dialog), (ephy_bookmarks_editor_finalize), (ephy_bookmarks_editor_init): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_init), (ephy_bookmarks_finalize), (ephy_bookmarks_add_keyword), (prop_dialog_destroy_cb), (bookmark_destroyed_cb), (ephy_bookmarks_show_bookmark_properties): * src/bookmarks/ephy-bookmarks.h: Make sure there's only one bookmark properties dialogue for each bookmark. Fixes bug #148398 and also bug #155880.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-editor.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index be69f1dfd..ed1903cd8 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -47,7 +47,6 @@
#include <string.h>
#include "ephy-bookmarks-editor.h"
-#include "ephy-bookmark-properties.h"
#include "ephy-bookmarks-import.h"
#include "ephy-node-common.h"
#include "ephy-node-view.h"
@@ -149,7 +148,6 @@ struct EphyBookmarksEditorPrivate
GtkActionGroup *action_group;
int priority_col;
EphyBookmarksBarModel *tb_model;
- GHashTable *props_dialogs;
GtkTreeViewColumn *title_col;
GtkTreeViewColumn *address_col;
@@ -479,31 +477,11 @@ cmd_delete (GtkAction *action,
}
static void
-prop_dialog_destroy_cb (GtkWidget *dialog, EphyBookmarksEditor *editor)
+show_properties_dialog (EphyBookmarksEditor *editor,
+ EphyNode *bookmark)
{
- EphyNode *node;
-
- node = ephy_bookmark_properties_get_node (EPHY_BOOKMARK_PROPERTIES (dialog));
- g_hash_table_remove (editor->priv->props_dialogs, node);
-}
-
-static void
-show_properties_dialog (EphyBookmarksEditor *editor, EphyNode *node)
-{
- GtkWidget *dialog;
-
- dialog = g_hash_table_lookup (editor->priv->props_dialogs, node);
-
- if (!dialog)
- {
- dialog = ephy_bookmark_properties_new
- (editor->priv->bookmarks, node, GTK_WINDOW (editor));
- g_signal_connect (dialog, "destroy",
- G_CALLBACK (prop_dialog_destroy_cb), editor);
- g_hash_table_insert (editor->priv->props_dialogs, node, dialog);
- }
-
- gtk_window_present (GTK_WINDOW (dialog));
+ ephy_bookmarks_show_bookmark_properties
+ (editor->priv->bookmarks, bookmark, GTK_WIDGET (editor));
}
static void
@@ -928,8 +906,6 @@ ephy_bookmarks_editor_finalize (GObject *object)
(gpointer *)&editor->priv->window);
}
- g_hash_table_destroy (editor->priv->props_dialogs);
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -1682,8 +1658,6 @@ ephy_bookmarks_editor_init (EphyBookmarksEditor *editor)
{
editor->priv = EPHY_BOOKMARKS_EDITOR_GET_PRIVATE (editor);
- editor->priv->props_dialogs = g_hash_table_new (g_direct_hash,
- g_direct_equal);
editor->priv->tb_model = EPHY_BOOKMARKSBAR_MODEL
(ephy_bookmarks_get_toolbars_model
(ephy_shell_get_bookmarks (ephy_shell)));