Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2019-12-03 14:33:52 +0300
committerGitHub <noreply@github.com>2019-12-03 14:33:52 +0300
commit95c46e0376f149838f39119bf5884ba0ca90c2f4 (patch)
treeef3b13ec2cc1742d935d392ee5050e024718721b /main
parent80158577a3b055e48ef817238d6ef28f63a9755d (diff)
[Ide[ Configure Gtk# for slim startup (#9364)
* [Ide[ Configure Gtk# for slim startup * Fix up startup tracker slices. Xamarin.Mac is init as part of gtk init, skewing info
Diffstat (limited to 'main')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs6
2 files changed, 12 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs
index b8ace0dbbd..7e467a4e60 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs
@@ -76,15 +76,12 @@ namespace MonoDevelop.Components
{
if (Gtk.Settings.Default != null)
throw new InvalidOperationException ("Gtk already initialized!");
-
- //HACK: we must initilize some Gtk rc before Gtk.Application is initialized on Mac/Windows
- // otherwise it will not be loaded correctly and theme switching won't work.
- if (!Platform.IsLinux)
- UpdateGtkTheme ();
+ IdeStartupTracker.StartupTracker.MarkSection ("PreGtkInitialization");
#if MAC
// Early init Cocoa through xwt
var loaded = NativeToolkitHelper.LoadCocoa ();
+ IdeStartupTracker.StartupTracker.MarkSection ("XamarinMacInitialization");
var disableA11y = Environment.GetEnvironmentVariable ("DISABLE_ATKCOCOA");
if (Platform.IsMac && (NSUserDefaults.StandardUserDefaults.BoolForKey ("com.monodevelop.AccessibilityEnabled") && string.IsNullOrEmpty (disableA11y))) {
@@ -103,6 +100,11 @@ namespace MonoDevelop.Components
AccessibilityEnabled = false;
}
#endif
+ //HACK: we must initilize some Gtk rc before Gtk.Application is initialized on Mac/Windows
+ // otherwise it will not be loaded correctly and theme switching won't work.
+ if (!Platform.IsLinux)
+ UpdateGtkTheme ();
+
Gtk.Application.Init (BrandingService.ApplicationName, ref args);
// Reset our environment after initialization on Mac
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
index afbbc4a0fe..389cdd31e8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
@@ -82,6 +82,8 @@ namespace MonoDevelop.Ide
Environment.SetEnvironmentVariable ("MONO_GC_PARAMS", null);
Environment.SetEnvironmentVariable ("MONO_SLEEP_ABORT_LIMIT", null);
Environment.SetEnvironmentVariable ("MONO_THREADS_SUSPEND", null);
+
+ Environment.SetEnvironmentVariable ("GTKSHARP_SLIM_STARTUP", "yes");
}
int Run (MonoDevelopOptions options)
@@ -126,6 +128,8 @@ namespace MonoDevelop.Ide
var args = options.RemainingArgs.ToArray ();
IdeTheme.InitializeGtk (BrandingService.ApplicationName, ref args);
+ IdeStartupTracker.StartupTracker.MarkSection ("GtkInitialization");
+
startupInfo = new StartupInfo (options, args);
if (startupInfo.HasFiles) {
@@ -143,6 +147,7 @@ namespace MonoDevelop.Ide
LoggingService.LogError ("Unauthorized access: " + ua.Message);
return 1;
}
+ IdeStartupTracker.StartupTracker.MarkSection ("IdeCustomizerInitialization");
try {
GLibLogging.Enabled = true;
@@ -150,7 +155,6 @@ namespace MonoDevelop.Ide
LoggingService.LogError ("Error initialising GLib logging.", ex);
}
- IdeStartupTracker.StartupTracker.MarkSection ("GtkInitialization");
LoggingService.LogInfo ("Using GTK+ {0}", IdeVersionInfo.GetGtkVersion ());
// XWT initialization