diff --git a/src/sbbs3/gtkuseredit/events.c b/src/sbbs3/gtkuseredit/events.c index 65132ef16d87d9b18a2114f151a81fc8ed1b4f7e..5526b1ce9a64aad00b0caed8f6712e2dfbb5c462 100644 --- a/src/sbbs3/gtkuseredit/events.c +++ b/src/sbbs3/gtkuseredit/events.c @@ -242,7 +242,176 @@ void load_user(GtkWidget *wiggy, gpointer data) } /* Statistics */ - + /* First On */ + w=glade_xml_get_widget(xml, "eFirstOn"); + if(w==NULL) + fprintf(stderr,"Cannot get the first on widget\n"); + else { + unixtodstr(&cfg, user.firston, str); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Last On */ + w=glade_xml_get_widget(xml, "eLastOn"); + if(w==NULL) + fprintf(stderr,"Cannot get the last on widget\n"); + else { + unixtodstr(&cfg, user.laston, str); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* First On */ + w=glade_xml_get_widget(xml, "eFirstOn"); + if(w==NULL) + fprintf(stderr,"Cannot get the first on widget\n"); + else { + unixtodstr(&cfg, user.firston, str); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Total Logons */ + w=glade_xml_get_widget(xml, "eLogonsTotal"); + if(w==NULL) + fprintf(stderr,"Cannot get the total logons widget\n"); + else { + sprintf(str, "%hu", user.logons); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Logons today */ + w=glade_xml_get_widget(xml, "eLogonsToday"); + if(w==NULL) + fprintf(stderr,"Cannot get the logons today widget\n"); + else { + sprintf(str, "%hu", user.ltoday); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Total Posts */ + w=glade_xml_get_widget(xml, "eTotalPosts"); + if(w==NULL) + fprintf(stderr,"Cannot get the total posts widget\n"); + else { + sprintf(str, "%hu", user.posts); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Posts Today */ + w=glade_xml_get_widget(xml, "ePostsToday"); + if(w==NULL) + fprintf(stderr,"Cannot get the posts today widget\n"); + else { + sprintf(str, "%hu", user.ptoday); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Total Uploads */ + w=glade_xml_get_widget(xml, "eTotalUploads"); + if(w==NULL) + fprintf(stderr,"Cannot get the total uploads widget\n"); + else { + sprintf(str, "%hu", user.uls); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Upload Bytes */ + w=glade_xml_get_widget(xml, "eUploadBytes"); + if(w==NULL) + fprintf(stderr,"Cannot get the upload bytes widget\n"); + else { + sprintf(str, "%u", user.ulb); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Total Time On */ + w=glade_xml_get_widget(xml, "eTotalTimeOn"); + if(w==NULL) + fprintf(stderr,"Cannot get the total time on widget\n"); + else { + sprintf(str, "%hu", user.timeon); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Time On Today */ + w=glade_xml_get_widget(xml, "eTimeOnToday"); + if(w==NULL) + fprintf(stderr,"Cannot get the time on today widget\n"); + else { + sprintf(str, "%hu", user.ttoday); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Time On Last Call */ + w=glade_xml_get_widget(xml, "eTimeOnLastCall"); + if(w==NULL) + fprintf(stderr,"Cannot get the last call time on widget\n"); + else { + sprintf(str, "%hu", user.tlast); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Time On Extra */ + w=glade_xml_get_widget(xml, "eTimeOnExtra"); + if(w==NULL) + fprintf(stderr,"Cannot get the extra time on widget\n"); + else { + sprintf(str, "%hu", user.textra); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Total Downloads */ + w=glade_xml_get_widget(xml, "eDownloadsTotal"); + if(w==NULL) + fprintf(stderr,"Cannot get the total downloads widget\n"); + else { + sprintf(str, "%hu", user.dls); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Download Bytes */ + w=glade_xml_get_widget(xml, "eDownloadsBytes"); + if(w==NULL) + fprintf(stderr,"Cannot get the download bytes widget\n"); + else { + sprintf(str, "%u", user.dlb); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Download Leeches */ + w=glade_xml_get_widget(xml, "eDownloadsLeech"); + if(w==NULL) + fprintf(stderr,"Cannot get the downloads leech widget\n"); + else { + sprintf(str, "%hhu", user.leech); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Total Email */ + w=glade_xml_get_widget(xml, "eEmailTotal"); + if(w==NULL) + fprintf(stderr,"Cannot get the total email widget\n"); + else { + sprintf(str, "%hu", user.emails); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Email Today */ + w=glade_xml_get_widget(xml, "eEmailToday"); + if(w==NULL) + fprintf(stderr,"Cannot get the email today widget\n"); + else { + sprintf(str, "%hu", user.etoday); + gtk_entry_set_text(GTK_ENTRY(w),str); + } + + /* Email To Sysop */ + w=glade_xml_get_widget(xml, "eEmailToSysop"); + if(w==NULL) + fprintf(stderr,"Cannot get the email to sysop widget\n"); + else { + sprintf(str, "%hu", user.fbacks); + gtk_entry_set_text(GTK_ENTRY(w),str); + } } int update_current_user(int new_user) @@ -294,3 +463,9 @@ void last_user(GtkWidget *w, gpointer data) { update_current_user(totalusers); } + +void show_about_box(GtkWidget *w, gpointer data) +{ + GladeXML *ab; + ab=glade_xml_new("gtkuseredit.glade", "AboutWindow", NULL); +} diff --git a/src/sbbs3/gtkuseredit/gtkuseredit.glade b/src/sbbs3/gtkuseredit/gtkuseredit.glade index 48458af335d0ec6ed21bf4bb9c32c927405ab7a5..6a7a58042e7f1635c2a83ff829ab61821af77614 100644 --- a/src/sbbs3/gtkuseredit/gtkuseredit.glade +++ b/src/sbbs3/gtkuseredit/gtkuseredit.glade @@ -2219,7 +2219,7 @@ </child> <child> - <widget class="GtkEntry" id="entry47"> + <widget class="GtkEntry" id="eDownloadsTotal"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2242,7 +2242,7 @@ </child> <child> - <widget class="GtkEntry" id="entry48"> + <widget class="GtkEntry" id="eDownloadsBytes"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2265,7 +2265,7 @@ </child> <child> - <widget class="GtkEntry" id="entry49"> + <widget class="GtkEntry" id="eDownloadsLeech"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2434,7 +2434,7 @@ </child> <child> - <widget class="GtkEntry" id="entry50"> + <widget class="GtkEntry" id="eEmailTotal"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2457,7 +2457,7 @@ </child> <child> - <widget class="GtkEntry" id="entry51"> + <widget class="GtkEntry" id="eEmailToday"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2480,7 +2480,7 @@ </child> <child> - <widget class="GtkEntry" id="entry52"> + <widget class="GtkEntry" id="eEmailToSysop"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2686,7 +2686,7 @@ </child> <child> - <widget class="GtkEntry" id="entry43"> + <widget class="GtkEntry" id="eTotalTimeOn"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2709,7 +2709,7 @@ </child> <child> - <widget class="GtkEntry" id="entry44"> + <widget class="GtkEntry" id="eTimeOnToday"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2732,7 +2732,7 @@ </child> <child> - <widget class="GtkEntry" id="entry45"> + <widget class="GtkEntry" id="eTimeOnLastCall"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2755,7 +2755,7 @@ </child> <child> - <widget class="GtkEntry" id="entry46"> + <widget class="GtkEntry" id="eTimeOnExtra"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2898,7 +2898,7 @@ </child> <child> - <widget class="GtkEntry" id="entry41"> + <widget class="GtkEntry" id="eTotalUploads"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -2921,7 +2921,7 @@ </child> <child> - <widget class="GtkEntry" id="entry42"> + <widget class="GtkEntry" id="eUploadBytes"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -3036,7 +3036,7 @@ </child> <child> - <widget class="GtkEntry" id="entry35"> + <widget class="GtkEntry" id="eFirstOn"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -3087,7 +3087,7 @@ </child> <child> - <widget class="GtkEntry" id="entry36"> + <widget class="GtkEntry" id="eLastOn"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -3230,7 +3230,7 @@ </child> <child> - <widget class="GtkEntry" id="entry37"> + <widget class="GtkEntry" id="eLogonsTotal"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -3253,7 +3253,7 @@ </child> <child> - <widget class="GtkEntry" id="entry38"> + <widget class="GtkEntry" id="eLogonsToday"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -3396,7 +3396,7 @@ </child> <child> - <widget class="GtkEntry" id="entry39"> + <widget class="GtkEntry" id="eTotalPosts"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -3419,7 +3419,7 @@ </child> <child> - <widget class="GtkEntry" id="entry40"> + <widget class="GtkEntry" id="ePostsToday"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property>