- var vbox_left = new VBox (false, 0);
- vbox_left.pack_start (search_entry, false, false, 6);
- vbox_left.pack_start (scroll, true, true, 0);
- vbox_left.pack_start (prompting_service, false, false, 6);
- vbox_left.set_size_request (WINDOW_WIDTH, 0);
-
- var login_vbox_title = new Label (_("Login: "));
- label_make_bold (login_vbox_title);
- login_vbox_title.set_alignment (0, (float) 0.5);
- var username_label = new Label (_("Username:"));
- username_label.set_alignment (1, (float) 0.5);
- this.username_entry = new Entry ();
- var password_label = new Label (_("Password:"));
- password_label.set_alignment (1, (float) 0.5);
- this.password_entry = new Entry ();
- password_entry.set_invisible_char ('*');
- password_entry.set_visibility (false);
- var remember_checkbutton = new CheckButton.with_label (_("Remember password"));
- var login_table = new Table (3, 3, false);
- login_table.set_col_spacings (10);
- login_table.set_row_spacings (10);
- login_table.attach_defaults (username_label, 0, 1, 0, 1);
- login_table.attach_defaults (username_entry, 1, 2, 0, 1);
- login_table.attach_defaults (password_label, 0, 1, 1, 2);
- login_table.attach_defaults (password_entry, 1, 2, 1, 2);
- login_table.attach_defaults (remember_checkbutton, 1, 2, 2, 3);
- var login_vbox_alignment = new Alignment (0, 0, 0, 0);
- login_vbox_alignment.set_padding (0, 0, 12, 0);
- login_vbox_alignment.add (login_table);
- var login_vbox = new VBox (false, 6);
- login_vbox.pack_start (login_vbox_title, false, true, 0);
- login_vbox.pack_start (login_vbox_alignment, false, true, 0);
-
- var services_vbox_title = new Label (_("Services:"));
- label_make_bold (services_vbox_title);
- services_vbox_title.set_alignment (0, (float) 0.5);
- var services_vbox_alignment = new Alignment (0, 0, 0, 0);
- services_vbox_alignment.set_padding (0, 0, 12, 0);
- this.services_internal_vbox = new VBox (true, 6);
- services_vbox_alignment.add (services_internal_vbox);
- var services_vbox = new VBox (false, 6);
- services_vbox.pack_start (services_vbox_title, false, true, 0);
- services_vbox.pack_start (services_vbox_alignment, false, true, 0);
-
- this.vbox_right = new VBox (false, 18);
- vbox_right.pack_start (login_vbox, false, true, 0);
- vbox_right.pack_start (services_vbox, false, true, 0);
-
- var hbox = new HBox (false, 12);
- hbox.pack_start (vbox_left, true, true, 0);
- hbox.pack_start (vbox_right, false, false, 0);
-
- var main_vbox = new VBox (false, 0);
- main_vbox.set_border_width (12);
-
+ this.custom_vbox = new CustomVBox(this, false, 2);
+
+ var viewport = new Viewport(null, null);
+ viewport.set_border_width(2);
+ viewport.set_shadow_type(ShadowType.NONE);
+ viewport.add(custom_vbox);
+ var id_scrollwin = new ScrolledWindow(null, null);
+ id_scrollwin.set_policy(PolicyType.NEVER, PolicyType.AUTOMATIC);
+ id_scrollwin.set_shadow_type(ShadowType.IN);
+ id_scrollwin.add_with_viewport(viewport);
+
+ service_prompt_vbox = new VBox(false, 0);
+
+ var vbox_left = new VBox(false, 0);
+ vbox_left.pack_start(service_prompt_vbox, false, false, 12);
+
+ var search_hbox = new HBox(false, 6);
+ search_hbox.pack_end(search_entry, false, false, 0);
+ //// var search_label = new Label(_("Search:"));
+ //// search_label.set_alignment(1, (float) 0.5);
+ //// set_atk_relation(search_label, search_entry, Atk.RelationType.LABEL_FOR);
+ //// search_hbox.pack_end(search_label, false, false, 6);
+
+ var full_search_label = new Label(_("Search for an identity or service"));
+ full_search_label.set_alignment(1, 0);
+ var search_vbox = new VBox(false, 4);
+ search_vbox.pack_start(full_search_label, false, false, 0);
+ search_vbox.pack_start(search_hbox, false, false, 0);
+
+ var inner_left_vbox = new VBox(false, 6);
+ inner_left_vbox.pack_start(search_vbox, false, false, 6);
+// inner_left_vbox.pack_start(selection_prompt, false, false, 6);
+ inner_left_vbox.pack_start(id_scrollwin, true, true, 0);
+
+ var id_and_button_box = new HBox(false, 6);
+ id_and_button_box.pack_start(inner_left_vbox, true, true, 6);
+ vbox_left.pack_start(id_and_button_box, true, true, 0);
+ // vbox_left.pack_start(prompting_service, false, false, 6);
+ vbox_left.set_size_request(WINDOW_WIDTH, 0);
+
+ this.no_identity_title = new Label(_("No Identity: Send this identity to services which should not use Moonshot"));
+ no_identity_title.set_alignment(0, (float ) 0.5);
+ no_identity_title.set_line_wrap(true);
+ no_identity_title.show();
+
+ this.vbox_right = new VBox(false, 6);
+
+ var add_button = new Button.with_label(_("Add"));
+ add_button.clicked.connect((w) => {add_identity_cb();});
+
+ this.edit_button = new Button.with_label(_("Edit"));
+ edit_button.clicked.connect((w) => {edit_identity_cb(custom_vbox.current_idcard.id_card);});
+ edit_button.set_sensitive(false);
+
+ this.remove_button = new Button.with_label(_("Remove"));
+ remove_button.clicked.connect((w) => {remove_identity_cb(custom_vbox.current_idcard);});
+ remove_button.set_sensitive(false);
+
+ 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);
+
+ var empty_box = new VBox(false, 0);
+ empty_box.set_size_request(0, 0);
+ vbox_right.pack_start(empty_box, false, false, 14);
+ vbox_right.pack_start(add_button, false, false, 6);
+ vbox_right.pack_start(edit_button, false, false, 6);
+ vbox_right.pack_start(remove_button, false, false, 6);
+ vbox_right.pack_start(send_button, false, false, 24);
+
+ id_and_button_box.pack_start(vbox_right, false, false, 0);
+
+ var main_vbox = new VBox(false, 0);
+
+ // Note: This places a border above the menubar. Is that what we want?
+ main_vbox.set_border_width(12);
+