aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-history-window.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-05-13 03:22:27 +0800
committerXan Lopez <xan@src.gnome.org>2003-05-13 03:22:27 +0800
commitbacb58f2fda5bef60b55500aa79e17be7aa8a384 (patch)
treec317366a2a1f6e84cdcc386257a5c68a932b0b35 /src/ephy-history-window.c
parent1044f92a19ab225a74e7829561cfe1733aee6913 (diff)
downloadgsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.tar.gz
gsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.tar.zst
gsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.zip
Don't allow to have more than one bookmark with the same URL^H^H^Haddress,
Don't allow to have more than one bookmark with the same URL^H^H^Haddress, warn the user with a nice dialog. Fixes #110854.
Diffstat (limited to 'src/ephy-history-window.c')
-rw-r--r--src/ephy-history-window.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 6d1be0f7b..5de92482b 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -462,14 +462,18 @@ cmd_bookmark_page (EggAction *action,
node = EPHY_NODE (selection->data);
location = ephy_node_get_property_string (node, EPHY_NODE_PAGE_PROP_LOCATION);
title = ephy_node_get_property_string (node, EPHY_NODE_PAGE_PROP_TITLE);
- new_bookmark = ephy_new_bookmark_new
- (bookmarks, window, location);
- ephy_new_bookmark_set_title
- (EPHY_NEW_BOOKMARK (new_bookmark), title);
- g_signal_connect (G_OBJECT (new_bookmark), "response",
- G_CALLBACK (ephy_new_bookmark_response_cb),
- NULL);
- gtk_widget_show (new_bookmark);
+ if (ephy_new_bookmark_is_unique (bookmarks, GTK_WINDOW (window),
+ location))
+ {
+ new_bookmark = ephy_new_bookmark_new
+ (bookmarks, window, location);
+ ephy_new_bookmark_set_title
+ (EPHY_NEW_BOOKMARK (new_bookmark), title);
+ g_signal_connect (G_OBJECT (new_bookmark), "response",
+ G_CALLBACK (ephy_new_bookmark_response_cb),
+ NULL);
+ gtk_widget_show (new_bookmark);
+ }
}
g_list_free (selection);
}