aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-27 04:02:22 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-27 04:02:22 +0800
commite254f96f141f66bd7669426d3a8543047d734bfa (patch)
tree35d93f1b6a42509fbcc3886a46bec12248ceab56 /src/bookmarks
parentc463cbf5210374398fd6897eedbc2b3b2c2578f6 (diff)
downloadgsoc2013-epiphany-e254f96f141f66bd7669426d3a8543047d734bfa.tar
gsoc2013-epiphany-e254f96f141f66bd7669426d3a8543047d734bfa.tar.gz
gsoc2013-epiphany-e254f96f141f66bd7669426d3a8543047d734bfa.tar.bz2
gsoc2013-epiphany-e254f96f141f66bd7669426d3a8543047d734bfa.tar.lz
gsoc2013-epiphany-e254f96f141f66bd7669426d3a8543047d734bfa.tar.xz
gsoc2013-epiphany-e254f96f141f66bd7669426d3a8543047d734bfa.tar.zst
gsoc2013-epiphany-e254f96f141f66bd7669426d3a8543047d734bfa.zip
Use new gtk+ HIG message dialogue API. Fixes bug #130232.
2004-10-26 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-gui.c: (ephy_gui_confirm_overwrite_file): * src/bookmarks/ephy-new-bookmark.c: (duplicate_dialog_construct): * src/ephy-history-window.c: (confirmation_dialog_response_cb), (confirmation_dialog_construct), (cmd_clear): * src/ephy-session.c: (offer_to_resume): * src/ephy-window.c: (confirm_close_with_modified_forms): Use new gtk+ HIG message dialogue API. Fixes bug #130232.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-new-bookmark.c67
1 files changed, 17 insertions, 50 deletions
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index 9592f686e..1b37f6fa5 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -22,6 +22,13 @@
#include "config.h"
#endif
+#include "ephy-new-bookmark.h"
+#include "ephy-state.h"
+#include "ephy-topics-selector.h"
+#include "ephy-debug.h"
+#include "ephy-stock-icons.h"
+#include "ephy-gui.h"
+
#include <gtk/gtktable.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkentry.h>
@@ -31,16 +38,11 @@
#include <gtk/gtkimage.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkeditable.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkmessagedialog.h>
#include <glib/gi18n.h>
#include <string.h>
-#include "ephy-new-bookmark.h"
-#include "ephy-state.h"
-#include "ephy-topics-selector.h"
-#include "ephy-debug.h"
-#include "ephy-stock-icons.h"
-#include "ephy-gui.h"
-
static void ephy_new_bookmark_class_init (EphyNewBookmarkClass *klass);
static void ephy_new_bookmark_init (EphyNewBookmark *editor);
static void ephy_new_bookmark_finalize (GObject *object);
@@ -304,55 +306,20 @@ duplicate_dialog_construct (GtkWindow *parent,
const char *title)
{
GtkWidget *dialog;
- GtkWidget *hbox, *vbox, *label, *image;
char *str, *tmp_str, *tmp_title;
- /* 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_OK,
- NULL);
-
- gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
-
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
-
- hbox = gtk_hbox_new (FALSE, 6);
- gtk_widget_show (hbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
- TRUE, TRUE, 0);
-
- image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO,
- GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
- gtk_widget_show (image);
- gtk_box_pack_start (GTK_BOX (hbox), image, TRUE, TRUE, 0);
-
- vbox = gtk_vbox_new (FALSE, 6);
- gtk_widget_show (vbox);
- gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
-
- label = gtk_label_new (NULL);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
tmp_title = g_markup_printf_escaped ("<b>%s</b>", title);
tmp_str = g_strdup_printf (_("A bookmark titled %s already exists for this page."),
- tmp_title);
+ tmp_title);
str = g_strconcat ("<big>", tmp_str, "</big>", NULL);
- gtk_label_set_markup (GTK_LABEL (label), str);
- g_free (tmp_title);
- g_free (tmp_str);
+
+ dialog = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_MODAL,
+ GTK_MESSAGE_INFO, GTK_BUTTONS_OK, NULL);
+ gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), str);
g_free (str);
- gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
+
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Duplicated Bookmark"));
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
return dialog;
}