[gnome-control-center/wip/feborges/new-addprinter-dialog: 43/44] printers: Decouple PpSamba and the PpNewPrinterDialog
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/feborges/new-addprinter-dialog: 43/44] printers: Decouple PpSamba and the PpNewPrinterDialog
- Date: Sun, 11 Dec 2016 15:08:46 +0000 (UTC)
commit 923b616bcc08eb75a28b9a9ddbf0cf990db4c042
Author: Felipe Borges <felipeborges gnome org>
Date: Sat Nov 12 15:55:47 2016 +0100
printers: Decouple PpSamba and the PpNewPrinterDialog
PpSamba no longer needs to hold a reference to the dialog window.
https://bugzilla.gnome.org/show_bug.cgi?id=760783
panels/printers/pp-new-printer-dialog.c | 7 +++----
panels/printers/pp-samba.c | 3 +--
panels/printers/pp-samba.h | 3 +--
3 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index 37636d6..94b5a39 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -475,7 +475,7 @@ authenticate_samba_server (GtkButton *button,
{
g_clear_object (&priv->samba_host);
- priv->samba_host = pp_samba_new (GTK_WINDOW (priv->dialog), server_name);
+ priv->samba_host = pp_samba_new (server_name);
g_signal_connect_object (priv->samba_host,
"authentication-required",
G_CALLBACK (on_authentication_required),
@@ -1547,8 +1547,7 @@ search_for_remote_printers (THostSearchData *data)
g_object_set (priv->lpd_host, "port", data->host_port, NULL);
}
- priv->samba_host = pp_samba_new (GTK_WINDOW (priv->dialog),
- data->host_name);
+ priv->samba_host = pp_samba_new (data->host_name);
update_dialog_state (data->dialog);
@@ -2045,7 +2044,7 @@ populate_devices_list (PpNewPrinterDialog *dialog)
priv->samba_searching = TRUE;
update_dialog_state (dialog);
- samba = pp_samba_new (GTK_WINDOW (priv->dialog), NULL);
+ samba = pp_samba_new (NULL);
pp_samba_get_devices_async (samba, FALSE, priv->cancellable, get_samba_devices_cb, dialog);
}
diff --git a/panels/printers/pp-samba.c b/panels/printers/pp-samba.c
index 6c1bbd8..c3351dc 100644
--- a/panels/printers/pp-samba.c
+++ b/panels/printers/pp-samba.c
@@ -76,8 +76,7 @@ pp_samba_init (PpSamba *samba)
}
PpSamba *
-pp_samba_new (GtkWindow *parent,
- const gchar *hostname)
+pp_samba_new (const gchar *hostname)
{
return g_object_new (PP_TYPE_SAMBA,
"hostname", hostname,
diff --git a/panels/printers/pp-samba.h b/panels/printers/pp-samba.h
index 4dad0d6..d0a5023 100644
--- a/panels/printers/pp-samba.h
+++ b/panels/printers/pp-samba.h
@@ -50,8 +50,7 @@ struct _PpSambaClass
GType pp_samba_get_type (void) G_GNUC_CONST;
-PpSamba *pp_samba_new (GtkWindow *parent,
- const gchar *hostname);
+PpSamba *pp_samba_new (const gchar *hostname);
void pp_samba_get_devices_async (PpSamba *samba,
gboolean auth_if_needed,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]