[Monodevelop-patches-list] r2655 - in trunk/MonoDevelop/Core/src: AddIns/BackendBindings/CSharpBinding AddIns/BackendBindings/CSharpBinding/templates MonoDevelop.Base MonoDevelop.Base/Gui/Pads MonoDevelop.Base/Gui/Pads/ProjectPad MonoDevelop.Base/Gui/Pads/SolutionPad MonoDevelop.Base/Services MonoDevelop.Base/Services/File
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Fri Jul 15 20:09:44 EDT 2005
Author: jluke
Date: 2005-07-15 20:09:44 -0400 (Fri, 15 Jul 2005)
New Revision: 2655
Modified:
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/templates/GladeSharp2Project.xpt.xml
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentOpen.cs
Log:
commit patch from Ben Motmans <ben.motmans at gmail.com>
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2005-07-16 00:09:44 UTC (rev 2655)
@@ -1,3 +1,8 @@
+2005-07-14 Ben Motmans <ben.motmans at gmail.com>
+
+ * templates/GladeSharp2Project.xpt.xml:
+ removed duplicate reference to glade-sharp-2.0
+
2005-07-11 Lluis Sanchez Gual <lluis at novell.com>
* Project/CSharpCompilerParameters.cs: Implement ICloneable.
Modified: trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/templates/GladeSharp2Project.xpt.xml
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/templates/GladeSharp2Project.xpt.xml 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/AddIns/BackendBindings/CSharpBinding/templates/GladeSharp2Project.xpt.xml 2005-07-16 00:09:44 UTC (rev 2655)
@@ -32,7 +32,6 @@
<Reference type="Gac" refto="glib-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference type="Gac" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference type="Gac" refto="pango-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference type="Gac" refto="glade-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
</References>
<Resources>
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-16 00:09:44 UTC (rev 2655)
@@ -1,3 +1,19 @@
+2005-07-14 Ben Motmans <ben.motmans at gmail.com>
+
+ * Gui/Pads/ProjectPad/FolderNodeBuilder.cs:
+ #73772, 'remember action' in add files dialog
+
+ * Gui/Pads/OpenTaskView.cs:
+ show warnings after errors + sortable column based on task type
+
+ * Services/File/RecentOpen.cs: emit correct event
+
+ * Gui/Pads/SolutionPad/TreeViewPad.cs:
+ make sure the parent node of the currently edited node is expanded
+
+ * Services/DefaultLoggingService.cs: make sure log4net is always
+ configured, even if the .config file doesn't exist
+
2005-07-13 Lluis Sanchez Gual <lluis at novell.com>
* Gui/Workbench/Layouts/SdiWorkspaceLayout.cs:
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs 2005-07-16 00:09:44 UTC (rev 2655)
@@ -74,11 +74,17 @@
typeof (bool), // read?
typeof (bool), // marked?
typeof (int)); // read? -- use Pango weight
-
+
+ TreeIterCompareFunc sortFunc = new TreeIterCompareFunc (TaskSortFunc);
+ store.SetSortFunc (COL_TASK, sortFunc);
+ store.DefaultSortFunc = sortFunc;
+ store.SetSortColumnId (COL_TASK, SortType.Ascending);
+
view = new Gtk.TreeView (store);
view.RulesHint = true;
view.PopupMenu += new PopupMenuHandler (OnPopupMenu);
view.ButtonPressEvent += new ButtonPressEventHandler (OnButtonPressed);
+ view.HeadersClickable = true;
AddColumns ();
sw = new Gtk.ScrolledWindow ();
@@ -150,7 +156,10 @@
file = new Gtk.CellRendererText ();
TreeViewColumn col;
- view.AppendColumn ("!" , iconRender , "pixbuf", COL_TYPE);
+ col = view.AppendColumn ("!" , iconRender , "pixbuf", COL_TYPE);
+ col.Clickable = true;
+ col.Clicked += new EventHandler (OnResortTasks);
+ col.SortIndicator = true;
view.AppendColumn ("" , toggleRender , "active" , COL_MARKED, "activatable", COL_READ);
view.AppendColumn (GettextCatalog.GetString ("Line") , line , "text" , COL_LINE, "weight", COL_READ_WEIGHT);
col = view.AppendColumn (GettextCatalog.GetString ("Description") , desc , "text" , COL_DESC, "weight", COL_READ_WEIGHT, "strikethrough", COL_MARKED);
@@ -289,5 +298,41 @@
}
}
+ private SortType ReverseSortOrder (TreeViewColumn col) {
+ if (col.SortIndicator) {
+ if (col.SortOrder == SortType.Ascending)
+ return SortType.Descending;
+ else
+ return SortType.Ascending;
+ } else {
+ return SortType.Ascending;
+ }
+ }
+
+ private void OnResortTasks (object sender, EventArgs args)
+ {
+ TreeViewColumn col = sender as TreeViewColumn;
+ col.SortOrder = ReverseSortOrder (col);
+ col.SortIndicator = true;
+ store.SetSortColumnId (COL_TASK, col.SortOrder);
+ }
+
+ private int TaskSortFunc (TreeModel model, TreeIter iter1, TreeIter iter2)
+ {
+ Task task1 = model.GetValue (iter1, COL_TASK) as Task;
+ Task task2 = model.GetValue (iter2, COL_TASK) as Task;
+
+ if (task1 == null && task2 == null) return 0;
+ else if (task1 == null) return -1;
+ else if (task2 == null) return 1;
+
+ int compare = ((int)task1.TaskType).CompareTo ((int)task2.TaskType);
+ if (compare == 0)
+ compare = task1.FileName.CompareTo (task2.FileName);
+ if (compare == 0)
+ compare = task1.Line.CompareTo (task2.Line);
+ return compare;
+ }
+
}
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs 2005-07-16 00:09:44 UTC (rev 2655)
@@ -191,24 +191,36 @@
if (result != (int) ResponseType.Ok)
return;
+ int action = -1;
foreach (string file in fdiag.Filenames) {
if (file.StartsWith (project.BaseDirectory)) {
MoveCopyFile (project, CurrentNode, file, true, true);
} else {
using (MessageDialog md = new MessageDialog (
- (Window) WorkbenchSingleton.Workbench,
- DialogFlags.Modal | DialogFlags.DestroyWithParent,
- MessageType.Question, ButtonsType.None,
- String.Format (GettextCatalog.GetString ("{0} is outside the project directory, what should I do?"), file))) {
+ (Window) WorkbenchSingleton.Workbench,
+ DialogFlags.Modal | DialogFlags.DestroyWithParent,
+ MessageType.Question, ButtonsType.None,
+ String.Format (GettextCatalog.GetString ("{0} is outside the project directory, what should I do?"), file)))
+ {
+ CheckButton remember = null;
+ if (fdiag.Filenames.Length > 1) {
+ remember = new CheckButton (GettextCatalog.GetString ("Use the same action for all selected files."));
+ md.VBox.PackStart (remember, false, false, 0);
+ }
md.AddButton (Gtk.Stock.Copy, 1);
md.AddButton (GettextCatalog.GetString ("_Move"), 2);
md.AddButton (Gtk.Stock.Cancel, ResponseType.Cancel);
+ md.VBox.ShowAll ();
- int ret = md.Run ();
- md.Hide ();
-
- if (ret < 0)
- return;
+ int ret = -1;
+ if (action < 0) {
+ ret = md.Run ();
+ md.Hide ();
+ if (ret < 0) return;
+ if (remember != null && remember.Active) action = ret;
+ } else {
+ ret = action;
+ }
try {
MoveCopyFile (project, CurrentNode, file, ret == 2, false);
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/SolutionPad/TreeViewPad.cs 2005-07-16 00:09:44 UTC (rev 2655)
@@ -583,6 +583,7 @@
return;
workNode.MoveToIter (iter);
+ workNode.ExpandToNode (); //make sure the parent of the node that is being edited is expanded
store.SetValue (iter, TreeViewPad.TextColumn, workNode.NodeName);
text_render.Editable = true;
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs 2005-07-16 00:09:44 UTC (rev 2655)
@@ -17,7 +17,9 @@
public DefaultLoggingService()
{
if (File.Exists (Assembly.GetEntryAssembly().Location + ".config"))
- XmlConfigurator.Configure();
+ XmlConfigurator.Configure ();
+ else
+ BasicConfigurator.Configure ();
}
public override void InitializeService()
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentOpen.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentOpen.cs 2005-07-15 21:59:43 UTC (rev 2654)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentOpen.cs 2005-07-16 00:09:44 UTC (rev 2655)
@@ -137,7 +137,7 @@
void UpdateLastProject ()
{
lastproject = recentFiles.GetItemsInGroup ("MonoDevelop Projects");
- OnRecentFileChange();
+ OnRecentProjectChange();
}
}
}
More information about the Monodevelop-patches-list
mailing list