HI.
With this diff file some messages are showed with icons (and fix a bug if an
user doesn't use desktop integration plugin)
Thanks, bye.
Index: contactlist.tcl
===================================================================
--- contactlist.tcl     (revision 8915)
+++ contactlist.tcl     (working copy)
@@ -291,7 +291,7 @@
                        set name $groupid
                }
                $self AddGroup $groupid $name
-               #tk_messageBox -message "Successfully added group '$name'" 
-type ok
+               #::amsn::messageBox "Successfully added group '$name'" ok info
        }
 
        method groupAddFailed { } {
@@ -319,7 +319,7 @@
                        set groupid "nogroup"
                }
                $self AddContact $groupid $id $_nick $_psm $_music $_state
-               #tk_messageBox -message "Successfully added contact '$id'" 
-type ok
+               #::amsn::messageBox "Successfully added contact '$id'" ok info
        }
 
        method contactAddFailed { id } {
Index: hotmail.tcl
===================================================================
--- hotmail.tcl (revision 8915)
+++ hotmail.tcl (working copy)
@@ -199,8 +199,7 @@
        }
 
        proc askReadReceivedOIMs { oim_count oim_messages } {
-               set answer [tk_messageBox -type yesno -title "[trans newoim]" \
-                       -message [trans receivedoimread $oim_count]]
+               set answer [::amsn::messageBox "[trans receivedoimread 
$oim_count]" yesno question "[trans newoim]" ]
                if { $answer == "yes" } {
                        ::OIM_GUI::MessagesReceived $oim_messages
                }
Index: bugs.tcl
===================================================================
--- bugs.tcl    (revision 8915)
+++ bugs.tcl    (working copy)
@@ -358,7 +358,7 @@
        global HOME2
        variable w
        if {$::bugs::bug(comment)==""} {
-           if {[tk_messageBox -type okcancel -message [trans 
bugnocomment]]=="cancel"} {
+           if {[::amsn::messageBox "[trans bugnocomment]" okcancel 
question]=="cancel"} {
                return
            }
        }
@@ -374,7 +374,7 @@
            set message [trans bugerror]
        }
 
-       tk_messageBox -message "$message" -title [trans done] -type ok
+       ::amsn::messageBox "$message" ok info "[trans done]"
        
        $w.f.b1 configure -text [trans done] -state active -command "set 
::bugs::closed_bug_window 1"
     }
Index: protocol.tcl
===================================================================
--- protocol.tcl        (revision 8915)
+++ protocol.tcl        (working copy)
@@ -979,6 +979,7 @@
                catch {InitPref 1}
 
                set automessage "-1"
+               set ::contactlist_loaded 0
 
                ::plugins::PostEvent OnDisconnect evPar
 
Index: plugins.tcl
===================================================================
--- plugins.tcl (revision 8915)
+++ plugins.tcl (working copy)
@@ -981,6 +981,7 @@
 
                if {$save} { ::plugins::save_config }
 
+               namespace delete ::${namespace}
        }
 
 
Index: gui.tcl
===================================================================
--- gui.tcl     (revision 8915)
+++ gui.tcl     (working copy)
@@ -593,16 +593,16 @@
 
        
#///////////////////////////////////////////////////////////////////////////////
 
-       proc messageBox { message type icon {title ""} {parent ""}} {
+       proc messageBox { message type {icon "info"} {title ""} {parent ""} 
{default ""}} {
                #If we are on MacOS X, don't put the box in the parent because 
there are some problems
                if { [OnMac] } {
-                       set answer [tk_messageBox -message "$message" -type 
$type -icon $icon]
+                       set answer [tk_messageBox -message "$message" -type 
$type -icon $icon -default $default]
                } else {
                        if { $parent == ""} {
                                set parent [focus]
                                if { $parent == "" } { set parent "." }
                        }
-                               set answer [tk_messageBox -message "$message" 
-type $type -icon $icon -title $title -parent $parent]
+                               set answer [tk_messageBox -message "$message" 
-type $type -icon $icon -title $title -parent $parent -default $default]
                }
                return $answer
        }
@@ -2572,7 +2572,7 @@
                        set nick [::config::getKey p4c_name]
                        set p4c 1
                } else {
-                       set nick [::abook::getPersonal MFN]
+                       set nick [::abook::removeStyles 
[::abook::getVolatileData myself parsed_MFN]]
                        set p4c 0
                }
                
@@ -4105,7 +4106,7 @@
 
 proc ShowFirstTimeMenuHidingFeature { parent } {
 #TODO: Make this a ::amsn::MessageBox so Desktop Integration works ?
-    return [expr [tk_messageBox -default no -icon warning -title [trans 
hidemenu] -message [trans hidemenumessage] -parent $parent -type yesno] == yes]
+    return [expr [::amsn::messageBox "[trans hidemenumessage]" yesno warning 
"[trans hidemenu]" "$parent" no] == yes]
 }
 
 proc Showhidemenu { {toggle 0} } {
@@ -6270,12 +6271,12 @@
        set pos 0
        set url_indices {}
        #this regexp is a bit complex, but it reaches all URLs as specified in 
the RFC 1738 on http://www.ietf.org/rfc/rfc1738.txt
-       while { [regexp -start $pos -indices {(\w+)://([\%\/\$\*\~\,\!\'[EMAIL 
PROTECTED];\:\^\&\_[:alnum:]]+)} $str url_indices ] } {
+       while { [regexp -start $pos -indices {(\w+)://([\%\/\$\*\~\,\!\'[EMAIL 
PROTECTED];\:\^\&\_\(\)\[\]\{\}\`\"\\[:alnum:]]+)} $str url_indices ] } {
                set pos [lindex $url_indices 1]
                lappend list2return [lindex $url_indices 0] $pos
        }
        set pos 0
-       while { [regexp -start $pos -indices {www.([\%\/\$\*\~\,\!\'[EMAIL 
PROTECTED];\:\^\&\_[:alnum:]]+)} $str url_indices ] } {
+       while { [regexp -start $pos -indices {www.([\%\/\$\*\~\,\!\'[EMAIL 
PROTECTED];\:\^\&\_\(\)\[\]\{\}\`\"\\[:alnum:]]+)} $str url_indices ] } {
                set pos [lindex $url_indices 1]
                set pos_start [lindex $url_indices 0]
                #check if the url was not found before
@@ -7324,7 +7326,7 @@
                if { [set ::OIM_GUI::oim_asksend_[string map {: _} ${chatid} ]] 
&& $window != 0} {
                # should fix issue with automessages from alarms since the 
window is not yet created and the user has just gone offline
                # in that case, should we send the message ? ask to send the 
message ? for the moment we send it without asking
-                       set answer [tk_messageBox -type yesno -parent $window 
-message "[trans asksendoim]"]
+                       set answer [::amsn::messageBox "[trans asksendoim]" 
yesno question "" "$window"]
                } else {
                        set answer "yes"
                }
@@ -7496,14 +7498,13 @@
                }
     }
 
-    proc GetChatId { user } {
-                       set chatid $user
-                       set win [::ChatWindow::For $chatid]
-                       if {$win != 0 && [winfo exists $win] } {
-                               return $chatid
-                       } else {
-                               return 0
-                       }
+    proc GetChatId { chatid } {
+       set win [::ChatWindow::For $chatid]
+       if {$win != 0 && [winfo exists $win] } {
+               return $chatid
+       } else {
+               return 0
+       }
     }
 
 }
Index: desktop_integration.tcl
===================================================================
--- desktop_integration.tcl     (revision 7530)
+++ desktop_integration.tcl     (working copy)
@@ -395,7 +395,7 @@
        }       
 
        #### Message Box dialog: info boxes, error boxes and yes-no questions  
#####
-       proc KmessageBox { {message "" } {type "ok"} {icon ""} {title ""} 
{parent ""}} {
+       proc KmessageBox { {message "" } {type "ok"} {icon ""} {title ""} 
{parent ""} {default ""}} {
                variable current_desktop
                variable plugin_name
 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to