aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-new-bookmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/ephy-new-bookmark.c')
-rw-r--r--src/bookmarks/ephy-new-bookmark.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index e3a50f3a5..6394a308f 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -177,9 +177,9 @@ ephy_new_bookmark_add (EphyNewBookmark *new_bookmark)
}
static void
-ephy_new_bookmark_response_cb (GtkDialog *dialog,
- int response_id,
- EphyNewBookmark *new_bookmark)
+response_cb (EphyNewBookmark *new_bookmark,
+ int response_id,
+ gpointer user_data)
{
switch (response_id)
{
@@ -270,7 +270,7 @@ ephy_new_bookmark_construct (EphyNewBookmark *editor)
gtk_container_set_border_width (GTK_CONTAINER (editor), 6);
g_signal_connect (G_OBJECT (editor),
"response",
- G_CALLBACK (ephy_new_bookmark_response_cb),
+ G_CALLBACK (response_cb),
editor);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (editor)->vbox), 12);
@@ -397,3 +397,18 @@ 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;
+ }
+}