summaryrefslogtreecommitdiff
path: root/gtk/gtkprintbackend.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2008-09-17 22:07:10 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-09-17 22:07:10 +0000
commit8ec27f776004b14839742829a85be9e580ff2799 (patch)
tree021114df61a35a9a48121b0e49ecb2aea5300ca3 /gtk/gtkprintbackend.h
parentdf619a1370273305726416fc5eb04b46c267915c (diff)
downloadgtk+-8ec27f776004b14839742829a85be9e580ff2799.tar.gz
Bug 346903 – gtk_enumerate_printers needs events to complete
2008-09-17 Matthias Clasen <mclasen@redhat.com> Bug 346903 – gtk_enumerate_printers needs events to complete * gtk/gtkprintbackend.h: * gtk/gtkprintbackend.c: Add a GtkPrintBackend::status property. * modules/printbackends/cups/gtkcupsutils.h: * modules/printbackends/cups/gtkcupsutils.c: Turn the connection test into a tristate available/unavailable/in progress. * modules/printbackends/cups/gtkprintbackendcups.c: Use a single connection test instance for getting the default printer and for getting the printer list. Set the GtkPrintBackend::status property according to the result of the connection test. Use the printer-type attribute to find the default printer, if cups supports it. * gtk/gtkprinter.c: When enumerating printers, give up when the backend status is 'unavailable'. * gtk/gtkprintunixdialog.c (printer_status_cb): Select the printer when it is the default and nothing else has been selected yet. svn path=/trunk/; revision=21417
Diffstat (limited to 'gtk/gtkprintbackend.h')
-rw-r--r--gtk/gtkprintbackend.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkprintbackend.h b/gtk/gtkprintbackend.h
index 389ef00a53..2305e32c31 100644
--- a/gtk/gtkprintbackend.h
+++ b/gtk/gtkprintbackend.h
@@ -55,6 +55,13 @@ GQuark gtk_print_backend_error_quark (void);
#define GTK_IS_PRINT_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PRINT_BACKEND))
#define GTK_PRINT_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PRINT_BACKEND, GtkPrintBackendClass))
+typedef enum
+{
+ GTK_PRINT_BACKEND_STATUS_UNKNOWN,
+ GTK_PRINT_BACKEND_STATUS_OK,
+ GTK_PRINT_BACKEND_STATUS_UNAVAILABLE
+} GtkPrintBackendStatus;
+
struct _GtkPrintBackend
{
GObject parent_instance;