]> Pileus Git - ~andy/gtk/commitdiff
Don't use gtk_dialog_run for the error dialog, and improve the dialog in
authorMatthias Clasen <mclasen@redhat.com>
Wed, 3 May 2006 17:34:55 +0000 (17:34 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 3 May 2006 17:34:55 +0000 (17:34 +0000)
2006-05-03  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkprintoperation-unix.c (unix_finish_send): Don't
use gtk_dialog_run for the error dialog, and improve the
dialog in other ways.  (#340510, Christian Persch)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkprintoperation-unix.c
po/ChangeLog
po/POTFILES.in

index 3ec44bbcd71229d38631de35a41a2a9a311dede7..4d7952a00c56a21177452dd66b8753875e635bf2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-05-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkprintoperation-unix.c (unix_finish_send): Don't
+       use gtk_dialog_run for the error dialog, and improve the
+       dialog in other ways.  (#340510, Christian Persch)
+
        * gtk/gtkpagesetupunixdialog.c: Beautify the custom
        paper size dialog.  (#339590, patch by Christian Persch)
        
index 3ec44bbcd71229d38631de35a41a2a9a311dede7..4d7952a00c56a21177452dd66b8753875e635bf2 100644 (file)
@@ -1,5 +1,9 @@
 2006-05-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkprintoperation-unix.c (unix_finish_send): Don't
+       use gtk_dialog_run for the error dialog, and improve the
+       dialog in other ways.  (#340510, Christian Persch)
+
        * gtk/gtkpagesetupunixdialog.c: Beautify the custom
        paper size dialog.  (#339590, patch by Christian Persch)
        
index c1d14e98f053f55083502f64ad1c47cba6d3218f..4f74bf52ac9d63d6db30892ff680dc6196ff0f50 100644 (file)
@@ -36,6 +36,7 @@
 #include "gtkprinter.h"
 #include "gtkprintjob.h"
 #include "gtkalias.h"
+#include "gtkintl.h"
 
 typedef struct {
   GtkPrintJob *job;         /* the job we are sending to the printer */
@@ -90,11 +91,14 @@ unix_finish_send  (GtkPrintJob *job,
                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                         GTK_MESSAGE_ERROR,
                                         GTK_BUTTONS_CLOSE,
-                                        "Error printing: %s",
-                                        error->message);
-
-      gtk_dialog_run (GTK_DIALOG (edialog));
-      gtk_widget_destroy (edialog);
+                                        _("Error printing") /* FIXME better text */);
+      gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (edialog),
+                                                "%s", error->message);
+      gtk_window_set_modal (GTK_WINDOW (edialog), TRUE);
+      g_signal_connect (edialog, "response",
+                        G_CALLBACK (gtk_widget_destroy), NULL);
+
+      gtk_window_present (GTK_WINDOW (edialog));
     }
 }
 
@@ -305,10 +309,10 @@ _gtk_print_operation_platform_backend_run_dialog (GtkPrintOperation *op,
 
 
 typedef struct {
-  GtkPageSetup  *page_setup;
-  GFunc          done_cb;
-  gpointer       data;
-  GDestroyNotify destroy;
+  GtkPageSetup         *page_setup;
+  GtkPageSetupDoneFunc  done_cb;
+  gpointer              data;
+  GDestroyNotify        destroy;
 } PageSetupResponseData;
 
 static void
index 689eed74ed3c3d1b0655ce017edb9b9c126d6102..04430186e65f7cb3343b97af4cbdb816258b27dc 100644 (file)
@@ -1,3 +1,7 @@
+2006-05-03  Matthias Clasen  <mclasen@redhat.com>
+
+       * POTFILES.in: Add gtkprintoperation-unix.c
+
 2006-05-03  Ankit Patel  <ankit644@yahoo.com>
 
         * gu.po: Updated Gujarati Translation.
index 569c2a17d77fce30231d7b19ce55ebb8e5515ab5..86d0570b8b93c9daf25880acb6c10fdec7913f9b 100644 (file)
@@ -143,6 +143,7 @@ gtk/gtkpreview.c
 gtk/gtkprinteroptionwidget.c
 gtk/gtkprintjob.c
 gtk/gtkprintoperation.c
+gtk/gtkprintoperation-unix.c
 gtk/gtkprintoperation-win32.c
 gtk/gtkprintunixdialog.c
 gtk/gtkprogress.c