aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-new-bookmark.c22
-rw-r--r--src/bookmarks/ephy-new-bookmark.h7
-rw-r--r--src/ephy-history-window.c3
-rw-r--r--src/popup-commands.c3
-rw-r--r--src/window-commands.c3
5 files changed, 4 insertions, 34 deletions
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index db69e4ee7..332e737bd 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -185,10 +185,12 @@ response_cb (EphyNewBookmark *new_bookmark,
"epiphany",
"to-create-new-bookmark");
break;
- case GTK_RESPONSE_CANCEL:
- break;
+ /* For both OK and Cancel we want to destroy the dialog */
case GTK_RESPONSE_OK:
ephy_new_bookmark_add (new_bookmark);
+ case GTK_RESPONSE_CANCEL:
+ default:
+ gtk_widget_destroy (GTK_WIDGET (new_bookmark));
break;
}
}
@@ -465,19 +467,3 @@ ephy_new_bookmark_get_id (EphyNewBookmark *bookmark)
{
return bookmark->priv->id;
}
-
-/* Convenience function for callers */
-
-void
-ephy_new_bookmark_response_cb (EphyNewBookmark *bookmark,
- int response_id,
- gpointer user_data)
-{
- switch (response_id)
- {
- case GTK_RESPONSE_CANCEL:
- case GTK_RESPONSE_OK:
- gtk_widget_destroy (GTK_WIDGET (bookmark));
- break;
- }
-}
diff --git a/src/bookmarks/ephy-new-bookmark.h b/src/bookmarks/ephy-new-bookmark.h
index fae8e3b7c..15b3c2c1b 100644
--- a/src/bookmarks/ephy-new-bookmark.h
+++ b/src/bookmarks/ephy-new-bookmark.h
@@ -69,13 +69,6 @@ void ephy_new_bookmark_set_smarturl (EphyNewBookmark *bookmark,
gulong ephy_new_bookmark_get_id (EphyNewBookmark *bookmark);
-/* Convenience function for callers */
-
-void ephy_new_bookmark_response_cb (EphyNewBookmark *bookmark,
- int response_id,
- gpointer user_data);
-
-
G_END_DECLS
#endif /* EPHY_NEW_BOOKMARK_H */
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 5de92482b..2d273a4a0 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -469,9 +469,6 @@ cmd_bookmark_page (EggAction *action,
(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);
}
}
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 78c335c55..3b5c76f1a 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -165,9 +165,6 @@ popup_cmd_bookmark_link (EggAction *action,
(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);
}
}
diff --git a/src/window-commands.c b/src/window-commands.c
index a4f1ef004..1647d8fd2 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -285,9 +285,6 @@ window_cmd_file_bookmark_page (EggAction *action,
(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);
}
}