Improve GTK login dialog

This commit is contained in:
Vincent Sanders 2018-08-19 23:16:16 +01:00
parent 2f3c7e24c0
commit 650ac58604
4 changed files with 339 additions and 408 deletions

View File

@ -22,6 +22,7 @@
#include "utils/log.h"
#include "utils/nsurl.h"
#include "utils/messages.h"
#include "netsurf/url_db.h"
#include "gtk/resources.h"
@ -29,12 +30,9 @@
/** login window session data */
struct session_401 {
nsurl *url; /**< URL being fetched */
lwc_string *host; /**< Host for user display */
char *realm; /**< Authentication realm */
nserror (*cb)(const char *username,
const char *password,
void *pw); /**< Continuation callback */
const char *password,
void *pw); /**< Continuation callback */
void *cbpw; /**< Continuation data */
GtkBuilder *x; /**< Our builder windows */
GtkWindow *wnd; /**< The login window itself */
@ -49,9 +47,6 @@ struct session_401 {
*/
static void destroy_login_window(struct session_401 *session)
{
nsurl_unref(session->url);
lwc_string_unref(session->host);
free(session->realm);
gtk_widget_destroy(GTK_WIDGET(session->wnd));
g_object_unref(G_OBJECT(session->x));
free(session);
@ -62,7 +57,7 @@ static void destroy_login_window(struct session_401 *session)
* process next signal in entry widgets.
*
* \param w current widget
* \param data next widget
* \param data next widget
*/
static void nsgtk_login_next(GtkWidget *w, gpointer data)
{
@ -83,8 +78,11 @@ static void nsgtk_login_ok_clicked(GtkButton *w, gpointer data)
*/
struct session_401 *session = (struct session_401 *)data;
const gchar *user = gtk_entry_get_text(session->user);
const gchar *pass = gtk_entry_get_text(session->pass);
const gchar *user;
const gchar *pass;
user = gtk_entry_get_text(session->user);
pass = gtk_entry_get_text(session->pass);
session->cb(user, pass, session->cbpw);
@ -109,6 +107,59 @@ static void nsgtk_login_cancel_clicked(GtkButton *w, gpointer data)
}
/**
* generate the description of the login request
*/
static nserror
get_login_description(struct nsurl *url,
const char *realm,
const char *username,
const char *password,
char **out_str)
{
char *url_s;
size_t url_l;
nserror res;
char *str = NULL;
int strlen;
const char *key;
res = nsurl_get(url, NSURL_SCHEME | NSURL_HOST, &url_s, &url_l);
if (res != NSERROR_OK) {
return res;
}
if ((*username == 0) && (*password == 0)) {
key = "LoginDescription";
} else {
key = "LoginAgain";
}
str = messages_get_buff(key, url_s, realm);
NSLOG(netsurf, INFO,
"key:%s url:%s realm:%s str:%s", key, url_s, realm, str);
if (strcmp(key, str) != 0) {
*out_str = str;
} else {
/* no message so fallback */
const char *fmt = "The site %s is requesting your username and password. The realm is \"%s\"";
strlen = snprintf(str, 0, fmt, url_s, realm) + 1;
str = malloc(strlen);
if (str == NULL) {
res = NSERROR_NOMEM;
} else {
snprintf(str, strlen, fmt, url_s, realm);
*out_str = str;
}
}
free(url_s);
return res;
}
/**
* create a new instance of the login window
*
@ -124,20 +175,23 @@ static void nsgtk_login_cancel_clicked(GtkButton *w, gpointer data)
*/
static nserror
create_login_window(nsurl *url,
lwc_string *host, const char *realm,
const char *username, const char *password,
nserror (*cb)(const char *username,
const char *password,
void *pw),
void *cbpw)
lwc_string *host,
const char *realm,
const char *username,
const char *password,
nserror (*cb)(const char *username,
const char *password,
void *pw),
void *cbpw)
{
nserror res;
struct session_401 *session;
GtkWindow *wnd;
GtkLabel *lhost, *lrealm;
GtkLabel *ldesc;
GtkEntry *euser, *epass;
GtkButton *bok, *bcan;
GtkBuilder* builder;
nserror res;
GtkBuilder *builder;
char *description = NULL;
session = calloc(1, sizeof(struct session_401));
if (session == NULL) {
@ -152,18 +206,14 @@ create_login_window(nsurl *url,
gtk_builder_connect_signals(builder, NULL);
wnd = GTK_WINDOW(gtk_builder_get_object(builder, "wndLogin"));
lhost = GTK_LABEL(gtk_builder_get_object(builder, "labelLoginHost"));
lrealm = GTK_LABEL(gtk_builder_get_object(builder, "labelLoginRealm"));
euser = GTK_ENTRY(gtk_builder_get_object(builder, "entryLoginUser"));
epass = GTK_ENTRY(gtk_builder_get_object(builder, "entryLoginPass"));
bok = GTK_BUTTON(gtk_builder_get_object(builder, "buttonLoginOK"));
bcan = GTK_BUTTON(gtk_builder_get_object(builder, "buttonLoginCan"));
wnd = GTK_WINDOW(gtk_builder_get_object(builder, "LoginDialog"));
ldesc = GTK_LABEL(gtk_builder_get_object(builder, "LoginDescription"));
euser = GTK_ENTRY(gtk_builder_get_object(builder, "LoginUsername"));
epass = GTK_ENTRY(gtk_builder_get_object(builder, "LoginPassword"));
bok = GTK_BUTTON(gtk_builder_get_object(builder, "LoginOK"));
bcan = GTK_BUTTON(gtk_builder_get_object(builder, "LoginCancel"));
/* create and fill in our session structure */
session->url = nsurl_ref(url);
session->host = lwc_string_ref(host);
session->realm = strdup(realm ? realm : "Secure Area");
session->cb = cb;
session->cbpw = cbpw;
session->x = builder;
@ -172,9 +222,11 @@ create_login_window(nsurl *url,
session->pass = epass;
/* fill in our new login window */
gtk_label_set_text(GTK_LABEL(lhost), lwc_string_data(host));
gtk_label_set_text(lrealm, realm);
res = get_login_description(url, realm, username, password, &description);
if (res == NSERROR_OK) {
gtk_label_set_text(GTK_LABEL(ldesc), description);
free(description);
}
gtk_entry_set_text(euser, username);
gtk_entry_set_text(epass, password);
@ -190,7 +242,6 @@ create_login_window(nsurl *url,
/* attach signal handlers to the entry boxes such that pressing
* enter in one progresses the focus onto the next widget.
*/
g_signal_connect(G_OBJECT(euser), "activate",
G_CALLBACK(nsgtk_login_next), (gpointer)epass);
g_signal_connect(G_OBJECT(epass), "activate",

View File

@ -1,223 +1,162 @@
<?xml version="1.0"?>
<!--*- mode: xml -*-->
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkDialog" id="wndLogin">
<property name="title" translatable="yes">Site Authentication</property>
<property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkImage" id="imageLogin">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-ok</property>
</object>
<object class="GtkDialog" id="LoginDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<child>
<object class="GtkHBox" id="hbox12">
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="border_width">3</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkImage" id="image3">
<object class="GtkButton" id="LoginCancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="yalign">0.10000000149011612</property>
<property name="xpad">12</property>
<property name="icon_size">6</property>
<property name="icon_name">gtk-dialog-authentication</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkTable" id="table5">
<object class="GtkButton" id="LoginOK">
<property name="label" translatable="yes">Login</property>
<property name="visible">True</property>
<property name="border_width">1</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="column_spacing">11</property>
<property name="row_spacing">10</property>
<child>
<object class="GtkLabel" id="labelLoginHost">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">moo.yoo.com</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label57">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Password</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label56">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Username</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label54">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Host</property>
</object>
<packing>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label55">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Realm</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="labelLoginRealm">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">my sekr3t area</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkEntry" id="entryLoginPass">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="activates_default">True</property>
<property name="text" translatable="yes">opensesame</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkEntry" id="entryLoginUser">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="text" translatable="yes">sesame</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"/>
</packing>
</child>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">imageLogin</property>
</object>
<packing>
<property name="padding">1</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">2</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area2">
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="can_focus">False</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<child>
<object class="GtkButton" id="buttonLoginCan">
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-authentication</property>
<property name="icon-size">6</property>
</object>
</child>
<child>
<object class="GtkButton" id="buttonLoginOK">
<object class="GtkLabel" id="LoginDescription">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<child>
<object class="GtkAlignment" id="alignment14">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-ok</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label49">
<property name="visible">True</property>
<property name="label" translatable="yes">Login</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<property name="can_focus">False</property>
<property name="label" translatable="yes">LoginLabel</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="position">1</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Username</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_EXPAND</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Password</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_EXPAND</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="LoginUsername">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="LoginPassword">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">●</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">buttonLoginCan</action-widget>
<action-widget response="-5">buttonLoginOK</action-widget>
<action-widget response="0">LoginCancel</action-widget>
<action-widget response="0">LoginOK</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -1,223 +1,161 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<!--*- mode: xml -*-->
<interface>
<object class="GtkDialog" id="wndLogin">
<property name="title" translatable="yes">Site Authentication</property>
<property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<requires lib="gtk+" version="3.0"/>
<object class="GtkImage" id="imageLogin">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-ok</property>
</object>
<object class="GtkDialog" id="LoginDialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Authentication Request</property>
<property name="default_width">400</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<child>
<object class="GtkHBox" id="hbox12">
<property name="visible">True</property>
<property name="border_width">3</property>
<child>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="yalign">0.10000000149011612</property>
<property name="xpad">12</property>
<property name="icon_size">6</property>
<property name="icon_name">gtk-dialog-authentication</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<object class="GtkTable" id="table5">
<property name="visible">True</property>
<property name="border_width">1</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="column_spacing">11</property>
<property name="row_spacing">10</property>
<child>
<object class="GtkLabel" id="labelLoginHost">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">moo.yoo.com</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label57">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Password</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label56">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Username</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label54">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Host</property>
</object>
<packing>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label55">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Realm</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="labelLoginRealm">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">my sekr3t area</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"/>
</packing>
</child>
<child>
<object class="GtkEntry" id="entryLoginPass">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="activates_default">True</property>
<property name="text" translatable="yes">opensesame</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkEntry" id="entryLoginUser">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="text" translatable="yes">sesame</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"/>
</packing>
</child>
</object>
<packing>
<property name="padding">1</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<object class="GtkButtonBox">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="buttonLoginCan">
<object class="GtkButton" id="LoginCancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="buttonLoginOK">
<object class="GtkButton" id="LoginOK">
<property name="label" translatable="yes">Login</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<child>
<object class="GtkAlignment" id="alignment14">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-ok</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label49">
<property name="visible">True</property>
<property name="label" translatable="yes">Login</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<property name="receives_default">True</property>
<property name="image">imageLogin</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-authentication</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="margin_left">2</property>
<property name="margin_right">4</property>
<property name="margin_top">2</property>
<property name="margin_bottom">2</property>
<property name="label" translatable="yes">Username</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="margin_left">2</property>
<property name="margin_right">4</property>
<property name="margin_top">2</property>
<property name="margin_bottom">2</property>
<property name="label" translatable="yes">Password</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="LoginDescription">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_top">2</property>
<property name="margin_bottom">2</property>
<property name="vexpand">True</property>
<property name="label" translatable="yes">LoginLabel</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="LoginUsername">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_top">2</property>
<property name="margin_bottom">2</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="LoginPassword">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_top">2</property>
<property name="margin_bottom">2</property>
<property name="visibility">False</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">buttonLoginCan</action-widget>
<action-widget response="-5">buttonLoginOK</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -2740,6 +2740,9 @@ nl.all.CaseSens:Hoofdlettergevoelig
# This section contains tokens which are used in the 401 login
# (authentication) dialog box.
#
en.all.LoginDescription:The site %s with realm "%s" is requesting credentials for access.
en.all.LoginAgain:The credentials for the site %s and realm "%s" were rejected.
en.all.LoginLabel:A website is requesting credentials for access.
en.all.Host:Host
de.all.Host:Host
fr.all.Host:Hôte