private const int WINDOW_WIDTH = 400;
private const int WINDOW_HEIGHT = 500;
protected IdentityManagerApp parent_app;
+#if OS_MACOS
+ public OSXApplication osxApp;
+#endif
private UIManager ui_manager = new UIManager();
private Entry search_entry;
private VBox vbox_right;
public IdentityManagerView(IdentityManagerApp app) {
parent_app = app;
- identities_manager = parent_app.model;
+#if OS_MACOS
+ osxApp = OSXApplication.get_instance();
+#endif
+ identities_manager = parent_app.model;
request_queue = new GLib.Queue<IdentityRequest>();
service_button_map = new HashTable<Gtk.Button, string> (direct_hash, direct_equal);
this.title = "Moonshoot";
this.set_position (WindowPosition.CENTER);
set_default_size (WINDOW_WIDTH, WINDOW_HEIGHT);
build_ui();
- setup_list_model();
+ setup_list_model();
load_id_cards();
+#if OS_MACOS
+ osxApp = app.osxApp;
+#endif
connect_signals();
}
var dialog = new MessageDialog (null,
DialogFlags.DESTROY_WITH_PARENT,
- MessageType.INFO,
+ MessageType.QUESTION,
Gtk.ButtonsType.YES_NO,
_("Are you sure you want to delete %s ID Card?"), id_card.issuer);
var result = dialog.run ();
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Gtk.MessageType.QUESTION,
Gtk.ButtonsType.YES_NO,
- _("Are you sure you want to stop '%s' ID Card to use %s?"),
- custom_vbox.current_idcard.id_card.display_name);
+ _("Are you sure you want to stop '%s' ID Card from being used with %s?"),
+ custom_vbox.current_idcard.id_card.display_name,
+ _("this service"));
var ret = dialog.run();
dialog.hide();
set_atk_name_description (search_entry, _("Search entry"), _("Search for a specific ID Card"));
this.search_entry.set_icon_from_pixbuf (EntryIconPosition.PRIMARY,
- find_icon_sized ("edit-find-symbolic", Gtk.IconSize.MENU));
+ find_icon_sized ("edit-find", Gtk.IconSize.MENU));
+// find_icon_sized ("edit-find-symbolic", Gtk.IconSize.MENU));
this.search_entry.set_icon_tooltip_text (EntryIconPosition.PRIMARY,
_("Search identity or service"));
this.search_entry.set_icon_sensitive (EntryIconPosition.PRIMARY, false);
this.search_entry.set_icon_from_pixbuf (EntryIconPosition.SECONDARY,
- find_icon_sized ("edit-clear-symbolic", Gtk.IconSize.MENU));
+ find_icon_sized ("process-stop", Gtk.IconSize.MENU));
+// find_icon_sized ("edit-clear-symbolic", Gtk.IconSize.MENU));
this.search_entry.set_icon_tooltip_text (EntryIconPosition.SECONDARY,
_("Clear the current search"));
this.search_entry.set_icon_sensitive (EntryIconPosition.SECONDARY, false);
var main_vbox = new VBox (false, 0);
main_vbox.set_border_width (12);
+
+#if OS_MACOS
+ // hide the File | Quit menu item which is now on the Mac Menu
+ Gtk.Widget quit_item = this.ui_manager.get_widget("/MenuBar/FileMenu/Quit");
+ quit_item.hide();
+
+ Gtk.MenuShell menushell = this.ui_manager.get_widget("/MenuBar") as Gtk.MenuShell;
+ osxApp.set_menu_bar(menushell);
+ osxApp.set_use_quartz_accelerators(true);
+ osxApp.sync_menu_bar();
+ osxApp.ready();
+#else
var menubar = this.ui_manager.get_widget ("/MenuBar");
main_vbox.pack_start (menubar, false, false, 0);
+#endif
main_vbox.pack_start (hbox, true, true, 0);
add (main_vbox);
-
main_vbox.show_all();
this.vbox_right.hide ();
- }
+ }
private void set_atk_name_description (Widget widget, string name, string description)
{