mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2007-03-05 Mike Kestner <mkestner@novell.com>
* gtk/Application.custom : set prgname in Init methods so that WM_CLASS is more appropriate. Programs using Gnome.Program already get a nice prgname, but Gtk.Application.Init apps were getting a path instead of a filename without extension. svn path=/trunk/gtk-sharp/; revision=73766
This commit is contained in:
parent
eab29b501e
commit
6a00328dd1
@ -1,3 +1,10 @@
|
|||||||
|
2007-03-05 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* gtk/Application.custom : set prgname in Init methods so
|
||||||
|
that WM_CLASS is more appropriate. Programs using Gnome.Program
|
||||||
|
already get a nice prgname, but Gtk.Application.Init apps were
|
||||||
|
getting a path instead of a filename without extension.
|
||||||
|
|
||||||
2007-03-01 Brad Taylor <brad@getcoded.net>
|
2007-03-01 Brad Taylor <brad@getcoded.net>
|
||||||
|
|
||||||
* gtk/Dialog.custom: obsolete old, improperly bound
|
* gtk/Dialog.custom: obsolete old, improperly bound
|
||||||
|
@ -39,8 +39,20 @@ namespace Gtk {
|
|||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern bool gtk_init_check (ref int argc, ref IntPtr argv);
|
static extern bool gtk_init_check (ref int argc, ref IntPtr argv);
|
||||||
|
|
||||||
|
[DllImport("libglib-2.0-0.dll")]
|
||||||
|
static extern bool g_set_prgname (IntPtr name);
|
||||||
|
|
||||||
|
static void SetPrgname ()
|
||||||
|
{
|
||||||
|
string name = System.IO.Path.GetFileNameWithoutExtension (Environment.GetCommandLineArgs () [0]);
|
||||||
|
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
|
||||||
|
g_set_prgname (native_name);
|
||||||
|
GLib.Marshaller.Free (native_name);
|
||||||
|
}
|
||||||
|
|
||||||
public static void Init ()
|
public static void Init ()
|
||||||
{
|
{
|
||||||
|
SetPrgname ();
|
||||||
IntPtr argv = new IntPtr(0);
|
IntPtr argv = new IntPtr(0);
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
|
||||||
@ -49,6 +61,7 @@ namespace Gtk {
|
|||||||
|
|
||||||
static bool do_init (string progname, ref string[] args, bool check)
|
static bool do_init (string progname, ref string[] args, bool check)
|
||||||
{
|
{
|
||||||
|
SetPrgname ();
|
||||||
bool res = false;
|
bool res = false;
|
||||||
string[] progargs = new string[args.Length + 1];
|
string[] progargs = new string[args.Length + 1];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user