diff options
author | David Bordoley <bordoley@msu.edu> | 2003-05-14 01:38:43 +0800 |
---|---|---|
committer | Dave Bordoley <Bordoley@src.gnome.org> | 2003-05-14 01:38:43 +0800 |
commit | 704e1716a071203b9eb81be8f525eab008d2f547 (patch) | |
tree | a0aebe8c056fd5ac1b69ff0c94404deb16648421 /src | |
parent | acddd88152e9ffbafda64913ce5173d2648aa4c3 (diff) | |
download | gsoc2013-epiphany-704e1716a071203b9eb81be8f525eab008d2f547.tar gsoc2013-epiphany-704e1716a071203b9eb81be8f525eab008d2f547.tar.gz gsoc2013-epiphany-704e1716a071203b9eb81be8f525eab008d2f547.tar.bz2 gsoc2013-epiphany-704e1716a071203b9eb81be8f525eab008d2f547.tar.lz gsoc2013-epiphany-704e1716a071203b9eb81be8f525eab008d2f547.tar.xz gsoc2013-epiphany-704e1716a071203b9eb81be8f525eab008d2f547.tar.zst gsoc2013-epiphany-704e1716a071203b9eb81be8f525eab008d2f547.zip |
Don't go modal when showing the duplicate bookmark dialog.
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/ephy-new-bookmark.c | 28 |
1 files changed, 24 insertions, 4 deletions
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; } |