Unity3D-Wine-Support / Unity3D-on-Wine

Scripts for making Unity3D run on Wine.
GNU General Public License v2.0
102 stars 59 forks source link

Native MonoDevelop opening always in new window #41

Closed Radivarig closed 9 years ago

Radivarig commented 9 years ago

With script from #38 MD always opens in new window. That is because whenever a .sln file is passed, MD will force new window... I've found that in source

// If a combine was specified, force --newwindow.
if(!options.NewWindow && startupInfo.HasFiles) {
    Counters.Initialization.Trace ("Pre-Initializing Runtime to load files in existing window");
    Runtime.Initialize (true);
    foreach (var file in startupInfo.RequestedFileList) {
        if (MonoDevelop.Projects.Services.ProjectService.IsWorkspaceItemFile (file.FileName)) {
            options.NewWindow = true;
            break;
        }
    }
}

The solution is to not send .sln file when it is already opened. I'll do the following:

if MD is opened && name of last .sln sent is same as current: ----don't send it, send only filename else send it, along with filename save new .sln name to file

Radivarig commented 9 years ago

Done. https://github.com/Radivarig/Unity3D-on-Wine/blob/master/text-editors-MonoDevelop/unity3d_native_monodevelop.sh