Commit d7f31fc4 authored by Marek Kasik's avatar Marek Kasik

printers: Search for samba printers in new printer dialog

Search for samba printers on local network or on specified
host. The new printer dialog asks for password for a samba
server if it is needed for listing printers on it. User is
asked for selection of driver from local database during
addition of new samba printer.

https://bugzilla.gnome.org/show_bug.cgi?id=683229
parent 41924f8c
......@@ -1792,7 +1792,9 @@ printer_add_cb (GtkToolButton *toolbutton,
priv = PRINTERS_PANEL_PRIVATE (self);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
priv->pp_new_printer_dialog = PP_NEW_PRINTER_DIALOG (pp_new_printer_dialog_new (GTK_WINDOW (toplevel)));
priv->pp_new_printer_dialog = PP_NEW_PRINTER_DIALOG (
pp_new_printer_dialog_new (GTK_WINDOW (toplevel),
priv->all_ppds_list));
g_signal_connect (priv->pp_new_printer_dialog,
"pre-response",
......@@ -2789,6 +2791,10 @@ get_all_ppds_async_cb (PPDList *ppds,
pp_ppd_selection_dialog_set_ppd_list (priv->pp_ppd_selection_dialog,
priv->all_ppds_list);
if (priv->pp_new_printer_dialog)
pp_new_printer_dialog_set_ppd_list (priv->pp_new_printer_dialog,
priv->all_ppds_list);
g_object_unref (priv->get_all_ppds_cancellable);
priv->get_all_ppds_cancellable = NULL;
}
......
This diff is collapsed.
......@@ -21,6 +21,8 @@
#ifndef __PP_NEW_PRINTER_DIALOG_H__
#define __PP_NEW_PRINTER_DIALOG_H__
#include "pp-utils.h"
#include <gtk/gtk.h>
G_BEGIN_DECLS
......@@ -56,8 +58,11 @@ struct _PpNewPrinterDialogClass
gint response_id);
};
GType pp_new_printer_dialog_get_type (void) G_GNUC_CONST;
PpNewPrinterDialog *pp_new_printer_dialog_new (GtkWindow *parent);
GType pp_new_printer_dialog_get_type (void) G_GNUC_CONST;
PpNewPrinterDialog *pp_new_printer_dialog_new (GtkWindow *parent,
PPDList *ppd_list);
void pp_new_printer_dialog_set_ppd_list (PpNewPrinterDialog *dialog,
PPDList *list);
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment