]> www.fi.muni.cz Git - evince.git/commitdiff
port from GPdfHIGDialog to GtkMessageDialog. GPDF_2_9_1
authorMartin Kretzschmar <martink@src.gnome.org>
Mon, 20 Dec 2004 21:08:38 +0000 (21:08 +0000)
committerMartin Kretzschmar <martink@src.gnome.org>
Mon, 20 Dec 2004 21:08:38 +0000 (21:08 +0000)
* 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

pdf/xpdf/Makefile.am
pdf/xpdf/eog-hig-dialog.c [deleted file]
pdf/xpdf/eog-hig-dialog.h [deleted file]
pdf/xpdf/gpdf-hig-dialog.c [deleted file]
pdf/xpdf/gpdf-hig-dialog.h [deleted file]

index 0ec9f27ea63a9591552f4d8d30422041fb841016..7d86dbd18a70075f69a0d84c2ff810920f143a3d 100644 (file)
@@ -121,8 +121,6 @@ libgpdf_a_SOURCES =                 \
        GPOutputDev.h                   \
        PSOutputDev.cc                  \
        PSOutputDev.h                   \
-       gpdf-hig-dialog.c               \
-       gpdf-hig-dialog.h               \
        Thumb.cc                        \
        Thumb.h                         \
        gpdf-control.cc                 \
diff --git a/pdf/xpdf/eog-hig-dialog.c b/pdf/xpdf/eog-hig-dialog.c
deleted file mode 100644 (file)
index 791d437..0000000
+++ /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;
-}
diff --git a/pdf/xpdf/eog-hig-dialog.h b/pdf/xpdf/eog-hig-dialog.h
deleted file mode 100644 (file)
index 506e332..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _EOG_HIG_DIALOG_H_
-#define _EOG_HIG_DIALOG_H_
-
-#include <gtk/gtkdialog.h>
-
-G_BEGIN_DECLS
-
-#define EOG_TYPE_HIG_DIALOG              (eog_hig_dialog_get_type ())
-#define EOG_HIG_DIALOG(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), EOG_TYPE_HIG_DIALOG, EogHigDialog))
-#define EOG_HIG_DIALOG_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), EOG_TYPE_HIG_DIALOG, EogHigDialogClass))
-#define EOG_IS_HIG_DIALOG(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EOG_TYPE_HIG_DIALOG))
-#define EOG_IS_HIG_DIALOG_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), EOG_TYPE_HIG_DIALOG))
-
-typedef struct _EogHigDialog EogHigDialog;
-typedef struct _EogHigDialogClass EogHigDialogClass;
-typedef struct _EogHigDialogPrivate EogHigDialogPrivate;
-
-
-struct _EogHigDialog {
-       GtkDialog dialog;
-};
-
-struct _EogHigDialogClass {
-       GtkDialogClass parent_class;
-};
-
-
-GType       eog_hig_dialog_get_type         (void);
-GtkWidget*  eog_hig_dialog_new              (const char *stock_id, const char *header, const char *body, gboolean modal);
-
-
-G_END_DECLS
-
-#endif /* _EOG_HIG_DIALOG_H_ */
diff --git a/pdf/xpdf/gpdf-hig-dialog.c b/pdf/xpdf/gpdf-hig-dialog.c
deleted file mode 100644 (file)
index 663fde0..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#include <string.h>
-#include <gtk/gtk.h>
-#include <libgnome/gnome-macros.h>
-#include "gpdf-hig-dialog.h"
-
-
-GNOME_CLASS_BOILERPLATE (GpdfHigDialog, 
-                        gpdf_hig_dialog,
-                        GtkDialog,
-                        GTK_TYPE_DIALOG);
-
-void
-gpdf_hig_dialog_class_init (GpdfHigDialogClass *klass)
-{
-}
-
-void 
-gpdf_hig_dialog_instance_init (GpdfHigDialog *dlg)
-{
-}
-
-
-GtkWidget*  
-gpdf_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 (GPDF_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;
-}
diff --git a/pdf/xpdf/gpdf-hig-dialog.h b/pdf/xpdf/gpdf-hig-dialog.h
deleted file mode 100644 (file)
index 5696be0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _GPDF_HIG_DIALOG_H_
-#define _GPDF_HIG_DIALOG_H_
-
-#include <gtk/gtkdialog.h>
-
-G_BEGIN_DECLS
-
-#define GPDF_TYPE_HIG_DIALOG              (gpdf_hig_dialog_get_type ())
-#define GPDF_HIG_DIALOG(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPDF_TYPE_HIG_DIALOG, GpdfHigDialog))
-#define GPDF_HIG_DIALOG_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GPDF_TYPE_HIG_DIALOG, GpdfHigDialogClass))
-#define GPDF_IS_HIG_DIALOG(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPDF_TYPE_HIG_DIALOG))
-#define GPDF_IS_HIG_DIALOG_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GPDF_TYPE_HIG_DIALOG))
-
-typedef struct _GpdfHigDialog GpdfHigDialog;
-typedef struct _GpdfHigDialogClass GpdfHigDialogClass;
-typedef struct _GpdfHigDialogPrivate GpdfHigDialogPrivate;
-
-
-struct _GpdfHigDialog {
-       GtkDialog dialog;
-};
-
-struct _GpdfHigDialogClass {
-       GtkDialogClass parent_class;
-};
-
-
-GType       gpdf_hig_dialog_get_type         (void);
-GtkWidget*  gpdf_hig_dialog_new              (const char *stock_id, const char *header, const char *body, gboolean modal);
-
-
-G_END_DECLS
-
-#endif /* _GPDF_HIG_DIALOG_H_ */