~bratsche/ubuntu/maverick/monodevelop/disable-appmenu

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/IdeStartup.cs

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-03-29 23:36:33 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080329233633-wq5p1rktg8ek3vxc
Tags: 1.0+dfsg-1ubuntu1
* Merge from Debian unstable. (LP: #209012) Remaining Ubuntu changes:
+ debian/control: 
  - Build-dep on xulrunner-1.9-dev instead of firefox-dev
  - Depend on xulrunner-1.9 instead of firefox
+ don't do any MOZILLA_HOME/MOZILLA_FIVE_HOME business which isn't needed
  for xulrunner-1.9 using the standalone glue anymore (gecko gil uses
  standalone by default)
  - add debian/patches/use_xulrunner_1.9.dpatch
  - update debian/patches/00list
* Remove build-dep on libxul-dev and the dep on libxul0d
  since we are using xulrunner1.9 instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
                        
76
76
                        AddinManager.AddinLoadError += OnAddinError;
77
77
                        
 
78
                        StartupInfo.SetCommandLineArgs (remainingArgs);
 
79
                        
 
80
                        // If a combine was specified, force --newwindow.
 
81
                        if(!options.newwindow) {
 
82
                                foreach (string file in StartupInfo.GetRequestedFileList ()) {
 
83
                                        if (MonoDevelop.Projects.Services.ProjectService.IsCombineEntryFile (file))
 
84
                                        {
 
85
                                                options.newwindow = true;
 
86
                                                break;
 
87
                                        }
 
88
                                }
 
89
                        }
 
90
                        
78
91
                        if(!options.ipc_tcp){
79
92
                                socket_filename = "/tmp/md-" + Environment.GetEnvironmentVariable ("USER") + "-socket";
80
93
                                listen_socket = new Socket (AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
81
94
                                ep = new UnixEndPoint (socket_filename);
82
95
                                
83
 
                                // Connect to existing monodevelop and pass filename(s) and exit
84
 
                                if (remainingArgs.Length > 0 && File.Exists (socket_filename)) {
 
96
                                // If not opening a combine, connect to existing monodevelop and pass filename(s) and exit
 
97
                                if (!options.newwindow && StartupInfo.GetRequestedFileList ().Length > 0 && File.Exists (socket_filename)) {
85
98
                                        try {
86
99
                                                listen_socket.Connect (ep);
87
 
                                                listen_socket.Send (Encoding.UTF8.GetBytes (String.Join ("\n", remainingArgs)));
 
100
                                                listen_socket.Send (Encoding.UTF8.GetBytes (String.Join ("\n", StartupInfo.GetRequestedFileList ())));
88
101
                                                return 0;
89
102
                                        } catch {
90
103
                                                // Reset the socket
99
112
                                version += "." + Assembly.GetEntryAssembly ().GetName ().Version.Build;
100
113
                        if (Assembly.GetEntryAssembly ().GetName ().Version.Revision != 0)
101
114
                                version += "." + Assembly.GetEntryAssembly ().GetName ().Version.Revision;
102
 
 
103
 
                        try {
104
 
                                // When we loose Gnome.Program what should we do here?
105
 
                        } catch (Exception ex) {
106
 
                                string msg = GettextCatalog.GetString ("MonoDevelop failed to start.\nIf you installed MonoDevelop using a binary installer, take a look at \nhttp://www.mono-project.com/InstallerInstructions for more info about possible\ncauses of this error.");
107
 
                                Console.WriteLine (new string ('#',70));
108
 
                                Console.WriteLine (msg);
109
 
                                Console.WriteLine (new string ('#',70));
110
 
                                Console.WriteLine (ex);
111
 
                                return 1;
112
 
                        }
113
115
                        
114
116
                        // System checks
115
117
                        if (!CheckBug77135 ())
131
133
                                        return 1;
132
134
                                }
133
135
                        }
134
 
                
135
 
                        StartupInfo.SetCommandLineArgs (remainingArgs);
136
 
                        
 
136
 
137
137
                        IProgressMonitor monitor = SplashScreenForm.SplashScreen;
138
138
                        
139
139
                        if (!options.nologo) {
388
388
                
389
389
                [Option ("Use the Tcp channel for inter-process comunication.", "ipc-tcp")]
390
390
                public bool ipc_tcp;
 
391
                
 
392
                [Option ("Do not open in an existing instance of MonoDevelop")]
 
393
                public bool newwindow;
391
394
        }       
392
395
        
393
396
        public class AddinError