summaryrefslogtreecommitdiff
path: root/src/trg-about-window.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-10 09:38:32 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-10 09:38:32 +0000
commit50bdf566650d42211ace7ba7fd7a56023beda9a2 (patch)
treeb91ff38b95e4690494a4dd3d113f2413d35600b5 /src/trg-about-window.c
parent69b1523fb32107a486a730b473a5304f26d8f15d (diff)
some improvements to the win32 installer
Diffstat (limited to 'src/trg-about-window.c')
-rw-r--r--src/trg-about-window.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/trg-about-window.c b/src/trg-about-window.c
index d173251..d24cbeb 100644
--- a/src/trg-about-window.c
+++ b/src/trg-about-window.c
@@ -33,8 +33,17 @@ GtkWidget *trg_about_window_new(GtkWindow * parent)
GtkWidget *dialog;
GdkPixbuf *logo;
gchar *licenseText = NULL;
-
const gchar *trgAuthors[] = { "Alan Fitton <alan@eth0.org.uk>", NULL };
+ gchar *licenseFile;
+ gchar *moddir;
+
+#ifdef WIN32
+ moddir = g_win32_get_package_installation_directory_of_module(NULL);
+ licenseFile = g_build_filename(moddir, "..", "COPYING.TXT", NULL);
+ g_free(moddir);
+#else
+ licenseFile = g_strdup(TRGLICENSE);
+#endif
dialog = gtk_about_dialog_new();
gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
@@ -50,7 +59,7 @@ GtkWidget *trg_about_window_new(GtkWindow * parent)
g_object_unref(logo);
}
- if (g_file_get_contents(TRGLICENSE, &licenseText, NULL, NULL)) {
+ if (g_file_get_contents(licenseFile, &licenseText, NULL, NULL)) {
gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog),
licenseText);
} else {
@@ -81,6 +90,7 @@ GtkWidget *trg_about_window_new(GtkWindow * parent)
"* Y3AVD (Russian)\n"
"* ROR191 (Ukranian)\n");
+ g_free(licenseFile);
g_free(licenseText);
return dialog;