Skip to content
Snippets Groups Projects
Commit b0b9d5bd authored by deuce's avatar deuce
Browse files

Load the .glade file from the same path as the binary is executed from.

parent a70cc347
Branches
Tags
No related merge requests found
...@@ -123,11 +123,15 @@ int read_config(void) ...@@ -123,11 +123,15 @@ int read_config(void)
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
char glade_path[MAX_PATH+1];
gtk_init(&argc, &argv); gtk_init(&argc, &argv);
glade_init(); glade_init();
/* load the interface */ /* load the interface */
xml = glade_xml_new("gtkuseredit.glade", "MainWindow", NULL); strcpy(glade_path, argv[0]);
strcpy(getfname(glade_path), "gtkuseredit.glade");
xml = glade_xml_new(glade_path, "MainWindow", NULL);
/* connect the signals in the interface */ /* connect the signals in the interface */
glade_xml_signal_autoconnect(xml); glade_xml_signal_autoconnect(xml);
/* Set up the global config stuff. */ /* Set up the global config stuff. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment