static GtkTreeSelection *selFolders;
+static gchar *uifilename;
+
static ZakConfi *confi;
static gchar *cnc_string;
{
GError *error = NULL;
gtk_builder_add_objects_from_file (glaMain,
- UIDIR "/zak-confi-gui.ui",
+ uifilename,
g_strsplit_set ("diagOpenDbCfg", "|", -1),
&error);
{
GError *error = NULL;
gtk_builder_add_objects_from_file (glaMain,
- UIDIR "/zak-confi-gui.ui",
+ uifilename,
g_strsplit_set ("wConfiguration", "|", -1),
&error);
GError *error = NULL;
gtk_builder_add_objects_from_file (glaMain,
- UIDIR "/zak-confi-gui.ui",
+ uifilename,
g_strsplit_set ("wConfiguration", "|", -1),
&error);
GError *error = NULL;
gtk_builder_add_objects_from_file (glaMain,
- UIDIR "/zak-confi-gui.ui",
+ uifilename,
g_strsplit_set ("wKey", "|", -1),
&error);
GError *error = NULL;
gtk_builder_add_objects_from_file (glaMain,
- UIDIR "/zak-confi-gui.ui",
+ uifilename,
g_strsplit_set ("wKey", "|", -1),
&error);
{
GError *error = NULL;
gtk_builder_add_objects_from_file (glaMain,
- UIDIR "/zak-confi-gui.ui",
+ uifilename,
g_strsplit_set ("diagAbout", "|", -1),
&error);
int
main (int argc, char **argv)
{
+ gchar *guidir;
+
GOptionEntry entries[] =
{
{ "cnc_string", 'c', 0, G_OPTION_ARG_STRING, &cnc_string, "Connection string", NULL },
gtk_init (&argc, &argv);
+#ifdef G_OS_WIN32
+
+ gchar *moddir;
+ gchar *p;
+
+ moddir = g_win32_get_package_installation_directory_of_module (NULL);
+
+ p = g_strrstr (moddir, g_strdup_printf ("%c", G_DIR_SEPARATOR));
+ if (p != NULL
+ && (g_ascii_strcasecmp (p + 1, "src") == 0
+ || g_ascii_strcasecmp (p + 1, ".libs") == 0))
+ {
+ guidir = g_strdup (UIDIR);
+
+#undef UIDIR
+ }
+ else
+ {
+ guidir = g_build_filename (moddir, "share", PACKAGE, "ui", NULL);
+ }
+
+#else
+
+ guidir = g_strdup (UIDIR);
+
+#endif
+
+ uifilename = g_build_filename (guidir, "zak-confi-gui.ui", NULL);
+
+ g_free (guidir);
+
glaMain = gtk_builder_new ();
error = NULL;
gtk_builder_add_objects_from_file (glaMain,
- UIDIR "/zak-confi-gui.ui",
+ uifilename,
g_strsplit_set ("accelgroup1"
"|image2"
"|image3"