summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-21 11:22:01 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-21 11:22:01 +0000
commitc076e9ef980403baa8021c64c65b0bfcf711fcbf (patch)
tree9c91df95bf3f69da20b0fa5c2b3388740d20a1d5 /src/main.c
parent134e52f88ae48ba186ac813d6763aed22d8da4b6 (diff)
on win32, set a GTK theme called win32-gtkrc.rc in the directory of the executable. the default GTK theme is *ugly* on windows, the MS-Windows one is less ugly..
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 3f79971..eda8d23 100644
--- a/src/main.c
+++ b/src/main.c
@@ -94,12 +94,15 @@ static gboolean should_be_minimised(int argc, char *argv[])
int main(int argc, char *argv[])
{
int returnValue = EXIT_SUCCESS;
+ TrgMainWindow *window;
+ TrgClient *client;
#ifdef HAVE_LIBUNIQUE
UniqueApp *app = NULL;
gboolean withUnique;
#endif
- TrgMainWindow *window;
- TrgClient *client;
+#ifdef WIN32
+ gchar *packagedir, *gtkrcfile;
+#endif
#ifdef DEBUG
//GMemVTable gmvt = {malloc,realloc,free,calloc,malloc,realloc};
@@ -110,6 +113,18 @@ int main(int argc, char *argv[])
g_type_init();
g_thread_init(NULL);
+
+#ifdef WIN32
+ packagedir = g_win32_get_package_installation_directory_of_module(NULL);
+ gtkrcfile = g_build_filename(packagedir, "win32-gtkrc.rc", NULL);
+
+ if (g_file_test(gtkrcfile, G_FILE_TEST_IS_REGULAR))
+ gtk_rc_add_default_file(gtkrcfile);
+
+ g_free(packagedir);
+ g_free(gtkrcfile);
+#endif
+
gtk_init(&argc, &argv);
g_set_application_name (PACKAGE_NAME);