[gnome-control-center] printers: Use "hostname" in the "Add Printer" dialog
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Use "hostname" in the "Add Printer" dialog
- Date: Wed, 18 Jan 2017 14:22:07 +0000 (UTC)
commit ebe21b68abee9c556412b20f2274906696854fe2
Author: Felipe Borges <felipeborges gnome org>
Date: Sat Nov 12 18:41:23 2016 +0100
printers: Use "hostname" in the "Add Printer" dialog
https://bugzilla.gnome.org/show_bug.cgi?id=760783
panels/printers/new-printer-dialog.ui | 2 +-
panels/printers/pp-new-printer-dialog.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/panels/printers/new-printer-dialog.ui b/panels/printers/new-printer-dialog.ui
index 1219362..90bfbef 100644
--- a/panels/printers/new-printer-dialog.ui
+++ b/panels/printers/new-printer-dialog.ui
@@ -305,7 +305,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
+ <object class="GtkLabel" id="authentication-title">
<property name="label" translatable="yes">Authentication Required</property>
<property name="xalign">0</property>
<attributes>
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index 9c43600..f0c53aa 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -377,6 +377,7 @@ on_authenticate (GtkWidget *button,
pp_samba_set_auth_info (PP_SAMBA (priv->samba_host), username, password);
+ gtk_header_bar_set_title (GTK_HEADER_BAR (WID ("headerbar")), _("Add Printer"));
go_to_page (dialog, ADDPRINTER_PAGE);
}
@@ -386,10 +387,25 @@ on_authentication_required (PpHost *host,
{
PpNewPrinterDialogPrivate *priv;
PpNewPrinterDialog *dialog = PP_NEW_PRINTER_DIALOG (user_data);
+ gchar *text, *hostname;
priv = dialog->priv;
gtk_header_bar_set_subtitle (GTK_HEADER_BAR (WID ("headerbar")), NULL);
+ gtk_header_bar_set_title (GTK_HEADER_BAR (WID ("headerbar")), _("Unlock Print Server"));
+
+ g_object_get (G_OBJECT (host), "hostname", &hostname, NULL);
+ /* Translators: Samba server needs authentication of the user to show list of its printers. */
+ text = g_strdup_printf (_("Unlock %s."), hostname);
+ gtk_label_set_text (GTK_LABEL (WID ("authentication-title")), text);
+ g_free (text);
+
+ /* Translators: Samba server needs authentication of the user to show list of its printers. */
+ text = g_strdup_printf (_("Enter username and password to view printers on %s."), hostname);
+ gtk_label_set_text (GTK_LABEL (WID ("authentication-text")), text);
+ g_free (hostname);
+ g_free (text);
+
go_to_page (dialog, AUTHENTICATION_PAGE);
g_signal_connect (WID ("authenticate-button"), "clicked", G_CALLBACK (on_authenticate), dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]