]> saetta.ns0.it Git - zakauthe/plugins/db/commitdiff
Adjustment for the path of gui file under mingw. gtk3 v0.5.0
authorAndrea Zagli <azagli@libero.it>
Sat, 28 Dec 2013 21:13:24 +0000 (22:13 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 28 Dec 2013 21:13:24 +0000 (22:13 +0100)
src/aute_db.c

index af966140cda2c23c8165f06bb8d5568163e9dfc6..aaf284c4711c24976aa667c899fa0626736d4d09 100644 (file)
@@ -409,11 +409,7 @@ gchar
        gtkbuilder = gtk_builder_new ();
 
 #ifdef G_OS_WIN32
-#undef GUIDIR
-#undef FORMDIR
-
-       gchar *GUIDIR;
-       gchar *FORMDIR;
+       gchar *guidir;
 
        gchar *moddir;
        gchar *p;
@@ -425,19 +421,25 @@ gchar
            && (g_ascii_strcasecmp (p + 1, "src") == 0
            || g_ascii_strcasecmp (p + 1, ".libs") == 0))
                {
-                       GUIDIR = g_build_filename ("/mingw", "share", "libaute-db", "gui", NULL);
-                       FORMDIR = g_build_filename ("/mingw", "share", "libaute-db", "form", NULL);
+                       guidir = g_strdup (GUIDIR);
+                       formdir = g_strdup (FORMDIR);
+
+#undef GUIDIR
+#undef FORMDIR
                }
        else
                {
-                       GUIDIR = g_build_filename (moddir, "share", "libaute-db", "gui", NULL);
-                       FORMDIR = g_build_filename (moddir, "share", "libaute-db", "form", NULL);
+                       guidir = g_build_filename (moddir, "share", PACKAGE, "gui", NULL);
+                       formdir = g_build_filename (moddir, "share", PACKAGE, "form", NULL);
                }
-#endif
+
+#else
 
        formdir = g_strdup (FORMDIR);
 
-       guifile = g_build_filename (GUIDIR, "autedb.gui", NULL);
+#endif
+
+       guifile = g_build_filename (guidir, "autedb.gui", NULL);
        if (!gtk_builder_add_objects_from_file (gtkbuilder, guifile,
                                                g_strsplit ("diag_main", "|", -1),
                                                &error))