[DBus (name = "org.janet.Moonshot")]
public class MoonshotServer : Object {
- private IdentityManagerView main_window;
+ private IdentityManagerApp parent_app;
- public MoonshotServer (Gtk.Window window)
+ public MoonshotServer (IdentityManagerApp app)
{
- this.main_window = (IdentityManagerView) window;
+ this.parent_app = app;
}
public async bool get_identity (string nai,
out string subject_name_constraint,
out string subject_alt_name_constraint)
{
- var request = new IdentityRequest (main_window,
+ var request = new IdentityRequest (parent_app,
nai,
password,
service);
var id_card = request.id_card;
- if (id_card != null) {
+ if ((id_card != null) && (id_card.display_name != IdCard.NO_IDENTITY)) {
nai_out = id_card.nai;
password_out = id_card.password;
out string subject_name_constraint,
out string subject_alt_name_constraint)
{
- var request = new IdentityRequest.default (main_window);
+ var request = new IdentityRequest.default (parent_app);
request.set_callback ((IdentityRequest) => get_default_identity.callback());
request.execute ();
yield;
}
}
- return main_window.add_identity (idcard);
+ return parent_app.add_identity (idcard);
}
var id_card = request.id_card;
- if (id_card == null) {
+ if (id_card != null) {
// The strings are freed by the RPC runtime
nai_out = id_card.nai;
password_out = id_card.password;