Example #1
0
        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 ();
        }
Example #2
0
        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();
        }