diff options
author | Martin Kretzschmar <martink@src.gnome.org> | 2004-12-20 21:08:38 (GMT) |
---|---|---|
committer | Martin Kretzschmar <martink@src.gnome.org> | 2004-12-20 21:08:38 (GMT) |
commit | 4c2778e5714bbd5ae60e74133d1482acf162e719 (patch) | |
tree | f1df551ead28a47e615396ae038ac2dea509219e /pdf/xpdf/eog-hig-dialog.c | |
parent | 25a9ea784b39a717a6b0f27ab4a8c21d9b3afc82 (diff) |
port from GPdfHIGDialog to GtkMessageDialog.
* xpdf/gpdf-control.cc (gpdf_control_private_error_dialog):
(gpdf_control_private_warn_dialog, gpdf_control_private_info_dialog)
(overwrite_existing_file, save_error_dialog): port from GPdfHIGDialog to
GtkMessageDialog.
* xpdf/Makefile.am (libgpdf_a_SOURCES): remove gpdf-hig-dialog.[ch]
* xpdf/gpdf-hig-dialog.c, xpdf/gpdf-hig-dialog.h, xpdf/eog-hig-dialog.c,
xpdf/eog-hig-dialog.h: remove, no longer needed with gtk 2.5
Diffstat (limited to 'pdf/xpdf/eog-hig-dialog.c')
-rw-r--r-- | pdf/xpdf/eog-hig-dialog.c | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/pdf/xpdf/eog-hig-dialog.c b/pdf/xpdf/eog-hig-dialog.c deleted file mode 100644 index 791d437..0000000 --- a/pdf/xpdf/eog-hig-dialog.c +++ /dev/null @@ -1,89 +0,0 @@ -#include <string.h> -#include <gtk/gtk.h> -#include <libgnome/gnome-macros.h> -#include "eog-hig-dialog.h" - - -GNOME_CLASS_BOILERPLATE (EogHigDialog, - eog_hig_dialog, - GtkDialog, - GTK_TYPE_DIALOG); - -void -eog_hig_dialog_class_init (EogHigDialogClass *klass) -{ -} - -void -eog_hig_dialog_instance_init (EogHigDialog *dlg) -{ -} - - -GtkWidget* -eog_hig_dialog_new (const char *stock_id, const char *header, const char *body, gboolean modal) -{ - GtkWidget *dlg; - GtkWidget *hbox; - GtkWidget *image; - GtkWidget *label; - int header_len; - int body_len; - int message_len; - char *message; - - g_return_val_if_fail (stock_id != NULL, NULL); - g_return_val_if_fail (header != NULL, NULL); - - dlg = gtk_widget_new (EOG_TYPE_HIG_DIALOG, - "border-width", 6, - "resizable", FALSE, - "has-separator", FALSE, - "modal", modal, - "title", "", - NULL); - - hbox = gtk_widget_new (GTK_TYPE_HBOX, - "homogeneous", FALSE, - "spacing", 12, - "border-width", 6, - NULL); - - image = gtk_widget_new (GTK_TYPE_IMAGE, - "stock", stock_id, - "icon-size", GTK_ICON_SIZE_DIALOG, - "yalign", 0.0, - NULL); - gtk_container_add (GTK_CONTAINER (hbox), image); - - - header_len = strlen (header); - body_len = body ? strlen (body) : 0; - message_len = header_len + body_len + 64; - - message = g_new0 (char, message_len); - - if (body != NULL) { - g_snprintf (message, message_len, - "<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s", header, body); - } - else { - g_snprintf (message, message_len, - "<span weight=\"bold\" size=\"larger\">%s</span>\n", header); - } - - label = gtk_label_new (message); - g_object_set (G_OBJECT (label), - "use-markup", TRUE, - "wrap", TRUE, - "yalign", 0.0, - NULL); - - gtk_container_add (GTK_CONTAINER (hbox), label); - gtk_widget_show_all (hbox); - - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), hbox); - g_object_set (G_OBJECT (GTK_DIALOG (dlg)->vbox), "spacing", 12, NULL); - - return dlg; -} |