Gtk.UIManager BuildUIManager() { Gtk.ActionEntry[] actions = new Gtk.ActionEntry[] { new Gtk.ActionEntry("ProfileMenu", null, Catalog.GetString("_Profile"), null, null, null), new Gtk.ActionEntry("NewAction", Gtk.Stock.New, null, "<control>N", Catalog.GetString("Create New Profile"), new EventHandler(OnNewActivated)), new Gtk.ActionEntry("OpenAction", Gtk.Stock.Open, null, "<control>O", Catalog.GetString("Open Existing Profile Log"), new EventHandler(OnOpenActivated)), new Gtk.ActionEntry("SaveAsAction", Gtk.Stock.SaveAs, null, "<control>S", Catalog.GetString("Save Profile Data"), new EventHandler(OnSaveAsActivated)), new Gtk.ActionEntry("RecentLogsMenu", null, Catalog.GetString("Recent _Logs"), null, null, null), new Gtk.ActionEntry("RecentLogs0", null, "_0", null, null, new EventHandler(OnRecentLogsActivated)), new Gtk.ActionEntry("RecentLogs1", null, "_1", null, null, new EventHandler(OnRecentLogsActivated)), new Gtk.ActionEntry("RecentLogs2", null, "_2", null, null, new EventHandler(OnRecentLogsActivated)), new Gtk.ActionEntry("RecentLogs3", null, "_3", null, null, new EventHandler(OnRecentLogsActivated)), new Gtk.ActionEntry("RecentLogs4", null, "_4", null, null, new EventHandler(OnRecentLogsActivated)), new Gtk.ActionEntry("RepeatSessionsMenu", null, Catalog.GetString("Re_peat Sessions"), null, null, null), new Gtk.ActionEntry("RepeatSession0", null, "_0", null, null, new EventHandler(OnRepeatSessionActivated)), new Gtk.ActionEntry("RepeatSession1", null, "_1", null, null, new EventHandler(OnRepeatSessionActivated)), new Gtk.ActionEntry("RepeatSession2", null, "_2", null, null, new EventHandler(OnRepeatSessionActivated)), new Gtk.ActionEntry("RepeatSession3", null, "_3", null, null, new EventHandler(OnRepeatSessionActivated)), new Gtk.ActionEntry("RepeatSession4", null, "_4", null, null, new EventHandler(OnRepeatSessionActivated)), new Gtk.ActionEntry("QuitAction", Gtk.Stock.Quit, null, "<control>Q", Catalog.GetString("Quit Profiler"), new EventHandler(OnQuitActivated)), new Gtk.ActionEntry("RunMenu", null, Catalog.GetString("_Run"), null, null, null), new Gtk.ActionEntry("ViewMenu", null, Catalog.GetString("_View"), null, null, null), }; Gtk.ToggleActionEntry[] toggle_actions = new Gtk.ToggleActionEntry[] { new Gtk.ToggleActionEntry("ShowSystemNodesAction", null, Catalog.GetString("_Show system nodes"), null, Catalog.GetString("Shows internal nodes of system library method invocations"), new EventHandler(OnShowSystemNodesActivated), false), new Gtk.ToggleActionEntry("LogEnabledAction", null, Catalog.GetString("_Logging enabled"), null, Catalog.GetString("Profile logging enabled"), new EventHandler(OnLoggingActivated), true), }; group = new Gtk.ActionGroup("group"); group.Add(actions); group.Add(toggle_actions); Gtk.UIManager uim = new Gtk.UIManager(); uim.InsertActionGroup(group, (int)uim.NewMergeId()); uim.AddUiFromString(ui_info); AddAccelGroup(uim.AccelGroup); logging_enabled_action = group.GetAction("LogEnabledAction") as Gtk.ToggleAction; logging_enabled_action.Visible = false; save_action = group.GetAction("SaveAsAction"); save_action.Sensitive = false; show_system_nodes_action = group.GetAction("ShowSystemNodesAction"); return(uim); }
public override void Initialize(IPlayer player) { Gtk.ActionEntry[] actionEntries = new Gtk.ActionEntry[] { new Gtk.ActionEntry( "SerpentineBurn", null, "Record Playlist to disc...", "", null, new EventHandler(this.runSerpentine) ), }; Gtk.ActionGroup actionGroup = new Gtk.ActionGroup("ShuffleActions"); actionGroup.Add(actionEntries); player.UIManager.InsertActionGroup(actionGroup, -1); player.UIManager.AddUi(player.UIManager.NewMergeId(), "/MenuBar/FileMenu/ExtraFileActions", "SerpentineMenuItem", "SerpentineBurn", Gtk.UIManagerItemType.Menuitem, false); }
public override void Initialize(IPlayer player) { Gtk.ActionEntry[] actionEntries = new Gtk.ActionEntry[] { new Gtk.ActionEntry ( "SerpentineBurn", null, "Record Playlist to disc...", "", null, new EventHandler (this.runSerpentine) ), }; Gtk.ActionGroup actionGroup = new Gtk.ActionGroup("ShuffleActions"); actionGroup.Add(actionEntries); player.UIManager.InsertActionGroup(actionGroup, -1); player.UIManager.AddUi(player.UIManager.NewMergeId(), "/MenuBar/FileMenu/ExtraFileActions", "SerpentineMenuItem", "SerpentineBurn", Gtk.UIManagerItemType.Menuitem, false); }
Gtk.UIManager BuildUIManager() { Gtk.ActionEntry[] actions = new Gtk.ActionEntry[] { new Gtk.ActionEntry ("ProfileMenu", null, Catalog.GetString ("_Profile"), null, null, null), new Gtk.ActionEntry ("NewAction", Gtk.Stock.New, null, "<control>N", Catalog.GetString ("Create New Profile"), new EventHandler (OnNewActivated)), new Gtk.ActionEntry ("OpenAction", Gtk.Stock.Open, null, "<control>O", Catalog.GetString ("Open Existing Profile Log"), new EventHandler (OnOpenActivated)), new Gtk.ActionEntry ("SaveAsAction", Gtk.Stock.SaveAs, null, "<control>S", Catalog.GetString ("Save Profile Data"), new EventHandler (OnSaveAsActivated)), new Gtk.ActionEntry ("RecentLogsMenu", null, Catalog.GetString ("Recent _Logs"), null, null, null), new Gtk.ActionEntry ("RecentLogs0", null, "_0", null, null, new EventHandler (OnRecentLogsActivated)), new Gtk.ActionEntry ("RecentLogs1", null, "_1", null, null, new EventHandler (OnRecentLogsActivated)), new Gtk.ActionEntry ("RecentLogs2", null, "_2", null, null, new EventHandler (OnRecentLogsActivated)), new Gtk.ActionEntry ("RecentLogs3", null, "_3", null, null, new EventHandler (OnRecentLogsActivated)), new Gtk.ActionEntry ("RecentLogs4", null, "_4", null, null, new EventHandler (OnRecentLogsActivated)), new Gtk.ActionEntry ("RepeatSessionsMenu", null, Catalog.GetString ("Re_peat Sessions"), null, null, null), new Gtk.ActionEntry ("RepeatSession0", null, "_0", null, null, new EventHandler (OnRepeatSessionActivated)), new Gtk.ActionEntry ("RepeatSession1", null, "_1", null, null, new EventHandler (OnRepeatSessionActivated)), new Gtk.ActionEntry ("RepeatSession2", null, "_2", null, null, new EventHandler (OnRepeatSessionActivated)), new Gtk.ActionEntry ("RepeatSession3", null, "_3", null, null, new EventHandler (OnRepeatSessionActivated)), new Gtk.ActionEntry ("RepeatSession4", null, "_4", null, null, new EventHandler (OnRepeatSessionActivated)), new Gtk.ActionEntry ("QuitAction", Gtk.Stock.Quit, null, "<control>Q", Catalog.GetString ("Quit Profiler"), new EventHandler (OnQuitActivated)), new Gtk.ActionEntry ("RunMenu", null, Catalog.GetString ("_Run"), null, null, null), new Gtk.ActionEntry ("ViewMenu", null, Catalog.GetString ("_View"), null, null, null), }; Gtk.ToggleActionEntry[] toggle_actions = new Gtk.ToggleActionEntry[] { new Gtk.ToggleActionEntry ("ShowSystemNodesAction", null, Catalog.GetString ("_Show system nodes"), null, Catalog.GetString ("Shows internal nodes of system library method invocations"), new EventHandler (OnShowSystemNodesActivated), false), new Gtk.ToggleActionEntry ("LogEnabledAction", null, Catalog.GetString ("_Logging enabled"), null, Catalog.GetString ("Profile logging enabled"), new EventHandler (OnLoggingActivated), true), }; group = new Gtk.ActionGroup ("group"); group.Add (actions); group.Add (toggle_actions); Gtk.UIManager uim = new Gtk.UIManager (); uim.InsertActionGroup (group, (int) uim.NewMergeId ()); uim.AddUiFromString (ui_info); AddAccelGroup (uim.AccelGroup); logging_enabled_action = group.GetAction ("LogEnabledAction") as Gtk.ToggleAction; logging_enabled_action.Visible = false; save_action = group.GetAction ("SaveAsAction"); save_action.Sensitive = false; show_system_nodes_action = group.GetAction ("ShowSystemNodesAction"); return uim; }