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

Security Tab now loads info correctly.

parent d67fb05a
No related branches found
No related tags found
No related merge requests found
...@@ -25,113 +25,221 @@ void load_user(GtkWidget *wiggy, gpointer data) ...@@ -25,113 +25,221 @@ void load_user(GtkWidget *wiggy, gpointer data)
return; return;
} }
/* Alias */ /* Peronal Tab */
w=glade_xml_get_widget(xml, "eUserAlias"); /* Alias */
if(w==NULL) w=glade_xml_get_widget(xml, "eUserAlias");
fprintf(stderr,"Cannot get the alias widget\n"); if(w==NULL)
else fprintf(stderr,"Cannot get the alias widget\n");
gtk_entry_set_text(GTK_ENTRY(w),user.alias); else
gtk_entry_set_text(GTK_ENTRY(w),user.alias);
/* Real Name */
w=glade_xml_get_widget(xml, "eRealName"); /* Real Name */
if(w==NULL) w=glade_xml_get_widget(xml, "eRealName");
fprintf(stderr,"Cannot get the real name widget\n"); if(w==NULL)
else fprintf(stderr,"Cannot get the real name widget\n");
gtk_entry_set_text(GTK_ENTRY(w),user.name); else
gtk_entry_set_text(GTK_ENTRY(w),user.name);
/* Computer */
w=glade_xml_get_widget(xml, "eComputer"); /* Computer */
if(w==NULL) w=glade_xml_get_widget(xml, "eComputer");
fprintf(stderr,"Cannot get the computer widget\n"); if(w==NULL)
else fprintf(stderr,"Cannot get the computer widget\n");
gtk_entry_set_text(GTK_ENTRY(w),user.comp); else
gtk_entry_set_text(GTK_ENTRY(w),user.comp);
/* NetMail */
w=glade_xml_get_widget(xml, "eNetMail"); /* NetMail */
if(w==NULL) w=glade_xml_get_widget(xml, "eNetMail");
fprintf(stderr,"Cannot get the netmail widget\n"); if(w==NULL)
else fprintf(stderr,"Cannot get the netmail widget\n");
gtk_entry_set_text(GTK_ENTRY(w),user.netmail); else
gtk_entry_set_text(GTK_ENTRY(w),user.netmail);
/* Phone */
w=glade_xml_get_widget(xml, "ePhone"); /* Phone */
if(w==NULL) w=glade_xml_get_widget(xml, "ePhone");
fprintf(stderr,"Cannot get the phone widget\n"); if(w==NULL)
else fprintf(stderr,"Cannot get the phone widget\n");
gtk_entry_set_text(GTK_ENTRY(w),user.phone); else
gtk_entry_set_text(GTK_ENTRY(w),user.phone);
/* Note */
w=glade_xml_get_widget(xml, "eNote"); /* Note */
if(w==NULL) w=glade_xml_get_widget(xml, "eNote");
fprintf(stderr,"Cannot get the note widget\n"); if(w==NULL)
else fprintf(stderr,"Cannot get the note widget\n");
gtk_entry_set_text(GTK_ENTRY(w),user.note); else
gtk_entry_set_text(GTK_ENTRY(w),user.note);
/* Comment */
w=glade_xml_get_widget(xml, "eComment"); /* Comment */
if(w==NULL) w=glade_xml_get_widget(xml, "eComment");
fprintf(stderr,"Cannot get the comment widget\n"); if(w==NULL)
else fprintf(stderr,"Cannot get the comment widget\n");
gtk_entry_set_text(GTK_ENTRY(w),user.comment); else
gtk_entry_set_text(GTK_ENTRY(w),user.comment);
/* Gender */
w=glade_xml_get_widget(xml, "eGender"); /* Gender */
if(w==NULL) w=glade_xml_get_widget(xml, "eGender");
fprintf(stderr,"Cannot get the gender widget\n"); if(w==NULL)
else { fprintf(stderr,"Cannot get the gender widget\n");
str[0]=user.sex; else {
str[1]=0; str[0]=user.sex;
gtk_entry_set_text(GTK_ENTRY(w),str); str[1]=0;
} gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Connection */
w=glade_xml_get_widget(xml, "eConnection");
if(w==NULL)
fprintf(stderr,"Cannot get the connection widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.modem);
/* Chat Handle */
w=glade_xml_get_widget(xml, "eHandle");
if(w==NULL)
fprintf(stderr,"Cannot get the handle widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.handle);
/* Birthdate */
w=glade_xml_get_widget(xml, "eBirthdate");
if(w==NULL)
fprintf(stderr,"Cannot get the birthdate widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.birth);
/* Password */
w=glade_xml_get_widget(xml, "ePassword");
if(w==NULL)
fprintf(stderr,"Cannot get the password widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.pass);
/* Address */
w=glade_xml_get_widget(xml, "eAddress");
if(w==NULL)
fprintf(stderr,"Cannot get the address widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.address);
/* Location */
w=glade_xml_get_widget(xml, "eLocation");
if(w==NULL)
fprintf(stderr,"Cannot get the location widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.location);
/* Postal/ZIP code */
w=glade_xml_get_widget(xml, "eZip");
if(w==NULL)
fprintf(stderr,"Cannot get the postal/zip code widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.zipcode);
/* Postal/ZIP code */
w=glade_xml_get_widget(xml, "eZip");
if(w==NULL)
fprintf(stderr,"Cannot get the postal/zip code widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.zipcode);
/* Security Tab */
/* Level */
w=glade_xml_get_widget(xml, "eLevel");
if(w==NULL)
fprintf(stderr,"Cannot get the level widget\n");
else {
sprintf(str,"%u",user.level);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Expiration */
w=glade_xml_get_widget(xml, "eExpiration");
if(w==NULL)
fprintf(stderr,"Cannot get the expiration widget\n");
else {
unixtodstr(&cfg, user.expire, str);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Flag Sets */
w=glade_xml_get_widget(xml, "eFlagSet1");
if(w==NULL)
fprintf(stderr,"Cannot get the flag set 1 widget\n");
else {
ltoaf(user.flags1, str);
truncsp(str);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
w=glade_xml_get_widget(xml, "eFlagSet2");
if(w==NULL)
fprintf(stderr,"Cannot get the flag set 2 widget\n");
else {
ltoaf(user.flags2, str);
truncsp(str);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
w=glade_xml_get_widget(xml, "eFlagSet3");
if(w==NULL)
fprintf(stderr,"Cannot get the flag set 3 widget\n");
else {
ltoaf(user.flags3, str);
truncsp(str);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
w=glade_xml_get_widget(xml, "eFlagSet4");
if(w==NULL)
fprintf(stderr,"Cannot get the flag set 4 widget\n");
else {
ltoaf(user.flags4, str);
truncsp(str);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Exemptions */
w=glade_xml_get_widget(xml, "eExemptions");
if(w==NULL)
fprintf(stderr,"Cannot get the exemptions widget\n");
else {
ltoaf(user.exempt, str);
truncsp(str);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Restrictions */
w=glade_xml_get_widget(xml, "eRestrictions");
if(w==NULL)
fprintf(stderr,"Cannot get the restrictions widget\n");
else {
ltoaf(user.rest, str);
truncsp(str);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Credits */
w=glade_xml_get_widget(xml, "eCredits");
if(w==NULL)
fprintf(stderr,"Cannot get the credits widget\n");
else {
sprintf(str,"%u",user.cdt);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Free Credits */
w=glade_xml_get_widget(xml, "eFreeCredits");
if(w==NULL)
fprintf(stderr,"Cannot get the free credits widget\n");
else {
sprintf(str,"%u",user.freecdt);
gtk_entry_set_text(GTK_ENTRY(w),str);
}
/* Connection */ /* Minutes */
w=glade_xml_get_widget(xml, "eConnection"); w=glade_xml_get_widget(xml, "eMinutes");
if(w==NULL) if(w==NULL)
fprintf(stderr,"Cannot get the connection widget\n"); fprintf(stderr,"Cannot get the minutes widget\n");
else else {
gtk_entry_set_text(GTK_ENTRY(w),user.modem); sprintf(str,"%u",user.min);
gtk_entry_set_text(GTK_ENTRY(w),str);
/* Chat Handle */ }
w=glade_xml_get_widget(xml, "eHandle");
if(w==NULL)
fprintf(stderr,"Cannot get the handle widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.handle);
/* Birthdate */
w=glade_xml_get_widget(xml, "eBirthdate");
if(w==NULL)
fprintf(stderr,"Cannot get the birthdate widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.birth);
/* Password */
w=glade_xml_get_widget(xml, "ePassword");
if(w==NULL)
fprintf(stderr,"Cannot get the password widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.pass);
/* Address */
w=glade_xml_get_widget(xml, "eAddress");
if(w==NULL)
fprintf(stderr,"Cannot get the address widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.address);
/* Location */
w=glade_xml_get_widget(xml, "eLocation");
if(w==NULL)
fprintf(stderr,"Cannot get the location widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.location);
/* Postal/ZIP code */
w=glade_xml_get_widget(xml, "eZip");
if(w==NULL)
fprintf(stderr,"Cannot get the postal/zip code widget\n");
else
gtk_entry_set_text(GTK_ENTRY(w),user.zipcode);
} }
int update_current_user(int new_user) int update_current_user(int new_user)
......
...@@ -1418,7 +1418,7 @@ ...@@ -1418,7 +1418,7 @@
<property name="spacing">0</property> <property name="spacing">0</property>
<child> <child>
<widget class="GtkEntry" id="entry26"> <widget class="GtkEntry" id="eCredits">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1457,7 +1457,7 @@ ...@@ -1457,7 +1457,7 @@
<property name="spacing">0</property> <property name="spacing">0</property>
<child> <child>
<widget class="GtkEntry" id="entry27"> <widget class="GtkEntry" id="eFreeCredits">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1497,7 +1497,7 @@ ...@@ -1497,7 +1497,7 @@
<property name="spacing">0</property> <property name="spacing">0</property>
<child> <child>
<widget class="GtkEntry" id="entry28"> <widget class="GtkEntry" id="eMinutes">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1571,7 +1571,7 @@ ...@@ -1571,7 +1571,7 @@
</child> </child>
<child> <child>
<widget class="GtkEntry" id="entry24"> <widget class="GtkEntry" id="eLevel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1616,7 +1616,7 @@ ...@@ -1616,7 +1616,7 @@
</child> </child>
<child> <child>
<widget class="GtkEntry" id="entry25"> <widget class="GtkEntry" id="eExpiration">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1716,7 +1716,7 @@ ...@@ -1716,7 +1716,7 @@
<property name="spacing">0</property> <property name="spacing">0</property>
<child> <child>
<widget class="GtkEntry" id="entry29"> <widget class="GtkEntry" id="eExemptions">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1755,7 +1755,7 @@ ...@@ -1755,7 +1755,7 @@
<property name="spacing">0</property> <property name="spacing">0</property>
<child> <child>
<widget class="GtkEntry" id="entry30"> <widget class="GtkEntry" id="eRestrictions">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1938,7 +1938,7 @@ ...@@ -1938,7 +1938,7 @@
</child> </child>
<child> <child>
<widget class="GtkEntry" id="entry31"> <widget class="GtkEntry" id="eFlagSet1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1960,7 +1960,7 @@ ...@@ -1960,7 +1960,7 @@
</child> </child>
<child> <child>
<widget class="GtkEntry" id="entry32"> <widget class="GtkEntry" id="eFlagSet3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1975,14 +1975,14 @@ ...@@ -1975,14 +1975,14 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">2</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">3</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkEntry" id="entry33"> <widget class="GtkEntry" id="eFlagSet4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -1997,14 +1997,14 @@ ...@@ -1997,14 +1997,14 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">2</property> <property name="top_attach">3</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">4</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkEntry" id="entry34"> <widget class="GtkEntry" id="eFlagSet2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="editable">True</property> <property name="editable">True</property>
...@@ -2019,8 +2019,8 @@ ...@@ -2019,8 +2019,8 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">3</property> <property name="top_attach">1</property>
<property name="bottom_attach">4</property> <property name="bottom_attach">2</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment