summaryrefslogtreecommitdiff
path: root/panels/printers/pp-new-printer-dialog.h
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2012-09-03 21:25:59 +0200
committerMarek Kasik <mkasik@redhat.com>2012-09-04 14:09:06 +0200
commit45ba8e89e86397df912e07df14d76373f1c7e7af (patch)
tree9e4262863cd092cc3533f5419511a1d09524764d /panels/printers/pp-new-printer-dialog.h
parent9428b7a641052f164a4d7f1b78958ecf931e01f5 (diff)
downloadgnome-control-center-45ba8e89e86397df912e07df14d76373f1c7e7af.tar.gz
printers: Redesign of new printer dialog
This commit implements design changes from https://live.gnome.org/Design/SystemSettings/Printers. The new printer dialog gets informations about connected devices from CUPS server asynchronously and separately for each backend now. Entering an address into the entry and pressing the icon inside the entry or enter starts to detect printers on the entered host. Entering a text which is a substring of a name of a device or its location filters the list to contain just devicess with the string in it (e.g. Canon will keep devices with "Canon" in their name). The PpNewPrinterDialog is regular object now. It emits signal "pre-response" when dialog is closed and a printer is being added and signal "response" when the new printer was added, addition of the new printer failed or the dialog was cancelled. This commit removes FirewallD support from new printer dialog. (#683229)
Diffstat (limited to 'panels/printers/pp-new-printer-dialog.h')
-rw-r--r--panels/printers/pp-new-printer-dialog.h39
1 files changed, 32 insertions, 7 deletions
diff --git a/panels/printers/pp-new-printer-dialog.h b/panels/printers/pp-new-printer-dialog.h
index 618c0d716..ba4eb881a 100644
--- a/panels/printers/pp-new-printer-dialog.h
+++ b/panels/printers/pp-new-printer-dialog.h
@@ -25,15 +25,40 @@
G_BEGIN_DECLS
-typedef struct _PpNewPrinterDialog PpNewPrinterDialog;
+#define PP_TYPE_NEW_PRINTER_DIALOG (pp_new_printer_dialog_get_type ())
+#define PP_NEW_PRINTER_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PP_TYPE_NEW_PRINTER_DIALOG, PpNewPrinterDialog))
+#define PP_NEW_PRINTER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PP_TYPE_NEW_PRINTER_DIALOG, PpNewPrinterDialogClass))
+#define PP_IS_NEW_PRINTER_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PP_TYPE_NEW_PRINTER_DIALOG))
+#define PP_IS_NEW_PRINTER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PP_TYPE_NEW_PRINTER_DIALOG))
+#define PP_NEW_PRINTER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PP_TYPE_NEW_PRINTER_DIALOG, PpNewPrinterDialogClass))
-typedef void (*UserResponseCallback) (GtkDialog *dialog, gint response_id, gpointer user_data);
+typedef struct _PpNewPrinterDialog PpNewPrinterDialog;
+typedef struct _PpNewPrinterDialogClass PpNewPrinterDialogClass;
+typedef struct _PpNewPrinterDialogPrivate PpNewPrinterDialogPrivate;
-PpNewPrinterDialog *pp_new_printer_dialog_new (GtkWindow *parent,
- UserResponseCallback user_callback,
- gpointer user_data);
-void pp_new_printer_dialog_free (PpNewPrinterDialog *dialog);
+struct _PpNewPrinterDialog
+{
+ GObject parent_instance;
+ PpNewPrinterDialogPrivate *priv;
+};
+
+struct _PpNewPrinterDialogClass
+{
+ GObjectClass parent_class;
+
+ void (*pre_response) (PpNewPrinterDialog *dialog,
+ const gchar *device_name,
+ const gchar *device_location,
+ const gchar *device_make_and_model,
+ gboolean is_network_device);
+
+ void (*response) (PpNewPrinterDialog *dialog,
+ gint response_id);
+};
+
+GType pp_new_printer_dialog_get_type (void) G_GNUC_CONST;
+PpNewPrinterDialog *pp_new_printer_dialog_new (GtkWindow *parent);
G_END_DECLS
-#endif
+#endif /* __PP_NEW_PRINTER_DIALOG_H__ */