Exemplo n.º 1
0
        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            var             layers      = new LayersListWidget();
            DockItem        layers_item = workspace.AddItem("Layers");
            DockItemToolbar layers_tb   = layers_item.GetToolbar(PositionType.Bottom);

            layers_item.Label     = Catalog.GetString("Layers");
            layers_item.Content   = layers;
            layers_item.Icon      = PintaCore.Resources.GetIcon("Menu.Layers.MergeLayerDown.png");
            layers_item.Behavior |= DockItemBehavior.CantClose;

            layers_tb.Add(PintaCore.Actions.Layers.AddNewLayer.CreateDockToolBarItem());
            layers_tb.Add(PintaCore.Actions.Layers.DeleteLayer.CreateDockToolBarItem());
            layers_tb.Add(PintaCore.Actions.Layers.DuplicateLayer.CreateDockToolBarItem());
            layers_tb.Add(PintaCore.Actions.Layers.MergeLayerDown.CreateDockToolBarItem());
            layers_tb.Add(PintaCore.Actions.Layers.MoveLayerUp.CreateDockToolBarItem());
            layers_tb.Add(PintaCore.Actions.Layers.MoveLayerDown.CreateDockToolBarItem());

            Gtk.ToggleAction show_layers = padMenu.AppendToggleAction("Layers", Catalog.GetString("Layers"), null, "Menu.Layers.MergeLayerDown.png");
            show_layers.Activated      += delegate { layers_item.Visible = show_layers.Active; };
            layers_item.VisibleChanged += delegate { show_layers.Active = layers_item.Visible; };

            show_layers.Active = layers_item.Visible;

            PintaCore.Workspace.ActiveDocumentChanged += delegate { layers.Reset(); };
        }
Exemplo n.º 2
0
        public ViewActions()
        {
            Gtk.IconFactory fact = new Gtk.IconFactory ();
            fact.Add ("Menu.View.ActualSize.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ActualSize.png")));
            fact.Add ("Menu.View.Grid.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.Grid.png")));
            fact.Add ("Menu.View.Rulers.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.Rulers.png")));
            fact.Add ("Menu.View.ZoomIn.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomIn.png")));
            fact.Add ("Menu.View.ZoomOut.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomOut.png")));
            fact.Add ("Menu.View.ZoomToSelection.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomToSelection.png")));
            fact.Add ("Menu.View.ZoomToWindow.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomToWindow.png")));
            fact.AddDefault ();

            ZoomIn = new Gtk.Action ("ZoomIn", Catalog.GetString ("Zoom In"), null, Stock.ZoomIn);
            ZoomOut = new Gtk.Action ("ZoomOut", Catalog.GetString ("Zoom Out"), null, Stock.ZoomOut);
            ZoomToWindow = new Gtk.Action ("ZoomToWindow", Catalog.GetString ("Zoom to Window"), null, Stock.ZoomFit);
            ZoomToSelection = new Gtk.Action ("ZoomToSelection", Catalog.GetString ("Zoom to Selection"), null, "Menu.View.ZoomToSelection.png");
            ActualSize = new Gtk.Action ("ActualSize", Catalog.GetString ("Actual Size"), null, Stock.Zoom100);
            PixelGrid = new Gtk.ToggleAction ("PixelGrid", Catalog.GetString ("Pixel Grid"), null, "Menu.View.Grid.png");
            Rulers = new Gtk.ToggleAction ("Rulers", Catalog.GetString ("Rulers"), null, "Menu.View.Rulers.png");
            Pixels = new Gtk.Action ("Pixels", Catalog.GetString ("Pixels"), null, null);
            Inches = new Gtk.Action ("Inches", Catalog.GetString ("Inches"), null, null);
            Centimeters = new Gtk.Action ("Centimeters", Catalog.GetString ("Centimeters"), null, null);
            Fullscreen = new Gtk.Action ("Fullscreen", Catalog.GetString ("Fullscreen"), null, Stock.Fullscreen);

            ZoomComboBox = new ToolBarComboBox (75, 11, true, "3600%", "2400%", "1600%", "1200%", "800%", "700%", "600%", "500%", "400%", "300%", "200%", "100%", "66%", "50%", "33%", "25%", "16%", "12%", "8%", "5%", "Window");
            UnitComboBox = new ToolBarComboBox (100, 0, false, Catalog.GetString ("Pixels"), Catalog.GetString ("Inches"), Catalog.GetString ("Centimeters"));
        }
Exemplo n.º 3
0
        public ViewActions()
        {
            Gtk.IconFactory fact = new Gtk.IconFactory();
            fact.Add("Menu.View.ActualSize.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ActualSize.png")));
            fact.Add("Menu.View.Grid.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.Grid.png")));
            fact.Add("Menu.View.Rulers.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.Rulers.png")));
            fact.Add("Menu.View.ZoomIn.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomIn.png")));
            fact.Add("Menu.View.ZoomOut.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomOut.png")));
            fact.Add("Menu.View.ZoomToSelection.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomToSelection.png")));
            fact.Add("Menu.View.ZoomToWindow.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomToWindow.png")));
            fact.AddDefault();

            ZoomIn          = new Gtk.Action("ZoomIn", Catalog.GetString("Zoom In"), null, Stock.ZoomIn);
            ZoomOut         = new Gtk.Action("ZoomOut", Catalog.GetString("Zoom Out"), null, Stock.ZoomOut);
            ZoomToWindow    = new Gtk.Action("ZoomToWindow", Catalog.GetString("Best Fit"), null, Stock.ZoomFit);
            ZoomToSelection = new Gtk.Action("ZoomToSelection", Catalog.GetString("Zoom to Selection"), null, "Menu.View.ZoomToSelection.png");
            ActualSize      = new Gtk.Action("ActualSize", Catalog.GetString("Normal Size"), null, Stock.Zoom100);
            ToolBar         = new Gtk.ToggleAction("Toolbar", Catalog.GetString("Toolbar"), null, null);
            PixelGrid       = new Gtk.ToggleAction("PixelGrid", Catalog.GetString("Pixel Grid"), null, "Menu.View.Grid.png");
            Rulers          = new Gtk.ToggleAction("Rulers", Catalog.GetString("Rulers"), null, "Menu.View.Rulers.png");
            Pixels          = new Gtk.RadioAction("Pixels", Catalog.GetString("Pixels"), null, null, 0);
            Inches          = new Gtk.RadioAction("Inches", Catalog.GetString("Inches"), null, null, 1);
            Centimeters     = new Gtk.RadioAction("Centimeters", Catalog.GetString("Centimeters"), null, null, 2);
            Fullscreen      = new Gtk.Action("Fullscreen", Catalog.GetString("Fullscreen"), null, Stock.Fullscreen);

            ZoomCollection = new string[] { "3600%", "2400%", "1600%", "1200%", "800%", "700%", "600%", "500%", "400%", "300%", "200%", "175%", "150%", "125%", "100%", "66%", "50%", "33%", "25%", "16%", "12%", "8%", "5%", Catalog.GetString("Window") };
            ZoomComboBox   = new ToolBarComboBox(75, DefaultZoomIndex(), true, ZoomCollection);

            // Make sure these are the same group so only one will be selected at a time
            Inches.Group      = Pixels.Group;
            Centimeters.Group = Pixels.Group;
        }
Exemplo n.º 4
0
        public ViewActions()
        {
            Gtk.IconFactory fact = new Gtk.IconFactory();
            fact.Add("Menu.View.ActualSize.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ActualSize.png")));
            fact.Add("Menu.View.Grid.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.Grid.png")));
            fact.Add("Menu.View.Rulers.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.Rulers.png")));
            fact.Add("Menu.View.ZoomIn.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomIn.png")));
            fact.Add("Menu.View.ZoomOut.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomOut.png")));
            fact.Add("Menu.View.ZoomToSelection.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomToSelection.png")));
            fact.Add("Menu.View.ZoomToWindow.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Menu.View.ZoomToWindow.png")));
            fact.AddDefault();

            ZoomIn          = new Gtk.Action("ZoomIn", Catalog.GetString("Zoom In"), null, Stock.ZoomIn);
            ZoomOut         = new Gtk.Action("ZoomOut", Catalog.GetString("Zoom Out"), null, Stock.ZoomOut);
            ZoomToWindow    = new Gtk.Action("ZoomToWindow", Catalog.GetString("Best Fit"), null, Stock.ZoomFit);
            ZoomToSelection = new Gtk.Action("ZoomToSelection", Catalog.GetString("Zoom to Selection"), null, "Menu.View.ZoomToSelection.png");
            ActualSize      = new Gtk.Action("ActualSize", Catalog.GetString("Normal Size"), null, Stock.Zoom100);
            ToolBar         = new Gtk.ToggleAction("Toolbar", Catalog.GetString("Toolbar"), null, null);
            PixelGrid       = new Gtk.ToggleAction("PixelGrid", Catalog.GetString("Pixel Grid"), null, "Menu.View.Grid.png");
            Rulers          = new Gtk.ToggleAction("Rulers", Catalog.GetString("Rulers"), null, "Menu.View.Rulers.png");
            Pixels          = new Gtk.RadioAction("Pixels", Catalog.GetString("Pixels"), null, null, 0);
            Inches          = new Gtk.RadioAction("Inches", Catalog.GetString("Inches"), null, null, 1);
            Centimeters     = new Gtk.RadioAction("Centimeters", Catalog.GetString("Centimeters"), null, null, 2);
            Fullscreen      = new Gtk.Action("Fullscreen", Catalog.GetString("Fullscreen"), null, Stock.Fullscreen);

            ZoomCollection = new string[] {
                ToPercent(36),
                ToPercent(24),
                ToPercent(16),
                ToPercent(12),
                ToPercent(8),
                ToPercent(7),
                ToPercent(6),
                ToPercent(5),
                ToPercent(4),
                ToPercent(3),
                ToPercent(2),
                ToPercent(1.75),
                ToPercent(1.5),
                ToPercent(1.25),
                ToPercent(1),
                ToPercent(0.66),
                ToPercent(0.5),
                ToPercent(0.33),
                ToPercent(0.25),
                ToPercent(0.16),
                ToPercent(0.12),
                ToPercent(0.08),
                ToPercent(0.05),
                Catalog.GetString("Window")
            };
            ZoomComboBox = new ToolBarComboBox(90, DefaultZoomIndex(), true, ZoomCollection);

            // Make sure these are the same group so only one will be selected at a time
            Inches.Group      = Pixels.Group;
            Centimeters.Group = Pixels.Group;

            // The toolbar is shown by default.
            ToolBar.Active = true;
        }
Exemplo n.º 5
0
        public ViewActions()
        {
            Gtk.IconFactory fact = new Gtk.IconFactory ();
            fact.Add ("Menu.View.ActualSize.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ActualSize.png")));
            fact.Add ("Menu.View.Grid.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.Grid.png")));
            fact.Add ("Menu.View.Rulers.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.Rulers.png")));
            fact.Add ("Menu.View.ZoomIn.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomIn.png")));
            fact.Add ("Menu.View.ZoomOut.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomOut.png")));
            fact.Add ("Menu.View.ZoomToSelection.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomToSelection.png")));
            fact.Add ("Menu.View.ZoomToWindow.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomToWindow.png")));
            fact.AddDefault ();

            ZoomIn = new Gtk.Action ("ZoomIn", Catalog.GetString ("Zoom In"), null, Stock.ZoomIn);
            ZoomOut = new Gtk.Action ("ZoomOut", Catalog.GetString ("Zoom Out"), null, Stock.ZoomOut);
            ZoomToWindow = new Gtk.Action ("ZoomToWindow", Catalog.GetString ("Best Fit"), null, Stock.ZoomFit);
            ZoomToSelection = new Gtk.Action ("ZoomToSelection", Catalog.GetString ("Zoom to Selection"), null, "Menu.View.ZoomToSelection.png");
            ActualSize = new Gtk.Action ("ActualSize", Catalog.GetString ("Normal Size"), null, Stock.Zoom100);
            ToolBar = new Gtk.ToggleAction ("Toolbar", Catalog.GetString ("Toolbar"), null, null);
            PixelGrid = new Gtk.ToggleAction ("PixelGrid", Catalog.GetString ("Pixel Grid"), null, "Menu.View.Grid.png");
            Rulers = new Gtk.ToggleAction ("Rulers", Catalog.GetString ("Rulers"), null, "Menu.View.Rulers.png");
            Pixels = new Gtk.RadioAction ("Pixels", Catalog.GetString ("Pixels"), null, null, 0);
            Inches = new Gtk.RadioAction ("Inches", Catalog.GetString ("Inches"), null, null, 1);
            Centimeters = new Gtk.RadioAction ("Centimeters", Catalog.GetString ("Centimeters"), null, null, 2);
            Fullscreen = new Gtk.Action ("Fullscreen", Catalog.GetString ("Fullscreen"), null, Stock.Fullscreen);

            ZoomCollection = new string[] { "3600%", "2400%", "1600%", "1200%", "800%", "700%", "600%", "500%", "400%", "300%", "200%", "175%", "150%", "125%", "100%", "66%", "50%", "33%", "25%", "16%", "12%", "8%", "5%", "Window" };
            ZoomComboBox = new ToolBarComboBox (75, DefaultZoomIndex(), true, ZoomCollection);

            // Make sure these are the same group so only one will be selected at a time
            Inches.Group = Pixels.Group;
            Centimeters.Group = Pixels.Group;
        }
Exemplo n.º 6
0
 static void Toggled_cb(IntPtr inst)
 {
     try {
         ToggleAction __obj = GLib.Object.GetObject(inst, false) as ToggleAction;
         __obj.OnToggled();
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Exemplo n.º 7
0
        public static Gtk.CheckMenuItem CreateAcceleratedMenuItem(this Gtk.ToggleAction action, Gdk.Key key, Gdk.ModifierType mods)
        {
            CheckMenuItem item = (CheckMenuItem)action.CreateMenuItem();

            (item.Child as AccelLabel).AccelWidget = item;
            item.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(key, mods, AccelFlags.Visible));

            return(item);
        }
Exemplo n.º 8
0
        private void DisableFullscreenAction()
        {
            InterfaceActionService service = ServiceManager.Get <InterfaceActionService> ();

            Gtk.ToggleAction action = service.ViewActions["FullScreenAction"] as Gtk.ToggleAction;
            if (action != null)
            {
                action.Active = false;
            }
        }
Exemplo n.º 9
0
		public void Add (ToggleActionEntry[] entries)
		{
			foreach (ToggleActionEntry entry in entries) {
				ToggleAction action = new ToggleAction (entry.name, entry.label, entry.tooltip, entry.stock_id);
				action.Active = entry.active;
				if (entry.activated != null)
					action.Activated += entry.activated;
				if (entry.accelerator == null)
					Add (action);
				else
					Add (action, entry.accelerator);
			}
		}
Exemplo n.º 10
0
        protected void OnImagePreview(object sender, EventArgs args)
        {
            Gtk.ToggleAction action = sender as Gtk.ToggleAction;

            if (action.Active == true)
            {
                this.notebookViewer.FileAdded += new ObjectEventHandler(OnFileAdded);
            }
            else
            {
                this.notebookViewer.FileAdded -= new ObjectEventHandler(OnFileAdded);
            }
        }
Exemplo n.º 11
0
        internal static Gtk.ToggleAction CreateToggleAction(string name,
                                                            string label,
                                                            string tooltip,
                                                            string stockid,
                                                            EventHandler activated)
        {
            Gtk.ToggleAction a = new Gtk.ToggleAction(name, label, tooltip, stockid);
            if (activated != null)
            {
                a.Activated += activated;
            }

            return(a);
        }
Exemplo n.º 12
0
        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            var             history      = new HistoryTreeView();
            DockItem        history_item = workspace.AddItem("History");
            DockItemToolbar history_tb   = history_item.GetToolbar(PositionType.Bottom);

            history_item.Label           = Catalog.GetString("History");
            history_item.DefaultLocation = "Images/Bottom";
            history_item.Content         = history;
            history_item.Icon            = PintaCore.Resources.GetIcon("Menu.Layers.DuplicateLayer.png");

            history_tb.Add(PintaCore.Actions.Edit.Undo.CreateDockToolBarItem());
            history_tb.Add(PintaCore.Actions.Edit.Redo.CreateDockToolBarItem());
            Gtk.ToggleAction show_history = padMenu.AppendToggleAction("History", Catalog.GetString("History"), null, "Menu.Layers.DuplicateLayer.png");
            show_history.Activated      += delegate { history_item.Visible = show_history.Active; };
            history_item.VisibleChanged += delegate { show_history.Active = history_item.Visible; };

            show_history.Active = history_item.Visible;
        }
Exemplo n.º 13
0
 public void Add(ToggleActionEntry[] entries)
 {
     foreach (ToggleActionEntry entry in entries)
     {
         ToggleAction action = new ToggleAction(entry.name, entry.label, entry.tooltip, entry.stock_id);
         action.Active = entry.active;
         if (entry.activated != null)
         {
             action.Activated += entry.activated;
         }
         if (entry.accelerator == null)
         {
             Add(action);
         }
         else
         {
             Add(action, entry.accelerator);
         }
     }
 }
Exemplo n.º 14
0
        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            DockItem      toolbox_item = workspace.AddItem("Toolbox");
            ToolBoxWidget toolbox      = new ToolBoxWidget()
            {
                Name = "toolbox"
            };

            toolbox_item.Label        = Catalog.GetString("Tools");
            toolbox_item.Content      = toolbox;
            toolbox_item.Icon         = PintaCore.Resources.GetIcon("Tools.Pencil.png");
            toolbox_item.Behavior    |= DockItemBehavior.CantClose;
            toolbox_item.DefaultWidth = 65;

            Gtk.ToggleAction show_toolbox = padMenu.AppendToggleAction("Tools", Catalog.GetString("Tools"), null, "Tools.Pencil.png");
            show_toolbox.Activated      += delegate { toolbox_item.Visible = show_toolbox.Active; };
            toolbox_item.VisibleChanged += delegate { show_toolbox.Active = toolbox_item.Visible; };

            show_toolbox.Active = toolbox_item.Visible;
        }
Exemplo n.º 15
0
        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            DockItem           palette_item = workspace.AddItem("Palette");
            ColorPaletteWidget palette      = new ColorPaletteWidget()
            {
                Name = "palette"
            };

            palette_item.Label           = Catalog.GetString("Palette");
            palette_item.Content         = palette;
            palette_item.Icon            = PintaCore.Resources.GetIcon("Pinta.png");
            palette_item.DefaultLocation = "Toolbox/Bottom";
            palette_item.Behavior       |= DockItemBehavior.CantClose;
            palette_item.DefaultWidth    = 65;

            Gtk.ToggleAction show_palette = padMenu.AppendToggleAction("Palette", Catalog.GetString("Palette"), null, "Pinta.png");
            show_palette.Activated      += delegate { palette_item.Visible = show_palette.Active; };
            palette_item.VisibleChanged += delegate { show_palette.Active = palette_item.Visible; };

            palette.Initialize();
            show_palette.Active = palette_item.Visible;
        }
Exemplo n.º 16
0
        Gtk.MenuBar CreateMenuBar()
        {
            ActionManager am = Tomboy.ActionManager;

            menubar_ui = Tomboy.ActionManager.UI.AddUiFromResource(
                "TasksUIManagerLayout.xml");

            Gtk.MenuBar menubar =
                Tomboy.ActionManager.GetWidget("/TaskListWindowMenubar") as Gtk.MenuBar;

            am ["NewTaskAction"].Activated             += OnNewTask;
            am ["OpenTaskAction"].Activated            += OnOpenTask;
            am ["OpenOriginNoteAction"].Activated      += OnOpenOriginNote;
            am ["OpenOriginNoteAction"].Sensitive       = false;
            am ["CloseTaskListWindowAction"].Activated += OnCloseWindow;
            am ["DeleteTaskAction"].Activated          += OnDeleteTask;
            am ["ShowTaskHelpAction"].Activated        += OnShowHelp;

            // View Options
            bool pref_val;

            show_completed_tasks_toggle_action = am ["ShowCompletedTasksAction"] as Gtk.ToggleAction;
            pref_val = GetPref(TaskListWindow.ShowCompletedTasksPreference);
            show_completed_tasks_toggle_action.Active     = pref_val;
            show_completed_tasks_toggle_action.Activated += OnShowCompletedTasks;
            show_completed_tasks = pref_val;

            show_due_date_column_toggle_action = am ["ShowDueDateColumnAction"] as Gtk.ToggleAction;
            pref_val = GetPref(TaskListWindow.ShowDueDateColumnPreference);
            show_due_date_column_toggle_action.Active     = pref_val;
            show_due_date_column_toggle_action.Activated += OnShowDueDateColumn;

            show_priority_column_toggle_action = am ["ShowPriorityColumnAction"] as Gtk.ToggleAction;
            pref_val = GetPref(TaskListWindow.ShowPriorityColumnPreference);
            show_priority_column_toggle_action.Active     = pref_val;
            show_priority_column_toggle_action.Activated += OnShowPriorityColumn;

            return(menubar);
        }
Exemplo n.º 17
0
        private void OnFullScreen(object o, EventArgs args)
        {
            Gtk.ToggleAction action = this["FullScreenAction"] as Gtk.ToggleAction;
            if (action == null)
            {
                return;
            }

            if (Fullscreen != null)
            {
                Fullscreen(action.Active);
                return;
            }

            GtkElementsService service = ServiceManager.Get <GtkElementsService> ();

            if (service == null || action == null)
            {
                return;
            }

            Gtk.Window window = service.PrimaryWindow;

            if (window == null)
            {
                return;
            }
            else if (action.Active)
            {
                window.Fullscreen();
            }
            else
            {
                window.Unfullscreen();
            }
        }
Exemplo n.º 18
0
 public static Gtk.ToggleAction AppendToggleAction(this Menu menu, string actionName, string actionLabel, string actionTooltip, string actionIcon)
 {
     Gtk.ToggleAction action = new Gtk.ToggleAction(actionName, actionLabel, actionTooltip, actionIcon);
     menu.AppendItem((MenuItem)action.CreateMenuItem());
     return(action);
 }
Exemplo n.º 19
0
        public Menu BuildLocationlMenu()
        {
            Menu etMenu = new Menu();

            Gtk.Action home_action = new Gtk.Action("Home", Catalog.GetString("Home"));
            etMenu.Append(home_action.CreateMenuItem());
            home_action.Activated += HandleHome_actionActivated;
            int iCount = 0;
            foreach (Location loc in m_locations.Values)
            {
                Gtk.Action action = new Gtk.Action(loc.Name, loc.Name);
                etMenu.Append(action.CreateMenuItem());
                action.Activated += HandleActionActivated;
                iCount ++;

            }
            etMenu.Append(new MenuItem());
            gpsdAction = new ToggleAction("UseGPSD", Catalog.GetString("GPSD Position"),null, null);
            //gpsdAction.Active = UIMonitor.getInstance().Configuration.UseGPSD;
            gpsdAction.Toggled += HandleGpsdActionToggled;
            etMenu.Append(gpsdAction.CreateMenuItem());
            etMenu.ShowAll();
            return etMenu;
        }
Exemplo n.º 20
0
        public void SetUpActionGroup()
        {
            // menus
            file_menu = new Gtk.Action("FileMenu", "_File", null, null);
            action_group.Add(file_menu);
            edit_menu = new Gtk.Action("EditMenu", "_Edit", null, null);
            action_group.Add(edit_menu);
            view_menu = new Gtk.Action("ViewMenu", "_View", null, null);
            action_group.Add(view_menu);
            subs_menu = new Gtk.Action("SubsMenu", "_Feed", null, null);
            action_group.Add(subs_menu);
            item_menu = new Gtk.Action("ItemMenu", "_Item", null, null);
            action_group.Add(item_menu);
            help_menu = new Gtk.Action("HelpMenu", "_Help", null, null);
            action_group.Add(help_menu);

            // the file menu
            addaction = new Summa.Actions.AddAction(this);
            action_group.Add(addaction, "<ctrl>n");

            import_action = new Summa.Actions.ImportAction(this);
            action_group.Add(import_action);

            Up_all_action = new Summa.Actions.UpdateAllAction(this);
            action_group.Add(Up_all_action, "<ctrl>r");

            print_action = new Summa.Actions.PrintAction(this);
            action_group.Add(print_action, "<ctrl>p");

            print_prev_action = new Summa.Actions.PrintPreviewAction(this);
            action_group.Add(print_prev_action, "<shift><ctrl>p");

            email_action = new Summa.Actions.EmailLinkAction(this);
            action_group.Add(email_action);

            bookmark_action = new Summa.Actions.BookmarkAction(this);
            bookmark_action.Sensitive = false;
            action_group.Add(bookmark_action, "<ctrl>d");

            new_tab_action = new Summa.Actions.NewTabAction(this);
            new_tab_action.Sensitive = false;
            action_group.Add(new_tab_action, "<ctrl>t");

            new_win_action = new Summa.Actions.NewWindowAction(this);
            action_group.Add(new_win_action, "<shift><ctrl>N");

            close_action = new Summa.Actions.CloseWindowAction(this);
            action_group.Add(close_action, "<ctrl>W");

            // edit menu
            copy_action = new Summa.Actions.CopyAction(this);
            action_group.Add(copy_action, "<ctrl>C");

            select_all_action = new Summa.Actions.SelectAllAction(this);
            action_group.Add(select_all_action, "<ctrl>A");

            find_action = new Summa.Actions.FindAction(this);
            action_group.Add(find_action, "<ctrl>F");

            prefs_action = new Summa.Actions.PreferencesAction(this);
            action_group.Add(prefs_action);

            // subscription menu
            update_action = new Summa.Actions.UpdateAction(this);
            action_group.Add(update_action, "<ctrl>u");

            read_action = new Summa.Actions.MarkReadAction(this);
            action_group.Add(read_action, "<ctrl>m");

            delete_action = new Summa.Actions.DeleteAction(this);
            action_group.Add(delete_action);

            props_action = new Summa.Actions.PropertiesAction(this);
            action_group.Add(props_action);

            tags_action = new Summa.Actions.TagsAction(this);
            action_group.Add(tags_action);

            // item menu
            zoom_in_action = new Summa.Actions.ZoomInAction(this);
            zoom_in_action.Sensitive = false;
            action_group.Add(zoom_in_action, null);

            zoom_out_action = new Summa.Actions.ZoomOutAction(this);
            zoom_out_action.Sensitive = false;
            action_group.Add(zoom_out_action, null);

            load_images_action = new Summa.Actions.LoadImagesAction(this);
            action_group.Add(load_images_action, null);

            hide_read_action = new Summa.Actions.HideReadAction(this);
            action_group.Add(hide_read_action, null);

            next_item_action = new Summa.Actions.NextItemAction(this);
            action_group.Add(next_item_action, "n");

            prev_item_action = new Summa.Actions.PreviousItemAction(this);
            action_group.Add(prev_item_action, "j");

            flag_action = new Summa.Actions.FlagAction(this);
            flag_action.Sensitive = false;
            action_group.Add(flag_action);

            unread_action = new Summa.Actions.UnreadAction(this);
            unread_action.Sensitive = false;
            action_group.Add(unread_action);

            play_action = new Summa.Actions.EnclosureAction(this);
            play_action.Sensitive = false;
            action_group.Add(play_action);

            save_action = new Summa.Actions.SaveEnclosureAction(this);
            save_action.Sensitive = false;
            action_group.Add(save_action);

            // help menu
            help_action = new Summa.Actions.HelpAction(this);
            action_group.Add(help_action, "F11");

            about_action = new Summa.Actions.AboutAction(this);
            action_group.Add(about_action);

            view_slist = new GLib.SList(typeof(ToggleAction));

            normal_view_action = new Summa.Actions.NormalViewAction(this);
            action_group.Add(normal_view_action);
            normal_view_action.Group = view_slist;
            view_slist = normal_view_action.Group;

            widescreen_view_action = new Summa.Actions.WidescreenViewAction(this);
            action_group.Add(widescreen_view_action);
            widescreen_view_action.Group = view_slist;
            view_slist = widescreen_view_action.Group;
        }
        private void RemoveClutterFlow()
        {
            Clutter.Threads.Enter ();
            music_library.Properties.Remove ("Nereid.SourceContents");
            Clutter.Threads.Leave ();
            clutter_flow_contents.Dispose ();
            clutter_flow_contents = null;

            source_manager.ActiveSourceChanged -= HandleActiveSourceChanged;
            BrowserAction.Activated -= OnToggleBrowser;
            BrowserAction.Active = ClutterFlowSchemas.OldShowBrowser.Get ();
            CfBrowsAction.Activated -= OnToggleClutterFlow;
            CfBrowsAction.Visible = false;

            action_service.RemoveActionGroup ("ClutterFlowView");
            action_service.UIManager.RemoveUi (ui_manager_id);
            clutterflow_actions = null;
            cfbrows_action = null;

            preference_service = null;
            source_manager = null;
            music_library = null;
            action_service = null;
            browser_action = null;
            cfbrows_action = null;
        }
Exemplo n.º 22
0
		Gtk.Menu CreateMenu ()
		{
			if (menu != null)
				return menu;
			
			var group = new ActionGroup ("Popup");

			var help = new Gtk.Action ("help", GettextCatalog.GetString ("Show Error Reference"),
				GettextCatalog.GetString ("Show Error Reference"), Gtk.Stock.Help);
			help.Activated += OnShowReference;
			group.Add (help, "F1");

			var copy = new Gtk.Action ("copy", GettextCatalog.GetString ("_Copy"),
				GettextCatalog.GetString ("Copy task"), Gtk.Stock.Copy);
			copy.Activated += OnTaskCopied;
			group.Add (copy, "<Control><Mod2>c");

			var jump = new Gtk.Action ("jump", GettextCatalog.GetString ("_Go to"),
				GettextCatalog.GetString ("Go to task"), Gtk.Stock.JumpTo);
			jump.Activated += OnTaskJumpto;
			group.Add (jump);

			var columns = new Gtk.Action ("columns", GettextCatalog.GetString ("Columns"));
			group.Add (columns, null);

			var columnType = new ToggleAction ("columnType", GettextCatalog.GetString ("Type"),
				GettextCatalog.GetString ("Toggle visibility of Type column"), null);
			columnType.Toggled += OnColumnVisibilityChanged;
			columnsActions[columnType] = VisibleColumns.Type;
			group.Add (columnType);

			var columnValidity = new ToggleAction ("columnValidity", GettextCatalog.GetString ("Validity"),
				GettextCatalog.GetString ("Toggle visibility of Validity column"), null);
			columnValidity.Toggled += OnColumnVisibilityChanged;
			columnsActions[columnValidity] = VisibleColumns.Marked;
			group.Add (columnValidity);

			var columnLine = new ToggleAction ("columnLine", GettextCatalog.GetString ("Line"),
				GettextCatalog.GetString ("Toggle visibility of Line column"), null);
			columnLine.Toggled += OnColumnVisibilityChanged;
			columnsActions[columnLine] = VisibleColumns.Line;
			group.Add (columnLine);

			var columnDescription = new ToggleAction ("columnDescription", GettextCatalog.GetString ("Description"),
				GettextCatalog.GetString ("Toggle visibility of Description column"), null);
			columnDescription.Toggled += OnColumnVisibilityChanged;
			columnsActions[columnDescription] = VisibleColumns.Description;
			group.Add (columnDescription);

			var columnFile = new ToggleAction ("columnFile", GettextCatalog.GetString ("File"),
				GettextCatalog.GetString ("Toggle visibility of File column"), null);
			columnFile.Toggled += OnColumnVisibilityChanged;
			columnsActions[columnFile] = VisibleColumns.File;
			group.Add (columnFile);

			var columnProject = new ToggleAction ("columnProject", GettextCatalog.GetString ("Project"),
				GettextCatalog.GetString ("Toggle visibility of Project column"), null);
			columnProject.Toggled += OnColumnVisibilityChanged;
			columnsActions[columnProject] = VisibleColumns.Project;
			group.Add (columnProject);

			var columnPath = new ToggleAction ("columnPath", GettextCatalog.GetString ("Path"),
				GettextCatalog.GetString ("Toggle visibility of Path column"), null);
			columnPath.Toggled += OnColumnVisibilityChanged;
			columnsActions[columnPath] = VisibleColumns.Path;
			group.Add (columnPath);

			var uiManager = new UIManager ();
			uiManager.InsertActionGroup (group, 0);
			
			string uiStr = "<ui><popup name='popup'>"
				+ "<menuitem action='help'/>"
				+ "<menuitem action='copy'/>"
				+ "<menuitem action='jump'/>"
				+ "<separator/>"
				+ "<menu action='columns'>"
				+ "<menuitem action='columnType' />"
				+ "<menuitem action='columnValidity' />"
				+ "<menuitem action='columnLine' />"
				+ "<menuitem action='columnDescription' />"
				+ "<menuitem action='columnFile' />"
				+ "<menuitem action='columnProject' />"
				+ "<menuitem action='columnPath' />"
				+ "</menu>"
				+ "</popup></ui>";

			uiManager.AddUiFromString (uiStr);
			menu = (Menu)uiManager.GetWidget ("/popup");
			menu.ShowAll ();

			menu.Shown += delegate {
				columnType.Active = view.Columns[VisibleColumns.Type].Visible;
				columnValidity.Active = view.Columns[VisibleColumns.Marked].Visible;
				columnLine.Active = view.Columns[VisibleColumns.Line].Visible;
				columnDescription.Active = view.Columns[VisibleColumns.Description].Visible;
				columnFile.Active = view.Columns[VisibleColumns.File].Visible;
				columnProject.Active = view.Columns[VisibleColumns.Project].Visible;
				columnPath.Active = view.Columns[VisibleColumns.Path].Visible;
				help.Sensitive = copy.Sensitive = jump.Sensitive =
					view.Selection != null &&
					view.Selection.CountSelectedRows () > 0 &&
					(columnType.Active ||
						columnValidity.Active ||
						columnLine.Active ||
						columnDescription.Active ||
						columnFile.Active ||
						columnPath.Active);
			};
			
			return menu;
		}
Exemplo n.º 23
0
		void CreateMenu ()
		{
			if (menu == null)
			{
				ActionGroup group = new ActionGroup ("Popup");

				Gtk.Action copy = new Gtk.Action ("copy", GettextCatalog.GetString ("_Copy"),
				                          GettextCatalog.GetString ("Copy comment task"), Gtk.Stock.Copy);
				copy.Activated += new EventHandler (OnGenTaskCopied);
				group.Add (copy, "<Control><Mod2>c");

				Gtk.Action jump = new Gtk.Action ("jump", GettextCatalog.GetString ("_Go to"),
				                          GettextCatalog.GetString ("Go to comment task"), Gtk.Stock.JumpTo);
				jump.Activated += new EventHandler (OnGenTaskJumpto);
				group.Add (jump);

				Gtk.Action delete = new Gtk.Action ("delete", GettextCatalog.GetString ("_Delete"),
				                          GettextCatalog.GetString ("Delete comment task"), Gtk.Stock.Delete);
				delete.Activated += new EventHandler (OnGenTaskDelete);
				group.Add (delete);

				Gtk.Action columns = new Gtk.Action ("columns", GettextCatalog.GetString ("Columns"));
				group.Add (columns, null);

				ToggleAction columnLine = new ToggleAction ("columnLine", GettextCatalog.GetString ("Line"),
				                                            GettextCatalog.GetString ("Toggle visibility of Line column"), null);
				columnLine.Toggled += new EventHandler (OnColumnVisibilityChanged);
				columnsActions[columnLine] = (int)Columns.Line;
				group.Add (columnLine);

				ToggleAction columnDescription = new ToggleAction ("columnDescription", GettextCatalog.GetString ("Description"),
				                                            GettextCatalog.GetString ("Toggle visibility of Description column"), null);
				columnDescription.Toggled += new EventHandler (OnColumnVisibilityChanged);
				columnsActions[columnDescription] = (int)Columns.Description;
				group.Add (columnDescription);

				ToggleAction columnFile = new ToggleAction ("columnFile", GettextCatalog.GetString ("File"),
				                                            GettextCatalog.GetString ("Toggle visibility of File column"), null);
				columnFile.Toggled += new EventHandler (OnColumnVisibilityChanged);
				columnsActions[columnFile] = (int)Columns.File;
				group.Add (columnFile);

				ToggleAction columnPath = new ToggleAction ("columnPath", GettextCatalog.GetString ("Path"),
				                                            GettextCatalog.GetString ("Toggle visibility of Path column"), null);
				columnPath.Toggled += new EventHandler (OnColumnVisibilityChanged);
				columnsActions[columnPath] = (int)Columns.Path;
				group.Add (columnPath);

				UIManager uiManager = new UIManager ();
				uiManager.InsertActionGroup (group, 0);
				
				string uiStr = "<ui><popup name='popup'>"
					+ "<menuitem action='copy'/>"
					+ "<menuitem action='jump'/>"
					+ "<menuitem action='delete'/>"
					+ "<separator/>"
					+ "<menu action='columns'>"
					+ "<menuitem action='columnLine' />"
					+ "<menuitem action='columnDescription' />"
					+ "<menuitem action='columnFile' />"
					+ "<menuitem action='columnPath' />"
					+ "</menu>"
					+ "</popup></ui>";

				uiManager.AddUiFromString (uiStr);
				menu = (Menu)uiManager.GetWidget ("/popup");
				menu.ShowAll ();

				menu.Shown += delegate (object o, EventArgs args)
				{
					columnLine.Active = view.Columns[(int)Columns.Line].Visible;
					columnDescription.Active = view.Columns[(int)Columns.Description].Visible;
					columnFile.Active = view.Columns[(int)Columns.File].Visible;
					columnPath.Active = view.Columns[(int)Columns.Path].Visible;
					copy.Sensitive = jump.Sensitive = delete.Sensitive =
						view.Selection != null &&
						view.Selection.CountSelectedRows () > 0 &&
						(columnLine.Active ||
						columnDescription.Active ||
						columnFile.Active ||
						columnPath.Active);
				};
			}
		}
Exemplo n.º 24
0
        void AddViewActions(ActionGroup actionGroup)
        {
            var guiService = ServiceManager.Get<GuiService> ();

            var view = new Gtk.Action ("view", Catalog.GetString ("_View"));
            actionGroup.Add (view);

            var planning = new Gtk.RadioAction ("planning", Catalog.GetString ("Planning"), Catalog.GetString ("Select the Planning mode"), null, 0);
            var context = new Gtk.RadioAction ("context", Catalog.GetString ("Context"), Catalog.GetString ("Select the Context mode"), null, 1);
            var calendar = new Gtk.RadioAction ("calendar", Catalog.GetString ("Calendar"), Catalog.GetString ("Select the Calendar mode"), null, 2);

            context.Group = planning.Group;
            calendar.Group = planning.Group;

            planning.CurrentValue = 0;

            guiService.Window.ModeChanged += delegate {
                if (!m_inModeUpdate) {
                    m_inModeUpdate = true;
                    planning.CurrentValue = guiService.Window.Mode;
                    m_inModeUpdate = false;
                }
            };

            planning.Activated += delegate {
                if (!m_inModeUpdate) {
                    m_inModeUpdate = true;
                    guiService.Window.Mode = 0;
                    m_inModeUpdate = false;
                }
            };

            context.Activated += delegate {
                if (!m_inModeUpdate) {
                    m_inModeUpdate = true;
                    guiService.Window.Mode = 1;
                    m_inModeUpdate = false;
                }
            };

            calendar.Activated += delegate {
                if (!m_inModeUpdate) {
                    m_inModeUpdate = true;
                    guiService.Window.Mode = 2;
                    m_inModeUpdate = false;
                }
            };

            actionGroup.Add (planning, "<Alt>1");
            actionGroup.Add (context, "<Alt>2");
            actionGroup.Add (calendar, "<Alt>3");

            var attachments = new Gtk.ToggleAction ("attachments", Catalog.GetString ("Show _Attachments"), Catalog.GetString ("Show attachments"), null);
            attachments.Active = true;
            attachments.Activated += delegate {
                if (attachments.Active)
                    guiService.Window.ShowAttachments ();
                else
                    guiService.Window.HideAttachments ();
            };
            actionGroup.Add (attachments);

            var sidebar = new Gtk.ToggleAction ("sidebar", Catalog.GetString ("Show _Sidebar"), Catalog.GetString ("Show the sidebar"), null);
            sidebar.Active = true;
            sidebar.Activated += delegate {
                if (sidebar.Active)
                    guiService.Window.ShowSidebar ();
                else
                    guiService.Window.HideSidebar ();
            };
            actionGroup.Add (sidebar, "F9");

            var fullscreen = new Gtk.Action ("fullscreen", null, null, Gtk.Stock.Fullscreen);
            actionGroup.Add (fullscreen, "F11");

            var compact = new Gtk.ToggleAction ("compact", Catalog.GetString ("Compact Mode"), Catalog.GetString ("Enable compact mode"), null);
            compact.Active = guiService.Window.Planning.CompactMode;
            compact.Activated += delegate {
                guiService.Window.Planning.CompactMode = compact.Active;
            };
            actionGroup.Add (compact);
        }
Exemplo n.º 25
0
 public static Gtk.ToggleAction AppendToggleAction(this Menu menu, string actionName, string actionLabel, string actionTooltip, string actionIcon)
 {
     Gtk.ToggleAction action = new Gtk.ToggleAction (actionName, actionLabel, actionTooltip, actionIcon);
     menu.AppendItem ((MenuItem)action.CreateMenuItem ());
     return action;
 }
Exemplo n.º 26
0
		Gtk.MenuBar CreateMenuBar ()
		{
			ActionManager am = Tomboy.ActionManager;
			menubar_ui = Tomboy.ActionManager.UI.AddUiFromResource (
			                     "TasksUIManagerLayout.xml");

			Gtk.MenuBar menubar =
			        Tomboy.ActionManager.GetWidget ("/TaskListWindowMenubar") as Gtk.MenuBar;

			am ["NewTaskAction"].Activated += OnNewTask;
			am ["OpenTaskAction"].Activated += OnOpenTask;
			am ["OpenOriginNoteAction"].Activated += OnOpenOriginNote;
			am ["OpenOriginNoteAction"].Sensitive = false;
			am ["CloseTaskListWindowAction"].Activated += OnCloseWindow;
			am ["DeleteTaskAction"].Activated += OnDeleteTask;
			am ["ShowTaskHelpAction"].Activated += OnShowHelp;

			// View Options
			bool pref_val;

			show_completed_tasks_toggle_action = am ["ShowCompletedTasksAction"] as Gtk.ToggleAction;
			pref_val = GetPref (TaskListWindow.ShowCompletedTasksPreference);
			show_completed_tasks_toggle_action.Active = pref_val;
			show_completed_tasks_toggle_action.Activated += OnShowCompletedTasks;
			show_completed_tasks = pref_val;

			show_due_date_column_toggle_action = am ["ShowDueDateColumnAction"] as Gtk.ToggleAction;
			pref_val = GetPref (TaskListWindow.ShowDueDateColumnPreference);
			show_due_date_column_toggle_action.Active = pref_val;
			show_due_date_column_toggle_action.Activated += OnShowDueDateColumn;

			show_priority_column_toggle_action = am ["ShowPriorityColumnAction"] as Gtk.ToggleAction;
			pref_val = GetPref (TaskListWindow.ShowPriorityColumnPreference);
			show_priority_column_toggle_action.Active = pref_val;
			show_priority_column_toggle_action.Activated += OnShowPriorityColumn;

			return menubar;
		}
Exemplo n.º 27
0
		public ViewActions ()
		{
			Gtk.IconFactory fact = new Gtk.IconFactory ();
			fact.Add ("Menu.View.ActualSize.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ActualSize.png")));
			fact.Add ("Menu.View.Grid.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.Grid.png")));
			fact.Add ("Menu.View.Rulers.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.Rulers.png")));
			fact.Add ("Menu.View.ZoomIn.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomIn.png")));
			fact.Add ("Menu.View.ZoomOut.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomOut.png")));
			fact.Add ("Menu.View.ZoomToSelection.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomToSelection.png")));
			fact.Add ("Menu.View.ZoomToWindow.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.View.ZoomToWindow.png")));
			fact.AddDefault ();
			
			ZoomIn = new Gtk.Action ("ZoomIn", Catalog.GetString ("Zoom In"), null, Stock.ZoomIn);
			ZoomOut = new Gtk.Action ("ZoomOut", Catalog.GetString ("Zoom Out"), null, Stock.ZoomOut);
			ZoomToWindow = new Gtk.Action ("ZoomToWindow", Catalog.GetString ("Best Fit"), null, Stock.ZoomFit);
			ZoomToSelection = new Gtk.Action ("ZoomToSelection", Catalog.GetString ("Zoom to Selection"), null, "Menu.View.ZoomToSelection.png");
			ActualSize = new Gtk.Action ("ActualSize", Catalog.GetString ("Normal Size"), null, Stock.Zoom100);
            ToolBar = new Gtk.ToggleAction ("Toolbar", Catalog.GetString ("Toolbar"), null, null);
            ImageTabs = new Gtk.ToggleAction ("ImageTabs", Catalog.GetString ("Image Tabs"), null, null);
            PixelGrid = new Gtk.ToggleAction ("PixelGrid", Catalog.GetString ("Pixel Grid"), null, "Menu.View.Grid.png");
			Rulers = new Gtk.ToggleAction ("Rulers", Catalog.GetString ("Rulers"), null, "Menu.View.Rulers.png");
			Pixels = new Gtk.RadioAction ("Pixels", Catalog.GetString ("Pixels"), null, null, 0);
			Inches = new Gtk.RadioAction ("Inches", Catalog.GetString ("Inches"), null, null, 1);
			Centimeters = new Gtk.RadioAction ("Centimeters", Catalog.GetString ("Centimeters"), null, null, 2);
			Fullscreen = new Gtk.Action ("Fullscreen", Catalog.GetString ("Fullscreen"), null, Stock.Fullscreen);

			ZoomCollection = new string[] {
				ToPercent (36),
				ToPercent (24),
				ToPercent (16),
				ToPercent (12),
				ToPercent (8),
				ToPercent (7),
				ToPercent (6),
				ToPercent (5),
				ToPercent (4),
				ToPercent (3),
				ToPercent (2),
				ToPercent (1.75),
				ToPercent (1.5),
				ToPercent (1.25),
				ToPercent (1),
				ToPercent (0.66),
				ToPercent (0.5),
				ToPercent (0.33),
				ToPercent (0.25),
				ToPercent (0.16),
				ToPercent (0.12),
				ToPercent (0.08),
				ToPercent (0.05),
				Catalog.GetString ("Window")
			};
			ZoomComboBox = new ToolBarComboBox (90, DefaultZoomIndex(), true, ZoomCollection);

			// Make sure these are the same group so only one will be selected at a time
			Inches.Group = Pixels.Group;
			Centimeters.Group = Pixels.Group;

            // The toolbar is shown by default.
            ToolBar.Active = true;
            ImageTabs.Active = true;
		}