aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index e7310dc0..229014d6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,6 +97,7 @@ static int parseOptions(int argc,
97} 97}
98 98
99GladeXML * mainXML; 99GladeXML * mainXML;
100char *gladeFile = NULL;
100 101
101int main(int argc, 102int main(int argc,
102 char *argv[]) { 103 char *argv[]) {
@@ -110,9 +111,17 @@ int main(int argc,
110 startCron(); 111 startCron();
111 gtkInitSaveCalls(); 112 gtkInitSaveCalls();
112 /* load the interface */ 113 /* load the interface */
113 mainXML = glade_xml_new(GLADE_FILE, 114#ifdef MINGW
115 gladeFile = MALLOC(_MAX_PATH + 1);
116 plibc_conv_to_win_path(DATADIR"/gnunet-gtk.glade", gladeFile);
117#else
118 gladeFile = STRDUP(DATADIR"/gnunet-gtk.glade");
119#endif
120
121 mainXML = glade_xml_new(gladeFile,
114 "mainWindow", 122 "mainWindow",
115 NULL); 123 NULL);
124
116 /* connect the signals in the interface */ 125 /* connect the signals in the interface */
117 setCustomLogProc(&addLogEntry); 126 setCustomLogProc(&addLogEntry);
118 glade_xml_signal_autoconnect(mainXML); 127 glade_xml_signal_autoconnect(mainXML);
@@ -134,6 +143,10 @@ int main(int argc,
134 gtkDoneSaveCalls(); 143 gtkDoneSaveCalls();
135 UNREF(mainXML); 144 UNREF(mainXML);
136 doneUtil(); 145 doneUtil();
146
147#ifdef MINGW
148 FREE(gladeFile);
149#endif
137 150
138 return 0; 151 return 0;
139} 152}