Changeset 3348 for trunk/jons-gtk2-gui

Show
Ignore:
Timestamp:
03/11/03 10:18:43 (6 years ago)
Author:
bostjanlah
Message:

Made this work again

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jons-gtk2-gui/src/user_info_window.cpp

    r3324 r3348  
    2020 
    2121#include "licq_gtk.h" 
     22#include "utilities.h" 
    2223 
    2324#include "licq_countrycodes.h" 
     
    2627#include <gtk/gtk.h> 
    2728#include <stdlib.h> 
     29 
     30#include <iostream> 
     31using namespace std; 
    2832 
    2933struct info_user 
     
    7276    GtkWidget *update; 
    7377    GtkWidget *cancel; 
    74     ICQUser *user; 
     78  unsigned long uin; 
    7579    struct e_tag_data *etag; 
    7680}; 
     
    8286void update_user_info(GtkWidget *widget, struct info_user *iu); 
    8387void cancel_user_info(GtkWidget *widget, struct info_user *iu); 
    84 struct info_user *iu_new(ICQUser *u); 
     88struct info_user *iu_new(unsigned long uin); 
    8589struct info_user *iu_find(unsigned long uin); 
    8690void verify_user_info(GtkWidget *widget, guint id, gchar *text, 
     
    9195    const gchar *, GtkWidget *&, gint, gint, gboolean); 
    9296 
    93 void list_info_user(GtkWidget *window, ICQUser *user) 
    94 { 
    95     gboolean is_o = FALSE; 
    96  
    97     // Check to see if it's for the owner  
    98     if(user == 0) 
    99     { 
     97void 
     98list_info_user_uin(GtkWidget *window, unsigned long uin); 
     99 
     100void 
     101list_info_user(GtkWidget *window, ICQUser *user) 
     102{ 
     103  if (user != NULL) 
     104    list_info_user_uin(window, user->Uin()); 
     105  else   
     106    list_info_user_uin(window, 0); 
     107} 
     108 
     109void 
     110list_info_user_uin(GtkWidget *window, unsigned long uin) 
     111{ 
     112    struct info_user *iu = iu_find(uin); 
     113 
     114    if (iu != NULL) { 
     115        gtk_widget_show(iu->window); 
     116        return; 
     117    } 
     118 
     119    gboolean is_o; 
     120 
     121    ICQUser *user; 
     122  // Check to see if it's for the owner  
     123    if (uin == 0)   { 
    100124        user = gUserManager.FetchOwner(LOCK_R); 
    101125        is_o = TRUE; 
    102126    } 
    103  
    104     struct info_user *iu = iu_find(user->Uin()); 
    105  
    106     if(iu != 0) 
    107     { 
    108         gdk_window_show(iu->window->window); 
    109         gdk_window_raise(iu->window->window); 
    110         return; 
    111     } 
    112  
    113     iu = iu_new(user); 
     127  else { 
     128      user = gUserManager.FetchUser(uin, LOCK_R); 
     129        is_o = FALSE; 
     130  } 
     131 
     132  if (user == NULL) 
     133    return; 
     134 
     135    iu = iu_new(uin); 
     136    /* Take care of the e_tag_data stuff */ 
     137    iu->etag = g_new0(struct e_tag_data, 1); 
     138 
     139  iu->uin = user->Uin(); 
     140 
    114141 
    115142    GtkWidget *label; 
     
    120147    GtkWidget *close; 
    121148    GtkWidget *statusbar; 
    122     const gchar *title = g_strdup_printf("Info for %s", user->GetAlias()); 
    123     const gchar *uin = g_strdup_printf("%ld", user->Uin()); 
     149     
     150  gchar *title = g_strdup_printf("Info for %s", user->GetAlias()); 
     151    gchar *c_uin = g_strdup_printf("%ld", user->Uin()); 
    124152    gchar real_ip[32]; 
    125153    const gulong _realip = user->RealIp(); 
     
    127155    strcpy(real_ip, inet_ntoa_r(*(struct in_addr *)&_realip, buf)); 
    128156     
    129     /* Take care of the e_tag_data stuff */ 
    130     iu->etag = g_new0(struct e_tag_data, 1); 
    131  
    132     iu->user = user; 
    133  
    134157    /* Make the window */ 
    135158    iu->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); 
     
    150173    iu->notebook = gtk_notebook_new(); 
    151174 
    152 //------ START THE GENERAL TAB --------------------------- 
    153  
    154     GtkWidget *general_table = gtk_table_new(6, 4, false); 
     175  //------ START THE GENERAL TAB --------------------------- 
     176 
     177     
     178  GtkWidget *general_table = gtk_table_new(6, 4, false); 
    155179 
    156180    // Alias (always editable) 
    157     do_label_and_entry(iu->alias, user->GetAlias(), "Alias:", 
    158         general_table, 0, 0, true); 
     181    do_label_and_entry( 
     182      iu->alias,  
     183      user->GetAlias(),  
     184      "Alias:", 
     185          general_table,  
     186      0, 0,  
     187      true); 
    159188 
    160189    // UIN (never editable) 
    161     do_label_and_entry(entry, uin, "UIN:", general_table,  
    162         2, 0, false); 
     190    do_label_and_entry( 
     191      entry,  
     192      c_uin, 
     193      "UIN:", 
     194      general_table,  
     195          2, 0,  
     196      false); 
    163197 
    164198    // Full Name 
    165     do_label_and_entry(iu->fname, user->GetFirstName(), "First Name:", 
    166         general_table, 0, 1, is_o); 
     199    do_label_and_entry( 
     200      iu->fname,  
     201      user->GetFirstName(), 
     202      "First Name:", 
     203          general_table,  
     204      0, 1,  
     205      is_o); 
    167206     
    168207    // Last Name 
    169     do_label_and_entry(iu->lname, user->GetLastName(), "Last Name:", 
    170         general_table, 2, 1, is_o); 
     208    do_label_and_entry( 
     209      iu->lname,  
     210      user->GetLastName(), 
     211      "Last Name:", 
     212          general_table,  
     213      2, 1,  
     214      is_o); 
    171215     
    172216    // IP (never editable) 
    173         char szIPPort[64]; 
    174         char portBuf[32]; 
     217  char szIPPort[64]; 
     218  char portBuf[32]; 
    175219    snprintf(szIPPort, 64, "%s:%s", user->IpStr(buf), user->PortStr(portBuf)); 
    176     do_label_and_entry(entry, szIPPort, "IP:",  
    177         general_table, 0, 2, false); 
     220    do_label_and_entry( 
     221      entry,  
     222      szIPPort, 
     223      "IP:",  
     224          general_table,  
     225      0, 2,  
     226      false); 
    178227 
    179228    // Real IP (never editable) 
    180     do_label_and_entry(entry, real_ip, "Real IP:", general_table, 
    181         2, 2, false); 
     229    do_label_and_entry( 
     230      entry,  
     231      real_ip,  
     232      "Real IP:",  
     233      general_table, 
     234          2, 2,  
     235      false); 
    182236     
    183237    // Primary e-mail 
    184     do_label_and_entry(iu->email1, user->GetEmailPrimary(), 
    185         "Primary E-Mail:", general_table, 0, 3, is_o); 
     238    do_label_and_entry( 
     239      iu->email1,  
     240      user->GetEmailPrimary(), 
     241          "Primary E-Mail:", 
     242      general_table,  
     243      0, 3,  
     244      is_o); 
    186245 
    187246    // Secondary e-mail 
    188     do_label_and_entry(iu->email2, user->GetEmailSecondary(), 
    189         "Secondary E-mail:", general_table, 2, 3, is_o); 
     247    do_label_and_entry( 
     248      iu->email2,  
     249      user->GetEmailSecondary(), 
     250          "Secondary E-mail:", 
     251      general_table,  
     252      2, 3,  
     253      is_o); 
    190254 
    191255    // Old e-mail 
    192     do_label_and_entry(iu->oldemail, user->GetEmailOld(), 
    193         "Old E-mail:", general_table, 0, 4, is_o); 
     256    do_label_and_entry( 
     257      iu->oldemail,  
     258      user->GetEmailOld(), 
     259          "Old E-mail:", 
     260      general_table,  
     261      0, 4,  
     262      is_o); 
    194263 
    195264    // Hide e-mail is needed anyways.. use an if statement to decide 
    196265    // where it goes.. 
    197     iu->hide_email = gtk_check_button_new_with_label( 
    198         "Hide E-mail Address"); 
     266    iu->hide_email = gtk_check_button_new_with_label("Hide E-mail Address"); 
    199267    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(iu->hide_email), 
    200         user->GetHideEmail()); 
     268          user->GetHideEmail()); 
    201269         
    202270    // If it's not the owner, show last seen 
    203     if(!is_o) 
    204     { 
     271    if (!is_o)  { 
    205272        gchar online[28]; 
    206273         
    207         if(!iu->user->StatusOffline()) 
     274        if (!user->StatusOffline()) 
    208275            strcpy(online, "Now"); 
    209         else if(iu->user->LastOnline() == 0) 
     276        else if (user->LastOnline() == 0) 
    210277            strcpy(online, "Unknown"); 
    211         else 
    212         { 
    213             time_t last = iu->user->LastOnline(); 
     278        else { 
     279            time_t last = user->LastOnline(); 
    214280            strcpy(online, ctime(&last)); 
    215281        } 
    216282     
    217         do_label_and_entry(entry, online, "Last Seen:", general_table, 
    218             2, 4, FALSE); 
     283        do_label_and_entry( 
     284        entry, 
     285        online, 
     286        "Last Seen:", 
     287        general_table, 
     288              2, 4,  
     289        FALSE); 
    219290 
    220291        iu->need_auth = gtk_check_button_new_with_label( 
    221             "Need Authorization To Add"); 
    222         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( 
    223             iu->need_auth), iu->user->GetAuthorization()); 
     292        "Need Authorization To Add"); 
     293        gtk_toggle_button_set_active( 
     294        GTK_TOGGLE_BUTTON(iu->need_auth), user->GetAuthorization()); 
    224295        gtk_widget_set_sensitive(iu->need_auth, false); 
    225296        gtk_table_attach(GTK_TABLE(general_table), iu->need_auth, 0, 2, 
    226             5, 6, GTK_FILL, GTK_FILL, 3, 1); 
     297              5, 6, GTK_FILL, GTK_FILL, 3, 1); 
    227298 
    228299        gtk_widget_set_sensitive(iu->hide_email, false); 
    229300        gtk_table_attach(GTK_TABLE(general_table), iu->hide_email, 2, 4, 
    230             5, 6, 
    231             GtkAttachOptions(0), 
    232             GtkAttachOptions(0), 3, 1); 
     301              5, 6, 
     302              GtkAttachOptions(0), 
     303              GtkAttachOptions(0), 3, 1); 
    233304    } 
    234305    // It's the owner 
    235     else 
    236     { 
     306    else { 
    237307        gtk_table_attach(GTK_TABLE(general_table), iu->hide_email, 
    238308            0, 2, 5, 6, GTK_FILL, GTK_FILL, 3, 1); 
     
    266336    gchar country[32]; 
    267337 
    268     if(sc == 0) 
     338    if (sc == 0) 
    269339        strcpy(country, "Unspecified"); 
    270  
    271340    else 
    272341        strcpy(country, sc->szName); 
    273342 
    274     if(!is_o) 
    275     { 
     343    if (!is_o) 
    276344        do_label_and_entry(iu->country, country, "Country:", 
    277345            address_table, 0, 2, FALSE); 
    278     } 
    279     else 
    280     { 
     346    else { 
    281347        iu->o_country = gtk_combo_new(); 
    282348        GList *country_strings = 0; 
     
    336402 
    337403    // Gender 
    338     if(!is_o) 
    339     { 
    340         gchar gender[12]; 
     404    if (!is_o) { 
     405        const gchar *gender; 
    341406        if(user->GetGender() == 1) 
    342             strcpy(gender, "Female"); 
     407            gender = "Female"; 
    343408        else if(user->GetGender() == 2) 
    344             strcpy(gender, "Male"); 
     409            gender = "Male"; 
    345410        else 
    346             strcpy(gender, "Unspecified"); 
     411            gender = "Unspecified"; 
    347412 
    348413        do_label_and_entry(iu->gender, gender, "Gender:", more_table, 
    349414            2, 0, FALSE); 
    350415    } 
    351     else 
    352     { 
     416    else { 
    353417        iu->o_gender = gtk_combo_new(); 
    354418        GList *gender_strings = 0; 
     
    379443 
    380444    // Birthday 
    381     if(!is_o) 
    382     { 
     445    if (!is_o) { 
    383446        gchar bday[11]; 
    384447 
    385448        if(user->GetBirthMonth() == 0 || user->GetBirthDay() == 0) 
    386449            strcpy(bday, "N/A"); 
    387  
    388450        else 
    389451            sprintf(bday, "%d/%d/%d", user->GetBirthMonth(), 
    390                 user->GetBirthDay(), user->GetBirthYear()); 
     452                  user->GetBirthDay(), user->GetBirthYear()); 
    391453 
    392454        do_label_and_entry(iu->bday, bday, "Birthday:", more_table, 
    393455            2, 1, FALSE); 
    394456    } 
    395     else 
    396     { 
     457    else { 
    397458        label = gtk_label_new("Birthday:"); 
    398459        gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); 
     
    452513    GtkWidget *h_box = gtk_hbox_new(FALSE, 5); 
    453514     
    454     if(!is_o) 
    455     { 
    456         for(unsigned short i = 0; i < 3; i++) 
    457         { 
    458             const SLanguage *lang = 
    459                 GetLanguageByCode(user->GetLanguage(i)); 
    460              
    461             label = 
    462                 gtk_label_new( 
    463                     g_strdup_printf("Language %d:", i + 1)); 
     515    if (!is_o) { 
     516        for (unsigned short i = 0; i < 3; i++) { 
     517            const SLanguage *lang = GetLanguageByCode(user->GetLanguage(i)); 
     518            char *lng = g_strdup_printf("Language %d:", i + 1); 
     519          label =   gtk_label_new(lng); 
     520      g_free(lng); 
    464521            if (lang) 
    465522              do_entry(iu->lang[i], lang->szName, FALSE); 
     
    468525 
    469526            gtk_widget_set_size_request(iu->lang[i], 75, 20); 
    470             gtk_box_pack_start(GTK_BOX(h_box), label, FALSE, 
    471                 FALSE, 5); 
    472             gtk_box_pack_start(GTK_BOX(h_box), iu->lang[i], 
    473                 FALSE, FALSE, 2); 
     527            gtk_box_pack_start(GTK_BOX(h_box), label, FALSE, FALSE, 5); 
     528            gtk_box_pack_start(GTK_BOX(h_box), iu->lang[i], FALSE, FALSE, 2); 
    474529        } 
    475530    } 
    476     else 
    477     { 
     531    else { 
    478532        GList *lang_strings = 0; 
    479533         
     
    482536                const_cast<char *>(GetLanguageByIndex(j)->szName)); 
    483537 
    484         for(unsigned short i = 0; i < 3; i++) 
    485         { 
     538        for(unsigned short i = 0; i < 3; i++) { 
    486539            label = gtk_label_new( 
    487540                g_strdup_printf("Language %d:", i + 1)); 
     
    631684 
    632685    gtk_widget_show_all(iu->window); 
     686  gUserManager.DropUser(user); 
    633687} 
    634688 
    635689void user_info_save(GtkWidget *widget, struct info_user *iu) 
    636690{ 
    637     ICQUser *user = gUserManager.FetchUser(iu->user->Uin(), LOCK_R); 
     691    ICQUser *user = gUserManager.FetchUser(iu->uin, LOCK_R); 
    638692    user->SetAlias(gtk_editable_get_chars(GTK_EDITABLE(iu->alias), 0, -1)); 
    639693    gUserManager.DropUser(user); 
     
    647701    catcher = g_slist_remove(catcher, iu->etag); 
    648702 
    649     /* Drop the user (or owner) */ 
    650     gUserManager.DropUser(iu->user); 
    651  
    652703    /* Destroy the window */ 
    653704    gtk_widget_destroy(iu->window); 
     
    661712//  gtk_widget_set_sensitive(iu->cancel, TRUE); 
    662713 
    663     guint id = 
    664         gtk_statusbar_get_context_id(GTK_STATUSBAR(iu->etag->statusbar), "sta"); 
    665     gtk_statusbar_pop(GTK_STATUSBAR(iu->etag->statusbar), id); 
    666     gtk_statusbar_push(GTK_STATUSBAR(iu->etag->statusbar), id, "Updating .. "); 
    667  
    668     strcpy(iu->etag->buf, ""); 
    669714    strcpy(iu->etag->buf, "Updating .. "); 
    670  
    671     if(iu->user->Uin() == gUserManager.OwnerUin()) 
    672     { 
    673         if(gtk_notebook_get_current_page(GTK_NOTEBOOK(iu->notebook)) 
    674            == 0 || gtk_notebook_get_current_page(GTK_NOTEBOOK(iu->notebook)) 
    675            == 1) 
    676         { 
    677             const gchar *_country = gtk_editable_get_chars( 
    678                 GTK_EDITABLE(GTK_COMBO(iu->o_country)->entry), 
    679                 0, -1); 
     715    status_change(iu->etag->statusbar, "sta", iu->etag->buf); 
     716 
     717    if (iu->uin == gUserManager.OwnerUin()) { 
     718        if (gtk_notebook_get_current_page(GTK_NOTEBOOK(iu->notebook)) == 0 ||  
     719        gtk_notebook_get_current_page(GTK_NOTEBOOK(iu->notebook)) == 1) { 
     720            string country = entry_get_chars(GTK_COMBO(iu->o_country)->entry); 
    680721            unsigned short cc; 
    681722             
    682             if(strcmp("Unspecified", _country) == 0) 
     723            if (strcmp("Unspecified", country.c_str()) == 0) 
    683724                cc = COUNTRY_UNSPECIFIED; 
    684             else 
    685             { 
    686                 const SCountry *NewCountry = 
    687                     GetCountryByName(_country); 
     725            else { 
     726                const SCountry *NewCountry = GetCountryByName(country.c_str()); 
    688727                cc = NewCountry->nCode; 
    689728            } 
    690729 
    691             iu->etag->e_tag = icq_daemon->icqSetGeneralInfo( 
    692             gtk_editable_get_chars(GTK_EDITABLE(iu->alias), 0, -1), 
    693             gtk_editable_get_chars(GTK_EDITABLE(iu->fname), 0, -1), 
    694             gtk_editable_get_chars(GTK_EDITABLE(iu->lname), 0, -1), 
    695             gtk_editable_get_chars(GTK_EDITABLE(iu->email1), 0, -1), 
    696             //gtk_editable_get_chars(GTK_EDITABLE(iu->email2), 0, -1), 
    697             //gtk_editable_get_chars(GTK_EDITABLE(iu->oldemail), 0, -1), 
    698             gtk_editable_get_chars(GTK_EDITABLE(iu->city), 0, -1), 
    699             gtk_editable_get_chars(GTK_EDITABLE(iu->state), 0, -1), 
    700             gtk_editable_get_chars(GTK_EDITABLE(iu->phone), 0, -1), 
    701             gtk_editable_get_chars(GTK_EDITABLE(iu->faxnumber), 0, -1), 
    702             gtk_editable_get_chars(GTK_EDITABLE(iu->address), 0, -1), 
    703             gtk_editable_get_chars(GTK_EDITABLE(iu->cellphone), 0, -1), 
    704             gtk_editable_get_chars(GTK_EDITABLE(iu->zip), 0, -1), 
    705             cc,  
    706             gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(iu->hide_email))); 
    707  
     730        iu->etag->e_tag = icq_daemon->icqSetGeneralInfo( 
     731              entry_get_chars(iu->alias).c_str(), 
     732              entry_get_chars(iu->fname).c_str(), 
     733              entry_get_chars(iu->lname).c_str(), 
     734              entry_get_chars(iu->email1).c_str(), 
     735              //entry_get_chars(iu->email2).c_str(), 
     736              //entry_get_chars(iu->oldemail).c_str(), 
     737              entry_get_chars(iu->city).c_str(), 
     738              entry_get_chars(iu->state).c_str(), 
     739              entry_get_chars(iu->phone).c_str(), 
     740              entry_get_chars(iu->faxnumber).c_str(), 
     741              entry_get_chars(iu->address).c_str(), 
     742              entry_get_chars(iu->cellphone).c_str(), 
     743              entry_get_chars(iu->zip).c_str(), 
     744              cc,  
     745              gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(iu->hide_email))); 
    708746        } 
    709747 
    710         else if(gtk_notebook_get_current_page(GTK_NOTEBOOK(iu->notebook)) 
    711             == 2) 
    712         { 
     748        else if(gtk_notebook_get_current_page(GTK_NOTEBOOK(iu->notebook))   == 2)   { 
    713749            const SLanguage *l1 = GetLanguageByName( 
    714750                gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO( 
     
    788824        } 
    789825    } 
    790  
    791826    else 
    792     { 
    793         iu->etag->e_tag = 
    794             icq_daemon->icqRequestMetaInfo(iu->user->Uin()); 
    795     } 
     827        iu->etag->e_tag =   icq_daemon->icqRequestMetaInfo(iu->uin); 
    796828     
    797829    catcher = g_slist_append(catcher, iu->etag); 
     
    828860} 
    829861 
    830 struct info_user *iu_new(ICQUser *u) 
    831 { 
    832     struct info_user *iu; 
    833  
    834     iu = g_new0(struct info_user, 1); 
    835  
    836     iu->user = u; 
     862struct info_user *iu_new(unsigned long uin) 
     863{ 
     864    struct info_user *iu = g_new0(struct info_user, 1); 
     865 
     866    iu->uin = uin; 
    837867 
    838868    iu_list = g_slist_append(iu_list, iu); 
     
    846876    GSList *temp_iu_list = iu_list; 
    847877 
    848     while(temp_iu_list) 
    849     { 
     878    while (temp_iu_list) { 
    850879        iu = (struct info_user *)temp_iu_list->data; 
    851         if(iu->user->Uin() == uin) 
     880        if (iu->uin == uin) 
    852881            return iu; 
    853882 
     
    894923void finish_info(CICQSignal *signal) 
    895924{ 
    896     /* Only do the info.. */ 
     925    cerr << "finish_info\n"; 
     926  /* Only do the info.. */ 
    897927    unsigned long type = signal->SubSignal(); 
    898      
     928   
    899929    if(!(type == USER_GENERAL || type == USER_BASIC || type == USER_EXT || 
    900930       type == USER_MORE || type == USER_ABOUT)) 
    901931        return; 
    902932 
    903     struct info_user *iu = g_new0(struct info_user, 1); 
    904  
    905     iu = iu_find(signal->Uin()); 
    906  
    907     if(iu == 0) 
     933    struct info_user *iu = iu_find(signal->Uin()); 
     934    if (iu == NULL) 
    908935        return; 
    909  
    910     const SCountry *country = GetCountryByCode(iu->user->GetCountryCode()); 
    911 //  const SLanguage *l1 = GetLanguageByCode(iu->user->GetLanguage(0)); 
    912 //  const SLanguage *l2 = GetLanguageByCode(iu->user->GetLanguage(1)); 
    913 //  const SLanguage *l3 = GetLanguageByCode(iu->user->GetLanguage(2)); 
     936     
     937  ICQUser *user = gUserManager.FetchUser(iu->uin, LOCK_R); 
     938 
     939    const SCountry *country = GetCountryByCode(user->GetCountryCode()); 
     940//  const SLanguage *l1 = GetLanguageByCode(user->GetLanguage(0)); 
     941//  const SLanguage *l2 = GetLanguageByCode(user->GetLanguage(1)); 
     942//  const SLanguage *l3 = GetLanguageByCode(user->GetLanguage(2)); 
    914943 
    915944    gchar bday[11]; 
    916945    gchar age[6]; 
    917946 
    918     if(iu->user->GetAge() != 65535) 
    919         sprintf(age, "%hd", iu->user->GetAge()); 
     947    if(user->GetAge() != 65535) 
     948        sprintf(age, "%hd", user->GetAge()); 
    920949    else 
    921950        strcpy(age, "N/A"); 
    922951 
    923     if(iu->user->GetBirthMonth() == 0 || iu->user->GetBirthDay() == 0) 
     952    if(user->GetBirthMonth() == 0 || user->GetBirthDay() == 0) 
    924953        strcpy(bday, "N/A"); 
    925954    else 
    926         sprintf(bday, "%d/%d/%d", iu->user->GetBirthMonth(), 
    927             iu->user->GetBirthDay(), iu->user->GetBirthYear()); 
     955        sprintf(bday, "%d/%d/%d", user->GetBirthMonth(), 
     956            user->GetBirthDay(), user->GetBirthYear()); 
    928957 
    929958    switch(type) 
     
    932961    case USER_BASIC: 
    933962    case USER_EXT: 
    934         gtk_entry_set_text(GTK_ENTRY(iu->alias), iu->user->GetAlias()); 
    935         gtk_entry_set_text(GTK_ENTRY(iu->fname), 
    936                    iu->user->GetFirstName()); 
    937         gtk_entry_set_text(GTK_ENTRY(iu->lname), 
    938                    iu->user->GetLastName()); 
    939         gtk_entry_set_text(GTK_ENTRY(iu->email1), 
    940                    iu->user->GetEmailPrimary()); 
    941         gtk_entry_set_text(GTK_ENTRY(iu->email2), 
    942                    iu->user->GetEmailSecondary()); 
    943         gtk_entry_set_text(GTK_ENTRY(iu->oldemail), 
    944                    iu->user->GetEmailOld()); 
    945         gtk_entry_set_text(GTK_ENTRY(iu->address), 
    946                    iu->user->GetAddress()); 
    947         gtk_entry_set_text(GTK_ENTRY(iu->city), iu->user->GetCity()); 
    948         gtk_entry_set_text(GTK_ENTRY(iu->state), iu->user->GetState()); 
    949         gtk_entry_set_text(GTK_ENTRY(iu->zip), iu->user->GetZipCode()); 
     963        gtk_entry_set_text(GTK_ENTRY(iu->alias), user->GetAlias()); 
     964        gtk_entry_set_text(GTK_ENTRY(iu->fname), user->GetFirstName()); 
     965        gtk_entry_set_text(GTK_ENTRY(iu->lname), user->GetLastName()); 
     966        gtk_entry_set_text(GTK_ENTRY(iu->email1), user->GetEmailPrimary()); 
     967        gtk_entry_set_text(GTK_ENTRY(iu->email2), user->GetEmailSecondary()); 
     968        gtk_entry_set_text(GTK_ENTRY(iu->oldemail), user->GetEmailOld()); 
     969        gtk_entry_set_text(GTK_ENTRY(iu->address), user->GetAddress()); 
     970        gtk_entry_set_text(GTK_ENTRY(iu->city), user->GetCity()); 
     971        gtk_entry_set_text(GTK_ENTRY(iu->state), user->GetState()); 
     972        gtk_entry_set_text(GTK_ENTRY(iu->zip), user->GetZipCode()); 
    950973         
    951974        if(country == 0) 
     
    957980 
    958981        gtk_entry_set_text(GTK_ENTRY(iu->phone), 
    959                    iu->user->GetPhoneNumber()); 
     982                   user->GetPhoneNumber()); 
    960983        gtk_ent