TclApps Library Source Code
Check-in [940345d5fa]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:* tkchat.tcl (::tkchat::Smile): Unset IMGre before reinitializing the emoticons, or it will keep growing. Only reinitialize when it was explicitly asked for (i.e. not on re-logins).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 940345d5fa02bf0fff742342db943e749b63bbda
User & Date: rmax 2009-09-24 10:40:31.000
Context
2009-10-15
20:52
Fixed typo in nickchange message check-in: 516d875231 user: patthoyts tags: trunk
2009-09-24
10:40
* tkchat.tcl (::tkchat::Smile): Unset IMGre before reinitializing the emoticons, or it will keep growing. Only reinitialize when it was explicitly asked for (i.e. not on re-logins). check-in: 940345d5fa user: rmax tags: trunk
2009-08-13
00:57
Fix [Bug 2814771]. In color configuration dialog, the wrong row was being given the weight for resize. check-in: eded3573f8 user: eee tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to apps/tkchat/ChangeLog.






1
2
3
4
5
6
7






2009-08-12  Elchonon Edelson <[email protected]>

	* tkchat.tcl: Fix [Bug 2814771]. In color configuration dialog,
	the wrong row was being given the weight for resize.

2009-07-02  Pat Thoyts  <[email protected]>

>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2009-09-24  Reinhard Max  <[email protected]>

	* tkchat.tcl (::tkchat::Smile): Unset IMGre before reinitializing
	the emoticons, or it will keep growing. Only reinitialize when it
	was explicitly asked for (i.e. not on re-logins).

2009-08-12  Elchonon Edelson <[email protected]>

	* tkchat.tcl: Fix [Bug 2814771]. In color configuration dialog,
	the wrong row was being given the weight for resize.

2009-07-02  Pat Thoyts  <[email protected]>

Changes to apps/tkchat/tkchat.tcl.
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
    }
}

namespace eval ::tkchat {
    variable chatWindowTitle "The Tcler's Chat"

    variable HEADUrl {http://tcllib.cvs.sourceforge.net/*checkout*/tcllib/tclapps/apps/tkchat/tkchat.tcl?revision=HEAD}
    variable rcsid   {$Id: tkchat.tcl,v 1.474 2009/08/13 00:57:28 eee Exp $}

    variable MSGS
    set MSGS(entered) [list \
	    "%user% has entered the chat!" \
	    "Out of a cloud of smoke, %user% appears!" \
	    "%user% saunters in." \
	    "%user% wanders in." \







|







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
    }
}

namespace eval ::tkchat {
    variable chatWindowTitle "The Tcler's Chat"

    variable HEADUrl {http://tcllib.cvs.sourceforge.net/*checkout*/tcllib/tclapps/apps/tkchat/tkchat.tcl?revision=HEAD}
    variable rcsid   {$Id: tkchat.tcl,v 1.475 2009/09/24 10:40:31 rmax Exp $}

    variable MSGS
    set MSGS(entered) [list \
	    "%user% has entered the chat!" \
	    "Out of a cloud of smoke, %user% appears!" \
	    "%user% saunters in." \
	    "%user% wanders in." \
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
        -label [mc "&Animate emoticons"] \
        -variable Options(AnimEmoticons) \
        -onvalue 1 \
        -offvalue 0 \
        -command ::tkchat::DoAnim
    tk::AmpMenuArgs $m add command \
        -label [mc "U&pdate emoticons"] \
        -command { ::tkchat::Smile }
    # Insert Cascade Menu
    menu $m.mnu -tearoff 0
    tk::AmpMenuArgs $m add cascade -menu $m.mnu \
        -label [mc "&Insert"]

    ## Visibility Menu
    ##







|







2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
        -label [mc "&Animate emoticons"] \
        -variable Options(AnimEmoticons) \
        -onvalue 1 \
        -offvalue 0 \
        -command ::tkchat::DoAnim
    tk::AmpMenuArgs $m add command \
        -label [mc "U&pdate emoticons"] \
        -command { ::tkchat::Smile 1 }
    # Insert Cascade Menu
    menu $m.mnu -tearoff 0
    tk::AmpMenuArgs $m add cascade -menu $m.mnu \
        -label [mc "&Insert"]

    ## Visibility Menu
    ##
5825
5826
5827
5828
5829
5830
5831
5832
5833









5834

5835
5836
5837
5838
5839
5840
5841
    if { [info exists ::tkchat::IMGre] } {
	append ::tkchat::IMGre |[string map $map $ids]
    } else {
	set ::tkchat::IMGre [string map $map $ids]
    }
}

proc ::tkchat::Smile {} {
    variable IMG









    array unset IMG; # needed for reload


    namespace eval ::tkchat::img {
        variable delay 150
    }
    
    # create a slave interpreter with no commands in it.
    set slave [interp create -safe]







|

>
>
>
>
>
>
>
>
>
|
>







5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
    if { [info exists ::tkchat::IMGre] } {
	append ::tkchat::IMGre |[string map $map $ids]
    } else {
	set ::tkchat::IMGre [string map $map $ids]
    }
}

proc ::tkchat::Smile {{force 0}} {
    variable IMG
    variable IMGre

    if {[info exists IMGre] && !$force} {
        # The smileys have already been initialized and
        # re-initialisation wasn't enforced
        return
    }

    # needed for reload
    array unset IMG
    unset -nocomplain IMGre

    namespace eval ::tkchat::img {
        variable delay 150
    }
    
    # create a slave interpreter with no commands in it.
    set slave [interp create -safe]