mail-archives/monodevelop-patches-list/2004-March/000726.html

484 строки
18 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Monodevelop-patches-list] r1121 - in trunk/MonoDevelop: . build/AddIns src/Main/Base src/Main/Base/Commands src/Main/Base/Gui/Components
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1121%20-%20in%20trunk/MonoDevelop%3A%20.%20build/AddIns%20src/Main/Base%20src/Main/Base/Commands%20src/Main/Base/Gui/Components&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="000725.html">
<LINK REL="Next" HREF="000727.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Monodevelop-patches-list] r1121 - in trunk/MonoDevelop: . build/AddIns src/Main/Base src/Main/Base/Commands src/Main/Base/Gui/Components</H1>
<B>commit-watcher at mono-cvs.ximian.com</B>
<A HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1121%20-%20in%20trunk/MonoDevelop%3A%20.%20build/AddIns%20src/Main/Base%20src/Main/Base/Commands%20src/Main/Base/Gui/Components&In-Reply-To="
TITLE="[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
</A><BR>
<I>Fri Mar 5 23:46:01 EST 2004</I>
<P><UL>
<LI>Previous message: <A HREF="000725.html">[Monodevelop-patches-list] r1120 - trunk/MonoDevelop/data/resources/glade
</A></li>
<LI>Next message: <A HREF="000727.html">[Monodevelop-patches-list] r1122 - trunk/MonoDevelop/src/Main/Base/Gui/Dialogs
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#726">[ date ]</a>
<a href="thread.html#726">[ thread ]</a>
<a href="subject.html#726">[ subject ]</a>
<a href="author.html#726">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">jba-mono at optusnet.com.au</A>&gt;
+ * 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 &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">jba-mono at optusnet.com.au</A>&gt;
+
* 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 &quot;Not Found&quot; 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 @@
&lt;/Extension&gt;
+&lt;!-- not using these, since the OpenFileTab has been removed (replaced with TabLabel) jba 5 march 2004
&lt;Extension path = &quot;/SharpDevelop/Workbench/OpenFileTab/ContextMenu&quot;&gt;
&lt;MenuItem id = &quot;Close&quot;
label = &quot;${res:OpenFileTabEventHandler.ContextMenu.Close}&quot;
@@ -373,6 +374,7 @@
class = &quot;ICSharpCode.SharpDevelop.Commands.TabStrip.CopyPathName&quot;/&gt;
&lt;/Conditional&gt;
&lt;/Extension&gt;
+--&gt;
&lt;Extension path = &quot;/SharpDevelop/Workbench/FileFilter&quot;&gt;
&lt;FileFilter id = &quot;AllFiles&quot;
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 @@
-// &lt;file&gt;
-// &lt;copyright see=&quot;<A HREF="prj:///doc/copyright.txt&quot;/">prj:///doc/copyright.txt&quot;/</A>&gt;
-// &lt;license see=&quot;<A HREF="prj:///doc/license.txt&quot;/">prj:///doc/license.txt&quot;/</A>&gt;
-// &lt;owner name=&quot;Mike Kr&#195;&#188;ger&quot; email=&quot;<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">mike at icsharpcode.net</A>&quot;/&gt;
-// &lt;version value=&quot;$version&quot;/&gt;
-// &lt;/file&gt;
-
-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 &amp;&amp; tab.TabPages != null &amp;&amp; tab.SelectedIndex &gt;= 0 &amp;&amp; tab.SelectedIndex &lt; 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 &amp;&amp; tab.TabPages != null &amp;&amp; tab.SelectedIndex &gt;= 0 &amp;&amp; tab.SelectedIndex &lt; 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(&quot;|&quot;, (string[])(AddInTreeSingleton.AddInTree.GetTreeNode(&quot;/SharpDevelop/Workbench/FileFilter&quot;).BuildChildItems(null)).ToArray(typeof(string)));
-
- string[] fileFilters = (string[])(AddInTreeSingleton.AddInTree.GetTreeNode(&quot;/SharpDevelop/Workbench/FileFilter&quot;).BuildChildItems(null)).ToArray(typeof(string));
- fdiag.Filter = String.Join(&quot;|&quot;, fileFilters);
- for (int i = 0; i &lt; fileFilters.Length; ++i) {
- if (fileFilters[i].IndexOf(Path.GetExtension(window.ViewContent.ContentName == null ? window.ViewContent.UntitledName : window.ViewContent.ContentName)) &gt;= 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(&quot;?&quot;) || Path.GetExtension(fileName) == &quot;*&quot;) {
- fileName = Path.ChangeExtension(fileName, &quot;&quot;);
- }
-
- window.ViewContent.Save(fileName);
- IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowMessage(fileName, &quot;File saved&quot;);
- }
- }
- }
-
- public override void Run()
- {
- OpenFileTab tab = (OpenFileTab)Owner;
- if (tab != null &amp;&amp; tab.TabPages != null &amp;&amp; tab.SelectedIndex &gt;= 0 &amp;&amp; tab.SelectedIndex &lt; 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 &amp;&amp; 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 @@
-// &lt;file&gt;
-// &lt;copyright see=&quot;<A HREF="prj:///doc/copyright.txt&quot;/">prj:///doc/copyright.txt&quot;/</A>&gt;
-// &lt;license see=&quot;<A HREF="prj:///doc/license.txt&quot;/">prj:///doc/license.txt&quot;/</A>&gt;
-// &lt;owner name=&quot;Mike Kr&#252;ger&quot; email=&quot;<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">mike at icsharpcode.net</A>&quot;/&gt;
-// &lt;version value=&quot;$version&quot;/&gt;
-// &lt;/file&gt;
-
-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 = &quot;/SharpDevelop/Workbench/OpenFileTab/ContextMenu&quot;;
-
- [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(&quot;ICSharpCode.SharpDevelop.Gui.TabVisualStyle&quot;, 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 &lt; 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&lt;_tabPages.Count; i++) {
- Rectangle rect = (Rectangle)_tabRects[i];
- if (rect.Contains(e.X, e.Y)) {
- clickedTabIndex = i;
- break;
- }
- }
- Console.WriteLine(&quot;CLICKED TAB INDEX : &quot; + 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 &gt;= 0 &amp;&amp; SelectedIndex &lt; TabPages.Count) {
- MyTabPage page = (MyTabPage)TabPages[SelectedIndex];
- page.Window.CloseWindow(false);
- }
- }
- void MySelectionChanged(object sender, EventArgs e)
- {
- if (SelectedIndex &gt;= 0 &amp;&amp; SelectedIndex &lt; TabPages.Count &amp;&amp; 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, &quot;Error while adding tab page&quot;);
- }
- 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 \
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="000725.html">[Monodevelop-patches-list] r1120 - trunk/MonoDevelop/data/resources/glade
</A></li>
<LI>Next message: <A HREF="000727.html">[Monodevelop-patches-list] r1122 - trunk/MonoDevelop/src/Main/Base/Gui/Dialogs
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#726">[ date ]</a>
<a href="thread.html#726">[ thread ]</a>
<a href="subject.html#726">[ subject ]</a>
<a href="author.html#726">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">More information about the Monodevelop-patches-list
mailing list</a><br>
</body></html>