aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.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/window-commands.c
parent1044f92a19ab225a74e7829561cfe1733aee6913 (diff)
downloadgsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.tar
gsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.tar.gz
gsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.tar.bz2
gsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.tar.lz
gsoc2013-epiphany-bacb58f2fda5bef60b55500aa79e17be7aa8a384.tar.xz
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/window-commands.c')
-rw-r--r--src/window-commands.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index 5d50f6e05..a4f1ef004 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -276,16 +276,20 @@ window_cmd_file_bookmark_page (EggAction *action,
icon = ephy_tab_get_favicon_url (tab);
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
- new_bookmark = ephy_new_bookmark_new
- (bookmarks, GTK_WINDOW (window), location);
- ephy_new_bookmark_set_title
- (EPHY_NEW_BOOKMARK (new_bookmark), title);
- ephy_new_bookmark_set_icon
- (EPHY_NEW_BOOKMARK (new_bookmark), icon);
- 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, GTK_WINDOW (window), location);
+ ephy_new_bookmark_set_title
+ (EPHY_NEW_BOOKMARK (new_bookmark), title);
+ ephy_new_bookmark_set_icon
+ (EPHY_NEW_BOOKMARK (new_bookmark), icon);
+ g_signal_connect (G_OBJECT (new_bookmark), "response",
+ G_CALLBACK (ephy_new_bookmark_response_cb),
+ NULL);
+ gtk_widget_show (new_bookmark);
+ }
}
void