diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-09-21 11:22:01 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-09-21 11:22:01 +0000 |
commit | c076e9ef980403baa8021c64c65b0bfcf711fcbf (patch) | |
tree | 9c91df95bf3f69da20b0fa5c2b3388740d20a1d5 /src | |
parent | 134e52f88ae48ba186ac813d6763aed22d8da4b6 (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')
-rw-r--r-- | src/main.c | 19 | ||||
-rw-r--r-- | src/trg-cell-renderer-numgteqthan.c | 2 | ||||
-rw-r--r-- | src/trg-remote-prefs-dialog.c | 2 |
3 files changed, 19 insertions, 4 deletions
@@ -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); diff --git a/src/trg-cell-renderer-numgteqthan.c b/src/trg-cell-renderer-numgteqthan.c index a2bbd4a..b2bd2f5 100644 --- a/src/trg-cell-renderer-numgteqthan.c +++ b/src/trg-cell-renderer-numgteqthan.c @@ -66,7 +66,7 @@ trg_cell_renderer_numgteqthan_set_property(GObject * object, guint property_id, priv->value_value = g_value_get_int64(value); if (priv->value_value >= priv->minvalue) { gchar size_text[32]; - g_snprintf(size_text, sizeof(size_text), "%ld", priv->value_value); + g_snprintf(size_text, sizeof(size_text), "%"G_GINT64_FORMAT, priv->value_value); g_object_set(object, "text", size_text, NULL); } else { g_object_set(object, "text", "", NULL); diff --git a/src/trg-remote-prefs-dialog.c b/src/trg-remote-prefs-dialog.c index 7a5beca..00be01a 100644 --- a/src/trg-remote-prefs-dialog.c +++ b/src/trg-remote-prefs-dialog.c @@ -238,7 +238,7 @@ static gboolean on_blocklist_updated(gpointer data) { gtk_widget_set_sensitive(priv->blocklist_update_button, TRUE); gtk_button_set_label(GTK_BUTTON(priv->blocklist_update_button), - "Update"); + _("Update")); if (response->status == CURLE_OK) { JsonObject *args = get_arguments(response->obj); |