[Monodevelop-patches-list] r1781 - in trunk/MonoDevelop/src: Libraries/MonoDevelop.Gui.Widgets Libraries/MonoDevelop.Gui.Widgets/DragNotebook Main/Base Main/Base/Gui/Workbench/Layouts
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Jun 18 20:30:47 EDT 2004
Author: tberman
Date: 2004-06-18 20:30:46 -0400 (Fri, 18 Jun 2004)
New Revision: 1781
Modified:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
Log:
temp workaround fix for the bug, will do the proper fix (data reuse is fun) later (either tonight or sunday)
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog 2004-06-18 21:01:13 UTC (rev 1780)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog 2004-06-19 00:30:46 UTC (rev 1781)
@@ -1,5 +1,10 @@
2004-06-18 Todd Berman <tberman at sevenl.net>
+ * DragNotebook/DragNotebook.cs: dont emit the event if either the old
+ placement or the new is -1, as it isnt a real reorder.
+
+2004-06-18 Todd Berman <tberman at sevenl.net>
+
* DragNotebook/DragNotebook.cs: add an event that gets fired when
a tab is reordered.
* TabLabel/TabLabel.cs: try to make this widget unfocusable (untested)
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs 2004-06-18 21:01:13 UTC (rev 1780)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/DragNotebook/DragNotebook.cs 2004-06-19 00:30:46 UTC (rev 1781)
@@ -114,7 +114,7 @@
curpage = this.GetNthPage (curpagenum);
tab = this.GetTabLabel (curpage);
this.ReorderChild (CurrentPageWidget, destpagenum);
- if (OnTabsReordered != null)
+ if (OnTabsReordered != null && destpagenum != -1 && curpagenum != -1)
OnTabsReordered (CurrentPageWidget, curpagenum, destpagenum);
}
}
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-18 21:01:13 UTC (rev 1780)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-19 00:30:46 UTC (rev 1781)
@@ -1,5 +1,10 @@
2004-06-18 Todd Berman <tberman at off.net>
+ * Gui/Workbench/Layouts/SdiWorkspaceLayout.cs: cleanups, and a small
+ icon related fixup.
+
+2004-06-18 Todd Berman <tberman at off.net>
+
* Commands/MenuItemBuilders.cs: clean up accel path code.
* Gui/Workbench/Layouts/SdiWorkspaceLayout.cs: reduce code complexity
by removing the extra ArrayList. Also properly use the tab reordering
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs 2004-06-18 21:01:13 UTC (rev 1780)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs 2004-06-19 00:30:46 UTC (rev 1781)
@@ -401,7 +401,7 @@
public IWorkbenchWindow ShowView(IViewContent content)
{
string title = "";
- Gtk.Image mimeimage;
+ Gtk.Image mimeimage = null;
if (content.IsUntitled) {
title = content.UntitledName;
mimeimage = new Gtk.Image (FileIconLoader.GetPixbufForType ("gnome-fs-regular").ScaleSimple (16, 16, Gdk.InterpType.Bilinear));
@@ -410,13 +410,12 @@
mimeimage = new Gtk.Image (FileIconLoader.GetPixbufForFile (content.ContentName, 16, 16));
}
- TabLabel tabLabel = new TabLabel (new Label (), new Gtk.Image (""));
+ TabLabel tabLabel = new TabLabel (new Label (), mimeimage != null ? mimeimage : new Gtk.Image (""));
tabLabel.Button.Clicked += new EventHandler (closeClicked);
tabLabel.Button.StateChanged += new StateChangedHandler (stateChanged);
SdiWorkspaceWindow sdiWorkspaceWindow = new SdiWorkspaceWindow(content, tabControl, tabLabel);
sdiWorkspaceWindow.CloseEvent += new EventHandler(CloseWindowEvent);
- //sdiWorkspaceWindow.SwitchView(tabControl.Children.Length - 1);
tabControl.AppendPage (sdiWorkspaceWindow, tabLabel);
if (tabControl.NPages > 1)
More information about the Monodevelop-patches-list
mailing list