Hi there,

Don't you think the offline contacts should appear in the contact ->
delete window ? I do not agree with the actual thing, so I made a
simple patch to add offline contacts in that list :

Index: gui.tcl
===================================================================
--- gui.tcl     (revision 10376)
+++ gui.tcl     (working copy)
 -4451,7 +4451,7 @@
        #add contact
        $conts add command -label "[trans addacontact]..." -command
cmsn_draw_addcontact -state disabled
        #remove contact
-       $conts add command -label "[trans delete]..." -command [list
::amsn::ShowUserList [trans delete] ::amsn::deleteUser] -state
disabled
+       $conts add command -label "[trans delete]..." -command [list
::amsn::ShowUserList [trans delete] ::amsn::deleteUser 1] -state
disabled
        #contact properties
        $conts add command -label "[trans properties]..." -command
[list ::amsn::ShowUserList [trans properties]
::abookGui::showUserProperties] -state disabled
        #-------------------

But now, I think that when offline contacts are displayed, there is no
need to display the "Others" button, so I decide to do not display it
when $show_offline is set to 1. I tried to see in which case I could
have wrong, and I don't find it but I've certainly made a mistake. If
it's not the case, here is the little patch :

@@ -2646,7 +2646,13 @@
                if {$show_nonim} {
                        lappend userlist [list "[::abook::getDisplayNick 
$user_login]
($user_login)" $user_login]
                }
-               ::amsn::listChoose $title $userlist $command 1 1
+
+               if {$show_offlines} {
+                       set disp_others 0
+               } else {
+                       set disp_others 1
+               }
+               ::amsn::listChoose $title $userlist $command $disp_others 1
        }

Another thing : I didn't understood the meaning of the "nonim" option
in that procedure, and same with the option "skip" of
::amsn::listChoose (the "1" in the last line), so I may have did
something wrong in that patch, so if someone can check it...

Finally, here is the complete diff :

 Index: gui.tcl
===================================================================
--- gui.tcl     (revision 10376)
+++ gui.tcl     (working copy)
@@ -2646,7 +2646,13 @@
                if {$show_nonim} {
                        lappend userlist [list "[::abook::getDisplayNick 
$user_login]
($user_login)" $user_login]
                }
-               ::amsn::listChoose $title $userlist $command 1 1
+
+               if {$show_offlines} {
+                       set disp_others 0
+               } else {
+                       set disp_others 1
+               }
+               ::amsn::listChoose $title $userlist $command $disp_others 1
        }


@@ -4451,7 +4457,7 @@
        #add contact
        $conts add command -label "[trans addacontact]..." -command
cmsn_draw_addcontact -state disabled
        #remove contact
-       $conts add command -label "[trans delete]..." -command [list
::amsn::ShowUserList [trans delete] ::amsn::deleteUser] -state
disabled
+       $conts add command -label "[trans delete]..." -command [list
::amsn::ShowUserList [trans delete] ::amsn::deleteUser 1] -state
disabled
        #contact properties
        $conts add command -label "[trans properties]..." -command [list
::amsn::ShowUserList [trans properties]
::abookGui::showUserProperties] -state disabled
        #-------------------


-- 
ubitux

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to