From 5472a813fa62370926ace45d7506f098368428eb Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 17 Aug 2011 15:22:40 +0200 Subject: [PATCH] working gtkpref plugin --- plugins/gtkpref/gtkpref.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/gtkpref/gtkpref.c b/plugins/gtkpref/gtkpref.c index 6bd20102..18a6d958 100644 --- a/plugins/gtkpref/gtkpref.c +++ b/plugins/gtkpref/gtkpref.c @@ -25,7 +25,6 @@ */ #include -#include #include "xchat-plugin.h" @@ -34,7 +33,20 @@ static xchat_plugin *ph; /* plugin handle */ static void launch_tool () { + STARTUPINFO si; + PROCESS_INFORMATION pi; + ZeroMemory (&si, sizeof (si)); + si.cb = sizeof (si); + ZeroMemory (&pi, sizeof (pi)); + + if (!CreateProcess ( NULL, "gtk2-prefs.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + xchat_print (ph, "Error launching the GTK+ Preference Tool! Maybe the executable is missing?"); + } + + CloseHandle (pi.hProcess); + CloseHandle (pi.hThread); } int