[Monodevelop-patches-list] r991 - in trunk/MonoDevelop/src/Main: Base/Commands Base/Gui/Dialogs StartUp
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Feb 22 20:28:00 EST 2004
Author: jluke
Date: 2004-02-22 20:27:59 -0500 (Sun, 22 Feb 2004)
New Revision: 991
Modified:
trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SplashScreen.cs
trunk/MonoDevelop/src/Main/StartUp/SharpDevelopMain.cs
Log:
handle passing in of some files from the shell
Modified: trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs 2004-02-23 01:21:58 UTC (rev 990)
+++ trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs 2004-02-23 01:27:59 UTC (rev 991)
@@ -182,9 +182,6 @@
}
}
-#if GTK
- // FIXME: GTKize
-#else
foreach (string file in SplashScreenForm.GetRequestedFileList()) {
switch (System.IO.Path.GetExtension(file).ToUpper()) {
case ".CMBX":
@@ -207,7 +204,6 @@
break;
}
}
-#endif
((Gtk.Window)WorkbenchSingleton.Workbench).ShowAll ();
WorkbenchSingleton.Workbench.RedrawAllComponents ();
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SplashScreen.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SplashScreen.cs 2004-02-23 01:21:58 UTC (rev 990)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SplashScreen.cs 2004-02-23 01:27:59 UTC (rev 991)
@@ -1,4 +1,5 @@
using System;
+using System.IO;
using System.Collections;
using System.Reflection;
using Gtk;
@@ -52,18 +53,28 @@
foreach (string arg in args)
{
- if (arg[0] == '-' || arg[0] == '/') {
+ string a = arg;
+ // this does not yet work with relative paths
+ if (a[0] == '~')
+ {
+ a = System.IO.Path.Combine (Environment.GetEnvironmentVariable ("HOME"), a.Substring (1));
+ }
+
+ if (File.Exists (a))
+ {
+ requestedFileList.Add (a);
+ return;
+ }
+
+ if (a[0] == '-' || a[0] == '/') {
int markerLength = 1;
- if (arg.Length >= 2 && arg[0] == '-' && arg[1] == '-') {
+ if (a.Length >= 2 && a[0] == '-' && a[1] == '-') {
markerLength = 2;
}
- parameterList.Add(arg.Substring(markerLength));
+ parameterList.Add(a.Substring (markerLength));
}
- else {
- requestedFileList.Add(arg);
- }
}
}
}
Modified: trunk/MonoDevelop/src/Main/StartUp/SharpDevelopMain.cs
===================================================================
--- trunk/MonoDevelop/src/Main/StartUp/SharpDevelopMain.cs 2004-02-23 01:21:58 UTC (rev 990)
+++ trunk/MonoDevelop/src/Main/StartUp/SharpDevelopMain.cs 2004-02-23 01:27:59 UTC (rev 991)
@@ -7,15 +7,9 @@
using System;
using System.IO;
-using System.Diagnostics;
-using System.Reflection;
-using System.Drawing;
using System.Collections;
-using System.Resources;
using System.Xml;
using System.Threading;
-using System.Runtime.Remoting;
-using System.Security.Policy;
using ICSharpCode.Core.Properties;
using ICSharpCode.Core.AddIns.Codons;
More information about the Monodevelop-patches-list
mailing list