Ejemplo n.º 1
0
        private void BuildToolbars(IWorkspace workspace)
        {
            _toolBarBox.Remove(_toolBar);
			_toolBar.Destroy();		// make sure the old one is cleaned up!
            _toolBar = new Toolbar();
			_toolBar.ToolbarStyle = ToolbarStyle.Icons;
            _toolBarBox.PackStart(_toolBar, true, true, 0);
			_tooltips = new Tooltips();
			
			ActionModelRoot model = new ActionModelRoot("");
			//model.Merge(WorkstationModel.ToolManager.ToolbarModel);
			model.Merge(DesktopApplication.ToolSet.ToolbarModel);
			if(workspace != null) {
				//model.Merge(workspace.ToolManager.ToolbarModel);
				model.Merge(workspace.ToolSet.ToolbarModel);
			}
            GtkToolbarBuilder.BuildToolbar(_toolBar, _tooltips, model);
			
            _toolBar.ShowAll();
        }
Ejemplo n.º 2
0
        private void BuildMenus(IWorkspace workspace)
        {
            foreach(Widget w in _mainMenu) {
                _mainMenu.Remove(w);
				w.Destroy();
            }
			
			ActionModelRoot model = new ActionModelRoot("");
			//model.Merge(WorkstationModel.ToolManager.MenuModel);
			model.Merge(DesktopApplication.ToolSet.MenuModel);
			if(workspace != null) {
				//model.Merge(workspace.ToolManager.MenuModel);
				model.Merge(workspace.ToolSet.MenuModel);
			}

            GtkMenuBuilder.BuildMenu(_mainMenu, model);
            _mainMenu.ShowAll();
        }