printers: Use "hostname" in the "Add Printer" dialog
https://bugzilla.gnome.org/show_bug.cgi?id=760783
This commit is contained in:
parent
beadfe189e
commit
ebe21b68ab
2 changed files with 17 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue