[mono/gtk-sharp] [2 commits] 53e884dd: gtk: fix Application to be more robust when embedding mono
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <000001423da3109e-47debbd2-42c0-44c9-8b92-8ced11a202d5-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/gtk-sharp
Compare: https://github.com/mono/gtk-sharp/compare/859832f6e4b6...d6f06860fb49
Commit: 53e884dd223dbe9b47cf26833977d8e43cbae9df
Author: Andrés G. Aragoneses <[email protected]> (knocte)
Date: 2013-11-03 15:11:42 GMT
URL: https://github.com/mono/gtk-sharp/commit/53e884dd223dbe9b47cf26833977d8e43cbae9df
gtk: fix Application to be more robust when embedding mono
When embedding mono, Environment.GetCommandLineArgs() would not return
an array with any element.
Reported in the mailing list, by Vardar Sahin.
Changed paths:
M gtk/Application.cs
Modified: gtk/Application.cs
===================================================================
@@ -64,7 +64,9 @@ static Application ()
static void SetPrgname ()
{
- GLib.Global.ProgramName = System.IO.Path.GetFileNameWithoutExtension (Environment.GetCommandLineArgs () [0]);
+ var args = Environment.GetCommandLineArgs ();
+ if (args != null && args.Length > 0)
+ GLib.Global.ProgramName = System.IO.Path.GetFileNameWithoutExtension (args [0]);
}
public static void Init ()
Commit: d6f06860fb49962fb1266f7fa62fda5a3785a770
Author: Bertrand Lorentz <[email protected]> (bl8)
Date: 2013-11-09 16:10:06 GMT
URL: https://github.com/mono/gtk-sharp/commit/d6f06860fb49962fb1266f7fa62fda5a3785a770
Merge pull request #90 from knocte/embedded
gtk: fix Application to be more robust when embedding mono
Changed paths:
M gtk/Application.cs
Modified: gtk/Application.cs
===================================================================
@@ -64,7 +64,9 @@ static Application ()
static void SetPrgname ()
{
- GLib.Global.ProgramName = System.IO.Path.GetFileNameWithoutExtension (Environment.GetCommandLineArgs () [0]);
+ var args = Environment.GetCommandLineArgs ();
+ if (args != null && args.Length > 0)
+ GLib.Global.ProgramName = System.IO.Path.GetFileNameWithoutExtension (args [0]);
}
public static void Init ()
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches