45
45
using MonoDevelop.Components;
46
46
using MonoDevelop.Ide.Extensions;
47
47
using Mono.TextEditor;
48
using MonoDevelop.Components.MainToolbar;
49
50
namespace MonoDevelop.Ide.Gui
52
53
/// This is the a Workspace with a multiple document interface.
54
internal class DefaultWorkbench : WorkbenchWindow, ICommandDelegatorRouter
55
internal class DefaultWorkbench : WorkbenchWindow, ICommandRouter
56
57
readonly static string mainMenuPath = "/MonoDevelop/Ide/MainMenu";
58
readonly static string appMenuPath = "/MonoDevelop/Ide/AppMenu";
57
59
readonly static string viewContentPath = "/MonoDevelop/Ide/Pads";
58
readonly static string toolbarsPath = "/MonoDevelop/Ide/Toolbar";
60
// readonly static string toolbarsPath = "/MonoDevelop/Ide/Toolbar";
59
61
readonly static string stockLayoutsPath = "/MonoDevelop/Ide/WorkbenchLayouts";
61
63
static string configFile = UserProfile.Current.ConfigDir.Combine ("EditingLayout.xml");
62
64
const string fullViewModeTag = "[FullViewMode]";
63
65
const int MAX_LASTACTIVEWINDOWS = 10;
66
const int MinimumWidth = 1000;
67
const int MinimumHeight = 600;
65
69
// list of layout names for the current context, without the context prefix
66
70
List<string> layouts = new List<string> ();
77
81
bool ignorePageSwitch;
80
Rectangle normalBounds = new Rectangle(0, 0, 640, 480);
84
Rectangle normalBounds = new Rectangle(0, 0, MinimumWidth, MinimumHeight);
82
86
Gtk.Container rootWidget;
83
87
DockToolbarFrame toolbarFrame;
85
89
SdiDragNotebook tabControl;
86
90
Gtk.MenuBar topMenu;
87
Gtk.Toolbar[] toolbars;
88
MonoDevelopStatusBar statusBar;
89
91
Gtk.VBox fullViewVBox;
90
92
DockItem documentDockItem;
94
MonoDevelopStatusBar bottomBar;
108
112
public event EventHandler ActiveWorkbenchWindowChanged;
110
public MonoDevelopStatusBar StatusBar {
112
if (statusBar == null)
113
statusBar = new MonoDevelop.Ide.MonoDevelopStatusBar ();
114
public MonoDevelop.Ide.StatusBar StatusBar {
116
return toolbar.StatusBar;
120
public MainToolbar Toolbar {
118
126
public Gtk.MenuBar TopMenu {
119
127
get { return topMenu; }
130
public MonoDevelopStatusBar BottomBar {
131
get { return bottomBar; }
122
public IWorkbenchWindow ActiveWorkbenchWindow {
134
internal IWorkbenchWindow ActiveWorkbenchWindow {
124
if (tabControl == null || tabControl.CurrentPage < 0 || tabControl.CurrentPage >= tabControl.NPages) {
136
if (tabControl == null || tabControl.CurrentTabIndex < 0 || tabControl.CurrentTabIndex >= tabControl.TabCount) {
127
return (IWorkbenchWindow) tabControl.CurrentPageWidget;
139
return (IWorkbenchWindow) tabControl.CurrentTab.Content;
229
233
Gtk.Window.DefaultIconName = appIconName;
234
var iconsEl = BrandingService.GetElement ("ApplicationIcons");
235
if (iconsEl != null) {
237
this.IconList = iconsEl.Elements ("Icon")
238
.Select (el => new Gdk.Pixbuf (BrandingService.GetFile ((string)el))).ToArray ();
240
} catch (Exception ex) {
241
LoggingService.LogError ("Could not load app icons", ex);
237
if (!Platform.IsMac) {
239
var iconsEl = BrandingService.GetElement ("ApplicationIcons");
240
if (iconsEl != null) {
242
this.IconList = iconsEl.Elements ("Icon")
243
.Select (el => new Gdk.Pixbuf (BrandingService.GetFile ((string)el))).ToArray ();
245
} catch (Exception ex) {
246
LoggingService.LogError ("Could not load app icons", ex);
285
291
// TopMenu.Selected += new CommandHandler(OnTopMenuSelected);
286
292
// TopMenu.Deselected += new CommandHandler(OnTopMenuDeselected);
288
if (!DesktopService.SetGlobalMenu (IdeApp.CommandService, mainMenuPath))
289
topMenu = IdeApp.CommandService.CreateMenuBar (mainMenuPath);
291
toolbars = IdeApp.CommandService.CreateToolbarSet (toolbarsPath);
292
foreach (Gtk.Toolbar t in toolbars) {
293
t.ToolbarStyle = Gtk.ToolbarStyle.Icons;
294
t.IconSize = IdeApp.Preferences.ToolbarSize;
294
if (!DesktopService.SetGlobalMenu (IdeApp.CommandService, mainMenuPath, appMenuPath)) {
296
IdeApp.Preferences.ToolbarSizeChanged += delegate {
297
foreach (Gtk.Toolbar t in toolbars) {
298
t.IconSize = IdeApp.Preferences.ToolbarSize;
302
298
AddinManager.ExtensionChanged += OnExtensionChanged;
305
301
void OnExtensionChanged (object s, ExtensionEventArgs args)
307
if (args.PathChanged (mainMenuPath)) {
308
if (DesktopService.SetGlobalMenu (IdeApp.CommandService, mainMenuPath))
303
if (args.PathChanged (mainMenuPath) || args.PathChanged (appMenuPath)) {
304
if (DesktopService.SetGlobalMenu (IdeApp.CommandService, mainMenuPath, appMenuPath))
311
307
UninstallMenuBar ();
312
topMenu = IdeApp.CommandService.CreateMenuBar (mainMenuPath);
313
309
InstallMenuBar ();
316
if (args.PathChanged (toolbarsPath)) {
317
toolbars = IdeApp.CommandService.CreateToolbarSet (toolbarsPath);
318
string cl = toolbarFrame.CurrentLayout;
319
DockToolbarFrameStatus mem = toolbarFrame.GetStatus ();
320
toolbarFrame.ClearToolbars ();
321
foreach (DockToolbar tb in toolbars) {
322
tb.ToolbarStyle = Gtk.ToolbarStyle.Icons;
324
toolbarFrame.AddBar (tb);
326
toolbarFrame.SetStatus (mem);
327
toolbarFrame.CurrentLayout = cl;
313
void CreateMenuBar ()
315
topMenu = IdeApp.CommandService.CreateMenuBar (mainMenuPath);
316
var appMenu = IdeApp.CommandService.CreateMenu (appMenuPath);
317
if (appMenu != null && appMenu.Children.Length > 0) {
318
var item = new MenuItem (BrandingService.ApplicationName);
319
item.Submenu = appMenu;
320
topMenu.Insert (item, 0);
363
356
foreach (IViewContent content in fullList) {
364
357
IWorkbenchWindow window = content.WorkbenchWindow;
365
358
if (window != null)
366
window.CloseWindow(true, true, 0);
359
window.CloseWindow(true);
369
362
closeAll = false;
389
Gtk.Image mimeimage = null;
382
Gdk.Pixbuf mimeimage = null;
391
384
if (content.StockIconId != null ) {
392
mimeimage = new Gtk.Image ((IconId) content.StockIconId, IconSize.Menu );
385
mimeimage = ImageService.GetPixbuf (content.StockIconId, IconSize.Menu);
394
387
else if (content.IsUntitled && content.UntitledName == null) {
395
mimeimage = new Gtk.Image (DesktopService.GetPixbufForType ("gnome-fs-regular", Gtk.IconSize.Menu));
388
mimeimage = DesktopService.GetPixbufForType ("gnome-fs-regular", Gtk.IconSize.Menu);
397
mimeimage = new Gtk.Image (DesktopService.GetPixbufForFile (content.ContentName ?? content.UntitledName, Gtk.IconSize.Menu));
390
mimeimage = DesktopService.GetPixbufForFile (content.ContentName ?? content.UntitledName, Gtk.IconSize.Menu);
400
TabLabel tabLabel = new TabLabel (new Label (), mimeimage != null ? mimeimage : new Gtk.Image (""));
401
tabLabel.CloseClicked += new EventHandler (closeClicked);
402
tabLabel.ClearFlag (WidgetFlags.CanFocus);
405
SdiWorkspaceWindow sdiWorkspaceWindow = new SdiWorkspaceWindow (this, content, tabControl, tabLabel);
393
var tab = tabControl.InsertTab (-1);
395
SdiWorkspaceWindow sdiWorkspaceWindow = new SdiWorkspaceWindow (this, content, tabControl, tab);
406
396
sdiWorkspaceWindow.TitleChanged += delegate { SetWorkbenchTitle (); };
407
397
sdiWorkspaceWindow.Closed += CloseWindowEvent;
408
398
sdiWorkspaceWindow.Show ();
410
tabControl.InsertPage (sdiWorkspaceWindow, tabLabel, -1);
400
tab.Content = sdiWorkspaceWindow;
401
if (mimeimage != null)
402
tab.Icon = mimeimage;
412
404
if (content.Project != null)
413
405
content.Project.NameChanged += HandleProjectNameChanged;
415
407
if (bringToFront)
416
408
content.WorkbenchWindow.SelectWindow();
410
// The insertion of the tab may have changed the active view (or maybe not, this is checked in OnActiveWindowChanged)
411
OnActiveWindowChanged (null, null);
419
414
void HandleProjectNameChanged (object sender, SolutionItemRenamedEventArgs e)
456
451
void RegisterPad (PadCodon content)
458
453
if (content.HasId) {
459
ActionCommand cmd = new ActionCommand ("Pad|" + content.PadId, GettextCatalog.GetString (content.Label), null);
454
string lab = content.Label.Length > 0 ? GettextCatalog.GetString (content.Label) : "";
455
ActionCommand cmd = new ActionCommand ("Pad|" + content.PadId, lab, null);
460
456
cmd.DefaultHandler = new PadActivationHandler (this, content);
461
457
cmd.Category = GettextCatalog.GetString ("View");
462
458
cmd.Description = GettextCatalog.GetString ("Show {0}", cmd.Text);
617
void CheckRemovedFile(object sender, FileEventArgs args)
613
void CheckRemovedFile (object sender, FileEventArgs args)
619
615
foreach (FileEventInfo e in args) {
620
616
if (e.IsDirectory) {
621
617
IViewContent[] views = new IViewContent [viewContentCollection.Count];
622
618
viewContentCollection.CopyTo (views, 0);
623
619
foreach (IViewContent content in views) {
624
if (content.ContentName.StartsWith(e.FileName)) {
625
content.WorkbenchWindow.CloseWindow(true, true, 0);
620
if (content.ContentName.StartsWith (e.FileName)) {
621
((SdiWorkspaceWindow)content.WorkbenchWindow).CloseWindow (true, true);
629
625
foreach (IViewContent content in viewContentCollection) {
630
626
if (content.ContentName != null &&
631
content.ContentName == e.FileName) {
632
content.WorkbenchWindow.CloseWindow(true, true, 0);
627
content.ContentName == e.FileName) {
628
// Don't close files that are removed (potential data loss) see #11380.
629
((SdiWorkspaceWindow)content.WorkbenchWindow).ViewContent.IsDirty = true;
643
640
if (e.IsDirectory) {
644
641
foreach (IViewContent content in viewContentCollection) {
645
642
if (content.ContentName != null && ((FilePath)content.ContentName).IsChildPathOf (e.SourceFile)) {
646
content.ContentName = e.TargetFile + content.ContentName.Substring(e.SourceFile.FileName.Length);
643
content.ContentName = e.TargetFile.Combine (((FilePath) content.ContentName).FileName);
738
735
if (lastActive == ActiveWorkbenchWindow)
738
WelcomePage.WelcomePageService.HideWelcomePage ();
740
if (lastActive != null)
741
((SdiWorkspaceWindow)lastActive).OnDeactivated ();
741
743
if (lastActiveWindows.Count > MAX_LASTACTIVEWINDOWS)
742
744
lastActiveWindows.RemoveFirst ();
746
lastActiveWindows.Remove (lastActive);
744
747
lastActiveWindows.AddLast (lastActive);
745
748
lastActive = ActiveWorkbenchWindow;
746
749
SetWorkbenchTitle ();
751
if (!closeAll && ActiveWorkbenchWindow != null)
752
((SdiWorkspaceWindow)ActiveWorkbenchWindow).OnActivated ();
748
754
if (!closeAll && ActiveWorkbenchWindowChanged != null) {
749
755
ActiveWorkbenchWindowChanged(this, e);
753
public Gtk.Toolbar[] ToolBars {
754
get { return toolbars; }
757
759
public PadCodon GetPad(Type type)
759
761
foreach (PadCodon pad in PadContentCollection) {
789
791
AddinManager.AddExtensionNodeHandler (viewContentPath, OnExtensionChanged);
790
792
initializing = false;
793
795
void CreateComponents ()
795
797
fullViewVBox = new VBox (false, 0);
796
798
rootWidget = fullViewVBox;
798
800
InstallMenuBar ();
802
toolbar = DesktopService.CreateMainToolbar (this);
803
DesktopService.SetMainWindowDecorations (this);
804
var toolbarBox = new HBox ();
805
fullViewVBox.PackStart (toolbarBox, false, false, 0);
800
806
toolbarFrame = new CommandFrame (IdeApp.CommandService);
801
808
fullViewVBox.PackStart (toolbarFrame, true, true, 0);
803
foreach (DockToolbar t in toolbars)
804
toolbarFrame.AddBar (t);
806
810
// Create the docking widget and add it to the window.
807
811
dock = new DockFrame ();
828
832
toolbarFrame.AddContent (dock);
830
834
// Create the notebook for the various documents.
831
tabControl = new SdiDragNotebook (dock.ShadedContainer);
832
tabControl.Scrollable = true;
835
tabControl = new SdiDragNotebook ();
833
836
tabControl.SwitchPage += OnActiveWindowChanged;
834
tabControl.PageAdded += OnActiveWindowChanged;
835
837
tabControl.PageRemoved += OnActiveWindowChanged;
838
tabControl.TabClosed += CloseClicked;
837
tabControl.ButtonPressEvent += delegate(object sender, ButtonPressEventArgs e) {
838
int tab = tabControl.FindTabAtPosition (e.Event.XRoot, e.Event.YRoot);
841
tabControl.CurrentPage = tab;
842
if (e.Event.Type == Gdk.EventType.TwoButtonPress)
843
ToggleFullViewMode ();
840
tabControl.TabActivated += delegate(object sender, TabEventArgs e) {
841
ToggleFullViewMode ();
846
844
this.tabControl.DoPopupMenu = ShowPopup;
848
846
tabControl.TabsReordered += new TabsReorderedHandler (OnTabsReordered);
849
fullViewVBox.ShowAll ();
850
bottomBar = new MonoDevelopStatusBar ();
851
fullViewVBox.PackEnd (bottomBar, false, true, 0);
852
bottomBar.ShowAll ();
853
toolbarBox.PackStart (this.toolbar, true, true, 0);
855
// In order to get the correct bar height we need to calculate the tab size using the
856
// correct style (the style of the window). At this point the widget is not yet a child
857
// of the window, so its style is not yet the correct one.
858
tabControl.InitSize (this);
859
var barHeight = tabControl.BarHeight;
850
861
// The main document area
851
862
documentDockItem = dock.AddItem ("Documents");
852
863
documentDockItem.Behavior = DockItemBehavior.Locked;
854
865
documentDockItem.DrawFrame = false;
855
866
documentDockItem.Label = GettextCatalog.GetString ("Documents");
856
867
documentDockItem.Content = tabControl;
869
DockVisualStyle style = new DockVisualStyle ();
870
style.PadTitleLabelColor = Styles.PadLabelColor;
871
style.PadBackgroundColor = Styles.PadBackground;
872
style.InactivePadBackgroundColor = Styles.InactivePadBackground;
873
style.PadTitleHeight = barHeight;
874
dock.DefaultVisualStyle = style;
876
style = new DockVisualStyle ();
877
style.PadTitleLabelColor = Styles.PadLabelColor;
878
style.PadTitleHeight = barHeight;
879
style.ShowPadTitleIcon = false;
880
style.UppercaseTitles = false;
881
style.ExpandedTabs = true;
882
style.PadBackgroundColor = Styles.BrowserPadBackground;
883
style.InactivePadBackgroundColor = Styles.InactiveBrowserPadBackground;
884
style.TreeBackgroundColor = Styles.BrowserPadBackground;
885
dock.SetDockItemStyle ("ProjectPad", style);
886
dock.SetDockItemStyle ("ClassPad", style);
888
// dock.SetRegionStyle ("Documents/Left", style);
889
//dock.SetRegionStyle ("Documents/Right", style);
891
// style = new DockVisualStyle ();
892
// style.SingleColumnMode = true;
893
// dock.SetRegionStyle ("Documents/Left;Documents/Right", style);
894
// dock.SetDockItemStyle ("Documents", style);
858
896
// Add some hiden items to be used as position reference
859
897
DockItem dit = dock.AddItem ("__left");
860
898
dit.DefaultLocation = "Documents/Left";
876
914
dit.Behavior = DockItemBehavior.Locked;
877
915
dit.DefaultVisible = false;
880
fullViewVBox.ShowAll ();
882
fullViewVBox.PackEnd (this.StatusBar, false, true, 0);
884
917
if (MonoDevelop.Core.Platform.IsMac)
885
this.StatusBar.HasResizeGrip = true;
918
bottomBar.HasResizeGrip = true;
887
920
if (GdkWindow != null && GdkWindow.State == Gdk.WindowState.Maximized)
888
IdeApp.Workbench.StatusBar.HasResizeGrip = false;
921
bottomBar.HasResizeGrip = false;
889
922
SizeAllocated += delegate {
890
923
if (GdkWindow != null)
891
IdeApp.Workbench.StatusBar.HasResizeGrip = GdkWindow.State != Gdk.WindowState.Maximized;
924
bottomBar.HasResizeGrip = GdkWindow.State != Gdk.WindowState.Maximized;
969
1002
void ShowPopup (int tabIndex, Gdk.EventButton evt)
971
this.tabControl.Page = tabIndex;
1004
this.tabControl.CurrentTabIndex = tabIndex;
972
1005
IdeApp.CommandService.ShowContextMenu (this.tabControl, evt, "/MonoDevelop/Ide/ContextMenu/DocumentTab");
1125
1157
void CloseWindowEvent (object sender, WorkbenchWindowEventArgs e)
1127
1159
SdiWorkspaceWindow f = (SdiWorkspaceWindow) sender;
1129
// Unsubscribe events to avoid memory leaks
1130
f.TabLabel.CloseClicked -= new EventHandler (closeClicked);
1160
lastActiveWindows.Remove (f);
1132
1162
if (f.ViewContent != null) {
1133
1163
CloseContent (f.ViewContent);
1134
1164
if (e.WasActive && !SelectLastActiveWindow (f))
1137
1167
lastActiveWindows.Remove (f);
1140
void closeClicked (object o, EventArgs e)
1170
void CloseClicked (object o, TabEventArgs e)
1142
Widget tabLabel = ((Widget)o);
1143
foreach (Widget child in tabControl.Children) {
1144
if (tabControl.GetTabLabel (child) == tabLabel) {
1145
int pageNum = tabControl.PageNum (child);
1146
((SdiWorkspaceWindow)child).CloseWindow (false, false, pageNum);
1172
((SdiWorkspaceWindow)e.Tab.Content).CloseWindow (false, true);
1152
internal void RemoveTab (int pageNum) {
1175
internal void RemoveTab (int pageNum, bool animate)
1154
1178
// Weird switch page events are fired when a tab is removed.
1155
1179
// This flag avoids unneeded events.
1156
1180
ignorePageSwitch = true;
1157
1181
IWorkbenchWindow w = ActiveWorkbenchWindow;
1158
tabControl.RemovePage (pageNum);
1182
tabControl.RemoveTab (pageNum, animate);
1159
1183
ignorePageSwitch = false;
1160
1184
if (w != ActiveWorkbenchWindow)
1161
1185
OnActiveWindowChanged (null, null);
1201
1225
public void ActivatePad (PadCodon padContent, bool giveFocus)
1227
WelcomePage.WelcomePageService.HideWelcomePage ();
1203
1229
DockItem item = GetDockItem (padContent);
1204
1230
if (item != null)
1205
1231
item.Present (giveFocus);
1324
1350
string windowTitle = GettextCatalog.GetString (window.Title);
1325
1351
if (String.IsNullOrEmpty (windowTitle))
1326
1352
windowTitle = GettextCatalog.GetString (codon.Label);
1327
if (window.IsWorking)
1328
windowTitle = "<span foreground='blue'>" + windowTitle + "</span>";
1329
else if (window.HasErrors && !window.ContentVisible)
1353
if (window.HasErrors && !window.ContentVisible)
1330
1354
windowTitle = "<span foreground='red'>" + windowTitle + "</span>";
1331
1355
else if (window.HasNewData && !window.ContentVisible)
1332
1356
windowTitle = "<b>" + windowTitle + "</b>";
1340
#region ICommandDelegatorRouter implementation
1342
// The command route is redirected here to the active document view.
1343
// This is done to make the view commands available even when the
1344
// view has not the active focus, especially when the focus is
1345
// on a pad. Although it may seem a bit inconsistent (because
1346
// MD will not have active commands which don't directly apply to
1347
// the active widget) in general it makes sense, views are the
1348
// main working areas of the IDE and users often expect view commands
1349
// to be available even if the focus is in a secondary Pad window.
1351
// This change also fixes some issues with the property and outline
1352
// pads, which depend on the current selection, and were being reset
1353
// when the main view lost focus.
1355
object ICommandDelegatorRouter.GetNextCommandTarget ()
1357
// This is the last object of the chain
1361
object ICommandDelegatorRouter.GetDelegatedCommandTarget ()
1363
// The command manager checks if an object has already been visited
1364
// while scanning the command route, so if the active command
1365
// route already includes the active workbench view, it won't be
1367
return ActiveWorkbenchWindow;
1364
#region ICommandRouter implementation
1366
object ICommandRouter.GetNextCommandTarget ()
1396
1398
// The SdiDragNotebook class allows redirecting the command route to the ViewCommandHandler
1397
1399
// object of the selected document, which implement some default commands.
1399
class SdiDragNotebook: DragNotebook, ICommandDelegatorRouter, IShadedWidget
1401
class SdiDragNotebook: DockNotebook, ICommandDelegatorRouter, ICommandBar
1401
ShadedContainer shadedContainer;
1403
public SdiDragNotebook (ShadedContainer shadedContainer)
1403
public SdiDragNotebook ()
1405
this.shadedContainer = shadedContainer;
1406
shadedContainer.Add (this);
1408
PageAdded += delegate {
1409
if (AreasChanged != null)
1410
AreasChanged (this, EventArgs.Empty);
1412
PageRemoved += delegate {
1413
if (AreasChanged != null)
1414
AreasChanged (this, EventArgs.Empty);
1405
NextButtonClicked += delegate {
1406
IdeApp.CommandService.DispatchCommand (Ide.Commands.NavigationCommands.NavigateForward);
1408
PreviousButtonClicked += delegate {
1409
IdeApp.CommandService.DispatchCommand (Ide.Commands.NavigationCommands.NavigateBack);
1411
IdeApp.CommandService.RegisterCommandBar (this);
1418
1414
public object GetNextCommandTarget ()
1423
1419
public object GetDelegatedCommandTarget ()
1425
SdiWorkspaceWindow win = (SdiWorkspaceWindow) CurrentPageWidget;
1421
SdiWorkspaceWindow win = CurrentTab != null ? (SdiWorkspaceWindow) CurrentTab.Content : null;
1426
1422
return win != null ? win.CommandHandler : null;
1429
protected override bool OnExposeEvent (Gdk.EventExpose evnt)
1431
shadedContainer.DrawBackground (this);
1432
return base.OnExposeEvent (evnt);
1435
public event EventHandler AreasChanged;
1437
public IEnumerable<Gdk.Rectangle> GetShadedAreas ()
1439
Gdk.Rectangle rect = Allocation;
1440
if (CurrentPageWidget != null && CurrentPageWidget.Visible)
1441
rect.Height -= CurrentPageWidget.Allocation.Height;
1445
public Action<int,Gdk.EventButton> DoPopupMenu { get; set; }
1447
protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
1449
if (DoPopupMenu != null && evnt.TriggersContextMenu ()) {
1450
int tab = FindTabAtPosition (evnt.XRoot, evnt.YRoot);
1452
DoPopupMenu (tab, evnt);
1456
return base.OnButtonPressEvent (evnt);
1459
protected override bool OnPopupMenu ()
1461
if (DoPopupMenu != null) {
1462
DoPopupMenu (this.Page, null);
1465
return base.OnPopupMenu ();
1425
#region ICommandBar implementation
1426
bool isEnabled = true;
1428
void ICommandBar.Update (object activeTarget)
1430
var ci = IdeApp.CommandService.GetCommandInfo (Ide.Commands.NavigationCommands.NavigateForward);
1431
NextButtonEnabled = isEnabled && ci.Enabled && ci.Visible;
1433
ci = IdeApp.CommandService.GetCommandInfo (Ide.Commands.NavigationCommands.NavigateBack);
1434
PreviousButtonEnabled = isEnabled && ci.Enabled && ci.Visible;
1437
void ICommandBar.SetEnabled (bool enabled)
1439
isEnabled = enabled;
b'\\ No newline at end of file'