diff options
author | Xan Lopez <xan@src.gnome.org> | 2003-05-13 03:22:27 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2003-05-13 03:22:27 +0800 |
commit | bacb58f2fda5bef60b55500aa79e17be7aa8a384 (patch) | |
tree | c317366a2a1f6e84cdcc386257a5c68a932b0b35 /src/popup-commands.c | |
parent | 1044f92a19ab225a74e7829561cfe1733aee6913 (diff) | |
download | gsoc2013-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/popup-commands.c')
-rw-r--r-- | src/popup-commands.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/popup-commands.c b/src/popup-commands.c index a32a33618..78c335c55 100644 --- a/src/popup-commands.c +++ b/src/popup-commands.c @@ -156,16 +156,20 @@ popup_cmd_bookmark_link (EggAction *action, } 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_smarturl - (EPHY_NEW_BOOKMARK (new_bookmark), rel); - 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_smarturl + (EPHY_NEW_BOOKMARK (new_bookmark), rel); + g_signal_connect (G_OBJECT (new_bookmark), "response", + G_CALLBACK (ephy_new_bookmark_response_cb), + NULL); + gtk_widget_show (new_bookmark); + } } void |