diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-04-24 17:00:44 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-04-24 17:00:44 +0000 |
commit | 2e9cc2f6931541fa5b0d2a3c0ce0670b91f53c03 (patch) | |
tree | 3546e5be3c8364728647e0433724127ff7884040 /gtk/gtkprintoperation-win32.c | |
parent | 7261cff2d77aadb404bd8ddb0293e7f2cdc7e98b (diff) | |
download | gtk+-2e9cc2f6931541fa5b0d2a3c0ce0670b91f53c03.tar.gz |
Refactor the gtk_print_operation_run() code and add an _async version.
2006-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkprintoperation.c (gtk_print_operation_run_async): Refactor the
gtk_print_operation_run() code and add an _async version.
* gtk/gtkprintoperation-private.h:
* gtk/gtkprintoperation-unix.c
(_gtk_print_operation_platform_backend_run_dialog_async)
(gtk_print_run_page_setup_dialog_async): Variants of the run functions
which don't call gtk_dialog_run(), but only show the dialog and return,
and handle the response in a signal handler.
* gtk/gtkprintoperation-win32.c (gtk_print_run_page_setup_dialog_async)
(_gtk_print_operation_platform_backend_run_dialog_async): Implement these
by calling the sync versions.
Diffstat (limited to 'gtk/gtkprintoperation-win32.c')
-rw-r--r-- | gtk/gtkprintoperation-win32.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index 7f441abc71..079ae1f229 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -1465,6 +1465,20 @@ _gtk_print_operation_platform_backend_run_dialog (GtkPrintOperation *op, return result; } +void +_gtk_print_operation_platform_backend_run_dialog_async (GtkPrintOperation *op, + GtkWindow *parent, + GtkPrintOperationPrintFunc print_cb) +{ + gboolean do_print; + + _gtk_print_operation_platform_backend_run_dialog (op, parent, &do_print, NULL); + if (do_print) + print_cb (op); + else + _gtk_print_operation_set_status (op, GTK_PRINT_STATUS_FINISHED_ABORTED, NULL); +} + GtkPageSetup * gtk_print_run_page_setup_dialog (GtkWindow *parent, GtkPageSetup *page_setup, @@ -1596,3 +1610,17 @@ gtk_print_run_page_setup_dialog (GtkWindow *parent, return page_setup; } + +void +gtk_print_run_page_setup_dialog_async (GtkWindow *parent, + GtkPageSetup *page_setup, + GtkPrintSettings *settings, + GtkPageSetupDoneFunc done_cb, + gpointer data) +{ + GtkPageSetup *page_setup; + + page_setup = gtk_print_run_page_setup_dialog (parent, page_setup, settings); + done_cb (page_setup, data); + g_object_unref (page_setup); +} |