tui: prefill a secret in the entry if we have a value

This commit is contained in:
Jiří Klimeš
2015-12-11 15:14:59 +01:00
parent 2e345faa7e
commit a1536fe3d1

View File

@@ -152,6 +152,8 @@ nmt_password_dialog_constructed (GObject *object)
if (secret->password) if (secret->password)
flags |= NMT_NEWT_ENTRY_PASSWORD; flags |= NMT_NEWT_ENTRY_PASSWORD;
widget = nmt_newt_entry_new (30, flags); widget = nmt_newt_entry_new (30, flags);
if (secret->value)
nmt_newt_entry_set_text (NMT_NEWT_ENTRY (widget), secret->value);
nmt_newt_grid_add (secret_grid, widget, 1, i); nmt_newt_grid_add (secret_grid, widget, 1, i);
g_ptr_array_add (priv->entries, widget); g_ptr_array_add (priv->entries, widget);