aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/bookmarks/ephy-new-bookmark.c28
2 files changed, 31 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2402a03fa..73db45125 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-05-13 David Bordoley <bordoley@msu.edu>
+ * src/bookmarks/ephy-new-bookmark.c: (duplicate_dialog_construct),
+ (duplicate_bookmark_response_cb), (ephy_new_bookmark_is_unique):
+
+ Don't go modal when showing the duplicate bookmark dialog.
+
+2003-05-13 David Bordoley <bordoley@msu.edu>
+
* src/ephy-history-window.c: (cmd_bookmark_page):
* src/popup-commands.c: (popup_cmd_bookmark_link):
* src/window-commands.c: (window_cmd_file_bookmark_page):
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index 332e737bd..37dc3e16d 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -298,11 +298,16 @@ duplicate_dialog_construct (GtkWindow *parent,
GtkWidget *hbox, *vbox, *label, *image;
char *str;
+ /* FIXME: We "should" use gtk_message dialog here
+ * but it doesn't support markup of text yet
+ * so we build our own. See bug 65501.
+ */
+
dialog = gtk_dialog_new_with_buttons (_("Duplicated bookmark"),
GTK_WINDOW (parent),
GTK_DIALOG_NO_SEPARATOR,
GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT,
+ GTK_RESPONSE_OK,
NULL);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
@@ -336,6 +341,19 @@ duplicate_dialog_construct (GtkWindow *parent,
return dialog;
}
+static void
+duplicate_bookmark_response_cb (EphyNewBookmark *new_bookmark,
+ int response_id,
+ gpointer user_data)
+{
+ switch (response_id)
+ {
+ case GTK_RESPONSE_OK:
+ gtk_widget_destroy (GTK_WIDGET (new_bookmark));
+ break;
+ }
+}
+
gboolean
ephy_new_bookmark_is_unique (EphyBookmarks *bookmarks,
GtkWindow *parent,
@@ -352,9 +370,11 @@ ephy_new_bookmark_is_unique (EphyBookmarks *bookmarks,
title = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_TITLE);
dialog = duplicate_dialog_construct (parent, title);
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
+ g_signal_connect (G_OBJECT (dialog),
+ "response",
+ G_CALLBACK (duplicate_bookmark_response_cb),
+ dialog);
+ gtk_widget_show (GTK_WIDGET (dialog));
return FALSE;
}