void IExtensionService.Initialize() { action_service = ServiceManager.Get<InterfaceActionService> (); viewMenu = (action_service.UIManager.GetWidget ("/MainMenu/ViewMenu") as MenuItem).Submenu as Menu; menuItem = new MenuItem (Catalog.GetString ("_Mini Mode")); menuItem.Activated += delegate { if (mini_mode == null) { mini_mode = new MiniMode (ServiceManager.Get<GtkElementsService> ().PrimaryWindow); } ServiceManager.Get<GtkElementsService> ().PrimaryWindow = mini_mode; mini_mode.Enable (); }; viewMenu.Insert (menuItem, 2); menuItem.Show (); }
void IExtensionService.Initialize() { action_service = ServiceManager.Get <InterfaceActionService> (); viewMenu = (action_service.UIManager.GetWidget("/MainMenu/ViewMenu") as MenuItem).Submenu as Menu; menuItem = new MenuItem(Catalog.GetString("_Mini Mode")); menuItem.Activated += delegate { if (mini_mode == null) { mini_mode = new MiniMode(ServiceManager.Get <GtkElementsService> ().PrimaryWindow); } ServiceManager.Get <GtkElementsService> ().PrimaryWindow = mini_mode; mini_mode.Enable(); }; viewMenu.Insert(menuItem, 2); menuItem.Show(); }