aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmark-action.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-bookmark-action.c
parenta716fbc5466f2f33a094062745f2d07b60df340d (diff)
downloadgsoc2013-epiphany-f686d272ac4558e0ebda8f3aa873d2d9eefb17b5.tar.gz
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-bookmark-action.c')
-rw-r--r--src/bookmarks/ephy-bookmark-action.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index f8bc243f8..582a22fd8 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -32,7 +32,6 @@
#include "ephy-dnd.h"
#include "ephy-bookmarksbar.h"
#include "ephy-bookmarks.h"
-#include "ephy-bookmark-properties.h"
#include "ephy-favicon-cache.h"
#include "ephy-shell.h"
#include "ephy-debug.h"
@@ -57,8 +56,6 @@ struct EphyBookmarkActionPrivate
EphyNode *node;
gboolean smart_url;
guint cache_handler;
- GtkWidget *prop_dialog;
-
guint motion_handler;
gint drag_x;
gint drag_y;
@@ -523,25 +520,18 @@ move_right_activate_cb (GtkWidget *menu, GtkWidget *proxy)
}
static void
-properties_activate_cb (GtkWidget *menu, EphyBookmarkAction *action)
+properties_activate_cb (GtkWidget *menu,
+ EphyBookmarkAction *action)
{
GtkWidget *window, *proxy;
EphyBookmarks *bookmarks;
- EphyBookmarkActionPrivate *p = action->priv;
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
proxy = g_object_get_data (G_OBJECT (menu), "proxy");
window = gtk_widget_get_toplevel (proxy);
- if (p->prop_dialog == NULL)
- {
- p->prop_dialog = ephy_bookmark_properties_new
- (bookmarks, p->node, GTK_WINDOW (window));
- g_object_add_weak_pointer (G_OBJECT (p->prop_dialog),
- (gpointer)&p->prop_dialog);
- }
-
- gtk_widget_show (p->prop_dialog);
+ ephy_bookmarks_show_bookmark_properties
+ (bookmarks, action->priv->node, window);
}
static void
@@ -741,11 +731,7 @@ bookmark_changed_cb (EphyNode *node,
static void
bookmark_destroy_cb (EphyNode *node, EphyBookmarkAction *action)
{
- if (action->priv->prop_dialog != NULL)
- {
- gtk_widget_destroy (action->priv->prop_dialog);
- action->priv->node = NULL;
- }
+ action->priv->node = NULL;
}
static void
@@ -831,17 +817,11 @@ ephy_bookmark_action_get_property (GObject *object,
static void
ephy_bookmark_action_finalize (GObject *object)
{
- EphyBookmarkAction *eba = EPHY_BOOKMARK_ACTION (object);
-
- if (eba->priv->prop_dialog)
- {
- g_object_remove_weak_pointer (G_OBJECT (eba->priv->prop_dialog),
- (gpointer)&eba->priv->prop_dialog);
- }
+ /* EphyBookmarkAction *eba = EPHY_BOOKMARK_ACTION (object);*/
LOG ("Bookmark action %p finalized", object)
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ parent_class->finalize (object);
}
static void