Commit ebe21b68 authored by Felipe Borges's avatar Felipe Borges 👣

printers: Use "hostname" in the "Add Printer" dialog

https://bugzilla.gnome.org/show_bug.cgi?id=760783
parent beadfe18
......@@ -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>
......
......@@ -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);
......
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