Author: zachlute
Date: 2008-01-22 22:49:34 -0500 (Tue, 22 Jan 2008)
New Revision: 93617
Modified:
trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/IdeStartup.cs
Log:
* MonoDevelop.Ide.Gui/IdeStartup.cs: Added --newwindow option to force
MD to open a new instance instead of passing to a running one.
This option is forced if opening a combine from the commandline.
(Bug #350361)
Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog 2008-01-23
01:33:40 UTC (rev 93616)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog 2008-01-23
03:49:34 UTC (rev 93617)
@@ -1,3 +1,9 @@
+2008-01-22 Zach Lute <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Ide.Gui/IdeStartup.cs: Added --newwindow option to force
MD to
+ open a new instance instead of passing to a running one. This option
is
+ forced if opening a combine from the commandline. (Bug #350361)
+
2008-01-22 Michael Hutchinson <[EMAIL PROTECTED]>
* MonoDevelop.Ide.addin.xml: Use GTK fullscreen icon (was added in 2.8).
Modified:
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/IdeStartup.cs
===================================================================
---
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/IdeStartup.cs
2008-01-23 01:33:40 UTC (rev 93616)
+++
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/IdeStartup.cs
2008-01-23 03:49:34 UTC (rev 93617)
@@ -75,16 +75,29 @@
AddinManager.AddinLoadError += OnAddinError;
+ StartupInfo.SetCommandLineArgs (remainingArgs);
+
+ // If a combine was specified, force --newwindow.
+ if(!options.newwindow) {
+ foreach (string file in
StartupInfo.GetRequestedFileList ()) {
+ if
(MonoDevelop.Projects.Services.ProjectService.IsCombineEntryFile (file))
+ {
+ options.newwindow = true;
+ break;
+ }
+ }
+ }
+
if(!options.ipc_tcp){
socket_filename = "/tmp/md-" +
Environment.GetEnvironmentVariable ("USER") + "-socket";
listen_socket = new Socket (AddressFamily.Unix,
SocketType.Stream, ProtocolType.IP);
ep = new UnixEndPoint (socket_filename);
- // Connect to existing monodevelop and pass
filename(s) and exit
- if (remainingArgs.Length > 0 && File.Exists
(socket_filename)) {
+ // If not opening a combine, connect to
existing monodevelop and pass filename(s) and exit
+ if (!options.newwindow &&
StartupInfo.GetRequestedFileList ().Length > 0 && File.Exists
(socket_filename)) {
try {
listen_socket.Connect (ep);
- listen_socket.Send
(Encoding.UTF8.GetBytes (String.Join ("\n", remainingArgs)));
+ listen_socket.Send
(Encoding.UTF8.GetBytes (String.Join ("\n", StartupInfo.GetRequestedFileList
())));
return 0;
} catch {
// Reset the socket
@@ -120,9 +133,7 @@
return 1;
}
}
-
- StartupInfo.SetCommandLineArgs (remainingArgs);
-
+
IProgressMonitor monitor =
SplashScreenForm.SplashScreen;
if (!options.nologo) {
@@ -377,6 +388,9 @@
[Option ("Use the Tcp channel for inter-process comunication.",
"ipc-tcp")]
public bool ipc_tcp;
+
+ [Option ("Do not open in an existing instance of MonoDevelop")]
+ public bool newwindow;
}
public class AddinError
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches