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

Properly use glade_path for all new widgets.

parent 73a38c45
No related branches found
No related tags found
No related merge requests found
......@@ -1904,7 +1904,7 @@ void last_user(GtkWidget *w, gpointer data)
void show_about_box(GtkWidget *unused, gpointer data)
{
GladeXML *axml;
axml = glade_xml_new("gtkuseredit.glade", "AboutWindow", NULL);
axml = glade_xml_new(glade_path, "AboutWindow", NULL);
if(axml==NULL) {
fprintf(stderr,"Could not locate AboutWindow widget\n");
return;
......@@ -1966,7 +1966,7 @@ void find_user(GtkWidget *t, gpointer data)
nu=matchuser(&cfg, (char *)gtk_entry_get_text(GTK_ENTRY(w)), TRUE);
if(nu==0) {
GladeXML *cxml;
cxml = glade_xml_new("gtkuseredit.glade", "NotFoundWindow", NULL);
cxml = glade_xml_new(glade_path, "NotFoundWindow", NULL);
/* connect the signals in the interface */
glade_xml_signal_autoconnect(cxml);
if(cxml==NULL)
......@@ -2011,7 +2011,7 @@ int get_date(GtkWidget *t, isoDate_t *date)
isoDate_t odate=*date;
got_date=0;
cxml = glade_xml_new("gtkuseredit.glade", "CalendarWindow", NULL);
cxml = glade_xml_new(glade_path, "CalendarWindow", NULL);
if(cxml==NULL) {
fprintf(stderr,"Could not locate Calendar Window XML\n");
return(-1);
......
......@@ -12,6 +12,7 @@ user_t user;
GladeXML *xml;
int totalusers=0;
int current_user=0;
char glade_path[MAX_PATH+1];
/* Refreshes global variables... ie: Number of users */
int refresh_globals(void)
......@@ -124,7 +125,6 @@ int read_config(void)
}
int main(int argc, char *argv[]) {
char glade_path[MAX_PATH+1];
gtk_init(&argc, &argv);
glade_init();
......@@ -149,7 +149,7 @@ int main(int argc, char *argv[]) {
update_current_user(nu);
else {
GladeXML *cxml;
cxml = glade_xml_new("gtkuseredit.glade", "NotFoundWindow", NULL);
cxml = glade_xml_new(glade_path, "NotFoundWindow", NULL);
glade_xml_signal_autoconnect(cxml);
gtk_window_present(GTK_WINDOW(glade_xml_get_widget(cxml, "NotFoundWindow")));
}
......
......@@ -11,5 +11,6 @@ extern user_t user;
extern GladeXML *xml;
extern int totalusers;
extern int current_user;
extern char glade_path[MAX_PATH+1];
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment