public GLib.Queue<IdentityRequest> request_queue;
+ internal CheckButton remember_identity_binding = null;
+
private enum Columns
{
IDCARD_COL,
var id_card_widget = new IdCardWidget(id_card);
this.custom_vbox.add_id_card_widget(id_card_widget);
id_card_widget.expanded.connect(this.widget_selected_cb);
+ id_card_widget.collapsed.connect(this.widget_unselected_cb);
return id_card_widget;
}
this.send_button.set_sensitive(true);
}
+ private void widget_unselected_cb(IdCardWidget id_card_widget)
+ {
+ this.remove_button.set_sensitive(false);
+ this.edit_button.set_sensitive(false);
+ this.custom_vbox.receive_collapsed_event(id_card_widget);
+
+ this.send_button.set_sensitive(false);
+ }
+
public bool add_identity(IdCard id_card, bool force_flat_file_store)
{
#if OS_MACOS
TreeIter iter;
IdCard id_card;
- var children = this.custom_vbox.get_children();
this.custom_vbox.clear();
if (filter.get_iter_first(out iter))
var id_card = id_card_widget.id_card;
bool remove = WarningDialog.confirm(this,
- "<span font-weight='heavy'>You are about to remove the identity '%s'.</span>"
- .printf(id_card.display_name)
+ Markup.printf_escaped(
+ "<span font-weight='heavy'>You are about to remove the identity '%s'.</span>",
+ id_card.display_name)
+ "\n\nAre you sure you want to do this?",
"delete_idcard");
if (remove)
filter.refilter();
redraw_id_card_widgets();
set_prompting_service(request.service);
+ remember_identity_binding.show();
make_visible();
}
this.request_queue.push_tail(request);
public IdCard check_add_password(IdCard identity, IdentityRequest request, IdentityManagerModel model)
{
+ logger.trace(@"check_add_password");
IdCard retval = identity;
bool idcard_has_pw = (identity.password != null) && (identity.password != "");
bool request_has_pw = (request.password != null) && (request.password != "");
private void send_identity_cb(IdCard id)
{
+ send_button.set_sensitive(false);
+
IdCard identity = id;
return_if_fail(request_queue.length > 0);
if ((identity != null) && (!identity.IsNoIdentity()))
parent_app.default_id_card = identity;
- request.return_identity(identity);
+ request.return_identity(identity, remember_identity_binding.active);
+
+ remember_identity_binding.active = false;
+ remember_identity_binding.hide();
}
// private void label_make_bold(Label label)
remove_button.clicked.connect((w) => {remove_identity_cb(custom_vbox.current_idcard);});
remove_button.set_sensitive(false);
- send_button = new Button.with_label(_("Send"));
+ this.send_button = new Button.with_label(_("Send"));
send_button.clicked.connect((w) => {send_identity_cb(custom_vbox.current_idcard.id_card);});
// send_button.set_visible(false);
send_button.set_sensitive(false);
menubar.modify_bg(StateType.NORMAL, white);
#endif
main_vbox.pack_start(vbox_left, true, true, 0);
+
+ remember_identity_binding = new CheckButton.with_label(_("Remember my identity choice for this service"));
+ remember_identity_binding.active = false;
+ main_vbox.pack_start(remember_identity_binding, false, false, 6);
+
add(main_vbox);
main_vbox.show_all();
+
+ if (this.request_queue.length == 0)
+ remember_identity_binding.hide();
}
private void set_atk_name_description(Widget widget, string name, string description)