Changeset 2139 for trunk/jons-gtk-gui

Show
Ignore:
Timestamp:
07/13/00 13:10:28 (8 years ago)
Author:
emojon
Message:

Auto secure, works when the user comes from offline to any other status.

Location:
trunk/jons-gtk-gui/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/jons-gtk-gui/src/contact_list.cpp

    r2130 r2139  
    2727#include <gtk/gtk.h> 
    2828#include <sys/time.h> 
     29#include <list.h> 
    2930 
    3031GdkColor *red, *blue, *online_color, *offline_color, *away_color; 
     
    3233    *invisible, *message_icon, *file_icon, *chat_icon, *url_icon, 
    3334    *secure_icon, *birthday_icon, *securebday_icon; 
     35 
     36list<unsigned long> AutoSecureList; 
    3437 
    3538GtkWidget *contact_list_new(gint height, gint width) 
     
    228231        } // else 
    229232 
     233        // See if they are not offline and want to be auto secured 
     234        if(pUser->AutoSecure()) 
     235        { 
     236            // Ok, now *can* they be auto secured? 
     237            if((pUser->SecureChannelSupport() == SECURE_CHANNEL_SUPPORTED) && !pUser->Secure()) 
     238                AutoSecureList.push_back(pUser->Uin()); 
     239                //icq_daemon->icqOpenSecureChannel(_uin); 
     240        } 
     241 
    230242        if(pUser->Secure() && (pUser->Birthday() == 0)) 
    231243        { 
     
    259271    } 
    260272    FOR_EACH_USER_END 
     273 
     274    // Now do the auto secure stuff 
     275    list<unsigned long>::iterator it; 
     276    for(it = AutoSecureList.begin(); it != AutoSecureList.end(); it++) 
     277    { 
     278        icq_daemon->icqOpenSecureChannel(*it); 
     279    } 
     280 
     281    AutoSecureList.clear(); 
    261282 
    262283    gtk_clist_set_compare_func(GTK_CLIST(contact_list), NULL); 
  • trunk/jons-gtk-gui/src/licq_gtk.h

    r2130 r2139  
    157157    GtkWidget *autochat; 
    158158    GtkWidget *autofile; 
     159    GtkWidget *autosecure; 
    159160    GtkWidget *realip; 
    160161    GtkWidget *visible; 
  • trunk/jons-gtk-gui/src/more_window.cpp

    r2095 r2139  
    7171                     mw->user->OnlineNotify()); 
    7272 
    73     // Auto accept chat and file 
     73    // Auto accept chat and file and auto secure 
    7474    mw->autochat = gtk_check_button_new_with_label("Auto Accept Chat"); 
    7575    mw->autofile = gtk_check_button_new_with_label("Auto Accept File"); 
     76    mw->autosecure = gtk_check_button_new_with_label("Auto Request Secure"); 
    7677 
    7778    // Set the state of the auto accept buttons 
     
    8081    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mw->autofile), 
    8182        mw->user->AutoFileAccept()); 
     83    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mw->autosecure), 
     84        mw->user->AutoSecure()); 
    8285 
    8386    mw->realip = gtk_check_button_new_with_label("Use Real IP (LAN)"); 
     
    98101    gtk_box_pack_start(GTK_BOX(general_box), mw->autochat, FALSE, FALSE, 5); 
    99102    gtk_box_pack_start(GTK_BOX(general_box), mw->autofile, FALSE, FALSE, 5); 
     103    gtk_box_pack_start(GTK_BOX(general_box), mw->autosecure, FALSE, FALSE, 5); 
    100104    gtk_box_pack_start(GTK_BOX(general_box), mw->realip, FALSE, FALSE, 5); 
    101105    gtk_box_pack_start(GTK_BOX(general_box), mw->ignore, FALSE, FALSE, 5); 
     
    281285        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mw->autofile))); 
    282286 
     287    mw->user->SetAutoSecure( 
     288        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mw->autosecure))); 
    283289    mw->user->SetSendRealIp( 
    284290        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mw->realip)));