[Monodevelop-patches-list] r1121 - in trunk/MonoDevelop: . build/AddIns src/Main/Base src/Main/Base/Commands src/Main/Base/Gui/Components
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Mar 5 23:46:01 EST 2004
Author: jba
Date: 2004-03-05 23:46:01 -0500 (Fri, 05 Mar 2004)
New Revision: 1121
Removed:
trunk/MonoDevelop/src/Main/Base/Commands/FileTabStripCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/Components/OpenFileTab.cs
Modified:
trunk/MonoDevelop/ChangeLog
trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
trunk/MonoDevelop/src/Main/Base/Makefile.am
Log:
removing tab file confusion from old SD source
Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog 2004-03-06 03:35:12 UTC (rev 1120)
+++ trunk/MonoDevelop/ChangeLog 2004-03-06 04:46:01 UTC (rev 1121)
@@ -1,5 +1,12 @@
2004-03-05 John BouAntoun <jba-mono at optusnet.com.au>
+ * src/Main/Base/Gui/Components/OpenFileTab.cs : deleted (duplicates TabLabel)
+ * src/Main/Base/Commands/FileTabStripCommands.cs : deleted because OpenFileTab deleted
+ * src/Main/Base/Makefile.am : removed file refs from compilation
+ * build/AddIns/SharpDevelopCore.addin: removed file refs from addins
+
+2004-03-05 John BouAntoun <jba-mono at optusnet.com.au>
+
* src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/ReplaceDialog.cs :
changed Gtk.Combo's to Gnome.Entry's to fix bug where MD would lock up with
hidden "Not Found" Dialog popping up under the find dialog
Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin 2004-03-06 03:35:12 UTC (rev 1120)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin 2004-03-06 04:46:01 UTC (rev 1121)
@@ -340,6 +340,7 @@
</Extension>
+<!-- not using these, since the OpenFileTab has been removed (replaced with TabLabel) jba 5 march 2004
<Extension path = "/SharpDevelop/Workbench/OpenFileTab/ContextMenu">
<MenuItem id = "Close"
label = "${res:OpenFileTabEventHandler.ContextMenu.Close}"
@@ -373,6 +374,7 @@
class = "ICSharpCode.SharpDevelop.Commands.TabStrip.CopyPathName"/>
</Conditional>
</Extension>
+-->
<Extension path = "/SharpDevelop/Workbench/FileFilter">
<FileFilter id = "AllFiles"
Deleted: trunk/MonoDevelop/src/Main/Base/Commands/FileTabStripCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/FileTabStripCommands.cs 2004-03-06 03:35:12 UTC (rev 1120)
+++ trunk/MonoDevelop/src/Main/Base/Commands/FileTabStripCommands.cs 2004-03-06 04:46:01 UTC (rev 1121)
@@ -1,144 +0,0 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Threading;
-using System.Drawing;
-using System.Drawing.Printing;
-using System.Collections;
-using System.ComponentModel;
-using System.Diagnostics;
-
-using ICSharpCode.Core.AddIns;
-
-using ICSharpCode.Core.Properties;
-using ICSharpCode.Core.AddIns.Codons;
-using ICSharpCode.Core.Services;
-
-using ICSharpCode.SharpDevelop.Services;
-using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.SharpDevelop.Gui.Dialogs;
-using ICSharpCode.SharpDevelop.Gui.Components;
-
-namespace ICSharpCode.SharpDevelop.Commands.TabStrip
-{/*
- public class CloseFileTab : AbstractMenuCommand
- {
- public override void Run()
- {
- OpenFileTab tab = (OpenFileTab)Owner;
- if (tab != null && tab.TabPages != null && tab.SelectedIndex >= 0 && tab.SelectedIndex < tab.TabPages.Count) {
- OpenFileTab.MyTabPage selected = (OpenFileTab.MyTabPage)tab.TabPages[tab.SelectedIndex];
-
- IWorkbenchWindow window = tab.ClickedWindow;
-
- if (window != null) {
- window.CloseWindow(false);
- if (window != selected.Window) {
- selected.SelectPage();
- }
- }
- }
- }
- }
-
- public class SaveFileTab : AbstractMenuCommand
- {
- public override void Run()
- {
- OpenFileTab tab = (OpenFileTab)Owner;
- if (tab != null && tab.TabPages != null && tab.SelectedIndex >= 0 && tab.SelectedIndex < tab.TabPages.Count) {
- OpenFileTab.MyTabPage selected = (OpenFileTab.MyTabPage)tab.TabPages[tab.SelectedIndex];
-
- IWorkbenchWindow window = tab.ClickedWindow;
-
- if (window != null) {
- if (window.ViewContent.IsViewOnly) {
- return;
- }
- if (window.ViewContent.IsUntitled) {
- SaveFileAsTab.SaveFileAs(window);
- } else {
- IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
- projectService.MarkFileDirty(window.ViewContent.ContentName);
-
- FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- fileUtilityService.ObservedSave(new FileOperationDelegate(window.ViewContent.Save), window.ViewContent.ContentName);
- }
- }
- }
- }
- }
-
- public class SaveFileAsTab : AbstractMenuCommand
- {
- public static void SaveFileAs(IWorkbenchWindow window)
- {
- using (SaveFileDialog fdiag = new SaveFileDialog()) {
- fdiag.OverwritePrompt = true;
- fdiag.AddExtension = true;
-
- fdiag.Filter = String.Join("|", (string[])(AddInTreeSingleton.AddInTree.GetTreeNode("/SharpDevelop/Workbench/FileFilter").BuildChildItems(null)).ToArray(typeof(string)));
-
- string[] fileFilters = (string[])(AddInTreeSingleton.AddInTree.GetTreeNode("/SharpDevelop/Workbench/FileFilter").BuildChildItems(null)).ToArray(typeof(string));
- fdiag.Filter = String.Join("|", fileFilters);
- for (int i = 0; i < fileFilters.Length; ++i) {
- if (fileFilters[i].IndexOf(Path.GetExtension(window.ViewContent.ContentName == null ? window.ViewContent.UntitledName : window.ViewContent.ContentName)) >= 0) {
- fdiag.FilterIndex = i + 1;
- break;
- }
- }
-
- if (fdiag.ShowDialog() == DialogResult.OK) {
- string fileName = fdiag.FileName;
- // currently useless, because the fdiag.FileName can't
- // handle wildcard extensions :(
- if (Path.GetExtension(fileName).StartsWith("?") || Path.GetExtension(fileName) == "*") {
- fileName = Path.ChangeExtension(fileName, "");
- }
-
- window.ViewContent.Save(fileName);
- IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowMessage(fileName, "File saved");
- }
- }
- }
-
- public override void Run()
- {
- OpenFileTab tab = (OpenFileTab)Owner;
- if (tab != null && tab.TabPages != null && tab.SelectedIndex >= 0 && tab.SelectedIndex < tab.TabPages.Count) {
- OpenFileTab.MyTabPage selected = (OpenFileTab.MyTabPage)tab.TabPages[tab.SelectedIndex];
-
- IWorkbenchWindow window = tab.ClickedWindow;
-
- if (window != null) {
- if (window.ViewContent.IsViewOnly) {
- return;
- }
- SaveFileAs(window);
- }
- }
- }
- }
-
-
- public class CopyPathName : AbstractMenuCommand
- {
- public override void Run()
- {
- OpenFileTab tab = (OpenFileTab)Owner;
-
- IWorkbenchWindow window = tab.ClickedWindow;
-
- if (window != null && window.ViewContent.ContentName != null) {
- Clipboard.SetDataObject(new DataObject(DataFormats.Text, window.ViewContent.ContentName));
- }
- }
- }*/
-}
Deleted: trunk/MonoDevelop/src/Main/Base/Gui/Components/OpenFileTab.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Components/OpenFileTab.cs 2004-03-06 03:35:12 UTC (rev 1120)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Components/OpenFileTab.cs 2004-03-06 04:46:01 UTC (rev 1121)
@@ -1,197 +0,0 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Drawing;
-using System.Diagnostics;
-using System.CodeDom.Compiler;
-
-//using Crownwood.Magic.Controls;
-
-using ICSharpCode.Core.AddIns;
-using ICSharpCode.Core.Services;
-//using Reflector.UserInterface;
-using ICSharpCode.SharpDevelop.Services;
-
-namespace ICSharpCode.SharpDevelop.Gui.Components
-{
- public class OpenFileTab //: IOwnerState //Crownwood.Magic.Controls.TabControl, IOwnerState
- {/*
- readonly static string contextMenuPath = "/SharpDevelop/Workbench/OpenFileTab/ContextMenu";
-
- [Flags]
- public enum OpenFileTabState {
- Nothing = 0,
- FileDirty = 1,
- ClickedWindowIsForm = 2,
- FileUntitled = 4
- }
-
- OpenFileTabState internalState = OpenFileTabState.Nothing;
-
- public System.Enum InternalState {
- get {
- return internalState;
- }
- }
-
- int clickedTabIndex = -1;
-
- public IWorkbenchWindow ClickedWindow {
- get {
- if (clickedTabIndex == -1) {
- return null;
- }
- return ((MyTabPage)TabPages[clickedTabIndex]).Window;
- }
- }
-
- public int ClickedTabIndex {
- get {
- return clickedTabIndex;
- }
- set {
- clickedTabIndex = value;
- }
- }
-
- public OpenFileTab()
- {/*
- Appearance = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiDocument;
- ShowArrows = true;
- ShowClose = true;
-
- ClosePressed += new EventHandler(MyClosePressed);
- SelectionChanged += new EventHandler(MySelectionChanged);
- PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
- Style = (Crownwood.Magic.Common.VisualStyle)propertyService.GetProperty("ICSharpCode.SharpDevelop.Gui.TabVisualStyle", Crownwood.Magic.Common.VisualStyle.IDE);
-
- }
-
- public class MyTabPage //: Crownwood.Magic.Controls.TabPage
- {
- IWorkbenchWindow window;
- OpenFileTab tab;
-
- public IWorkbenchWindow Window {
- get {
- return window;
- }
- }
-
- public MyTabPage(OpenFileTab tab, IWorkbenchWindow window)
- {
- this.tab = tab;
- this.window = window;
-
- window.TitleChanged += new EventHandler(TitleChanged);
- window.CloseEvent += new EventHandler(CloseEvent);
- window.WindowSelected += new EventHandler(SelectEvent);
- TitleChanged(null, null);
- }
-
- public void SelectPage()
- {
- for (int i = 0; i < tab.TabPages.Count; ++i) {
- if (tab.TabPages[i] == this) {
- tab.SelectedIndex = i;
- break;
- }
- }
- }
-
- void CloseEvent(object sender, EventArgs e)
- {
- if (tab.TabPages.Contains(this)) {
- tab.TabPages.Remove(this);
- }
- }
-
- void SelectEvent(object sender, EventArgs e)
- {
- SelectPage();
- }
-
- void TitleChanged(object sender, EventArgs e)
- {
- Title = Path.GetFileName(window.Title);
- }
- }
-
- protected override void OnMouseUp(MouseEventArgs e)
- {
- if (e.Button == MouseButtons.Right) {
- MenuService menuService = (MenuService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(MenuService));
- menuService.ShowContextMenu(this, contextMenuPath, this, e.X, e.Y);
- } else {
- base.OnMouseUp(e);
- }
- }
-
- protected override void OnMouseDown(MouseEventArgs e)
- {
-// if (e.Button == MouseButtons.Left) {
- base.OnMouseDown(e);
-// }
- clickedTabIndex = -1;
-
- for(int i=0; i<_tabPages.Count; i++) {
- Rectangle rect = (Rectangle)_tabRects[i];
- if (rect.Contains(e.X, e.Y)) {
- clickedTabIndex = i;
- break;
- }
- }
- Console.WriteLine("CLICKED TAB INDEX : " + clickedTabIndex);
-
- internalState = OpenFileTabState.Nothing;
- if (clickedTabIndex != -1) {
- if (ClickedWindow.ViewContent.ContentName == null) {
- internalState |= OpenFileTabState.FileUntitled;
- }
- if (ClickedWindow.ViewContent.IsDirty) {
- internalState |= OpenFileTabState.FileDirty;
- }
- if (ClickedWindow is Form) {
- internalState |= OpenFileTabState.ClickedWindowIsForm;
- }
-// KSL Start, Fix for loosing focus when clicking the tab control to select another tab
- ((MyTabPage)TabPages[SelectedIndex]).Window.SelectWindow();
-// KSL End
- }
- }
-
- void MyClosePressed(object sender, EventArgs e)
- {
- if (SelectedIndex >= 0 && SelectedIndex < TabPages.Count) {
- MyTabPage page = (MyTabPage)TabPages[SelectedIndex];
- page.Window.CloseWindow(false);
- }
- }
- void MySelectionChanged(object sender, EventArgs e)
- {
- if (SelectedIndex >= 0 && SelectedIndex < TabPages.Count && TabPages[SelectedIndex] != null) {
- ((MyTabPage)TabPages[SelectedIndex]).Window.SelectWindow();
- }
- }
-
- /*public Crownwood.Magic.Controls.TabPage AddWindow(IWorkbenchWindow window)
- {
- Crownwood.Magic.Controls.TabPage tabPage = new MyTabPage(this, window);
- tabPage.Selected = true;
- tabPage.Tag = window;
- try {
- TabPages.Add(tabPage);
- } catch (Exception e) {
- IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e, "Error while adding tab page");
- }
- return tabPage;
- }*/
- }
-}
Modified: trunk/MonoDevelop/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-03-06 03:35:12 UTC (rev 1120)
+++ trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-03-06 04:46:01 UTC (rev 1121)
@@ -28,7 +28,6 @@
./Gui/AbstractViewContent.cs \
./Gui/Components/SdMenuSeparator.cs \
./Gui/Components/SharpMessageBox.cs \
-./Gui/Components/OpenFileTab.cs \
./Gui/Components/StatusBar/AxStatusBar.cs \
./Gui/Components/StatusBar/SdStatusBar.cs \
./Gui/Components/StatusBar/AxStatusBarPanel.cs \
@@ -141,7 +140,6 @@
./Gui/Workbench/Layouts/SdiWorkspaceLayout.cs \
./Gui/Workbench/WorkbenchMemento.cs \
./Gui/Workbench/DefaultWorkbench.cs \
-./Commands/FileTabStripCommands.cs \
./Commands/ClassBrowserCommands/ClassBrowserCommands.cs \
./Commands/FileCommands.cs \
./Commands/HelpCommands.cs \
More information about the Monodevelop-patches-list
mailing list