Tkabber contrib

Check-in [1851100a7a]
Login

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

Overview
Comment:Juick plugin (svn branch): * Fix bug with thread subscribe from JuBo chat. * Add thread unsubscribe command to context chat menu.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1851100a7a9bf0fbd5a886a2eb3056a8f633804b
User & Date: toktonada 2012-09-07 22:34:10
Context
2012-12-21
13:08
1) Fixed bug in tabbedcon plugin in using of geometry manager for tcl/tk8.6 check-in: c1bb813081 user: ancestor tags: trunk
2012-09-07
22:34
Juick plugin (svn branch): * Fix bug with thread subscribe from JuBo chat. * Add thread unsubscribe command to context chat menu. check-in: 1851100a7a user: toktonada tags: trunk
2012-08-23
13:33
* green.tcl: Do not reconnect to a connection if it's already connecting. * README, INSTALL: Added a few words about dbus-tcl. check-in: 7e2bbab796 user: sgolovan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to juick/juick.tcl.

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
...
422
423
424
425
426
427
428
429
430





431
432
433
434
435
436
437
438
439

440
441
442
443
444





445
446
447
448
449
450
451
proc insert_from_window {chatid w x y} {
    variable options
    set thing ""
    set cw [chat::chat_win $chatid]
    set ci [chat::input_win $chatid]
    set jid [::xmpp::jid::removeResource [chat::get_jid $chatid]]


    set tags [$cw tag names "@$x,$y"]

    if {[set idx [lsearch -glob $tags JUICK-*]] >= 0} {
        set thing [string range [lindex $tags $idx] 6 end]
    }

    if {$thing == ""} return
................................................................................
    $m add command -label [::msgcat::mc \
        "\[J\] Open thing in browser."] \
        -command [list [namespace current]::browse_thing $chatwin $thing]

    if {[regexp {#\d+$} $thing]} {
        $m add command -label [::msgcat::mc \
            "\[J\] Subscribe to $thing replies."] \
            -command [list [namespace current]::subscribe_to \
            $chatwin $thing]






        $m add command -label [::msgcat::mc \
            "\[J\] Open thread in new tab."] \
            -command [list [namespace current]::get_juick_thread \
            $chatwin $thing]
    }
}

proc subscribe_to {w thing} {

    set cw [join [lrange [split $w .] 0 end-1] .]
    set chatid [chat::winid_to_chatid $cw]
    set xlib [chat::get_xlib $chatid]
    set jid [chat::get_jid $chatid]
    set body "S $thing"






    message::send_msg $xlib $jid -type chat -body $body
}

proc get_juick_thread {w thing} {
    set cw [join [lrange [split $w .] 0 end-1] .]
    set chatid [chat::winid_to_chatid $cw]







<







 







|
|
>
>
>
>
>








|
>




<
>
>
>
>
>







374
375
376
377
378
379
380

381
382
383
384
385
386
387
...
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448

449
450
451
452
453
454
455
456
457
458
459
460
proc insert_from_window {chatid w x y} {
    variable options
    set thing ""
    set cw [chat::chat_win $chatid]
    set ci [chat::input_win $chatid]
    set jid [::xmpp::jid::removeResource [chat::get_jid $chatid]]


    set tags [$cw tag names "@$x,$y"]

    if {[set idx [lsearch -glob $tags JUICK-*]] >= 0} {
        set thing [string range [lindex $tags $idx] 6 end]
    }

    if {$thing == ""} return
................................................................................
    $m add command -label [::msgcat::mc \
        "\[J\] Open thing in browser."] \
        -command [list [namespace current]::browse_thing $chatwin $thing]

    if {[regexp {#\d+$} $thing]} {
        $m add command -label [::msgcat::mc \
            "\[J\] Subscribe to $thing replies."] \
            -command [list [namespace current]::send_to_juick \
            $chatwin "S $thing"]

        $m add command -label [::msgcat::mc \
            "\[J\] Unsubscribe from $thing replies."] \
            -command [list [namespace current]::send_to_juick \
            $chatwin "U $thing"]

        $m add command -label [::msgcat::mc \
            "\[J\] Open thread in new tab."] \
            -command [list [namespace current]::get_juick_thread \
            $chatwin $thing]
    }
}

proc send_to_juick {w body} {
    variable options
    set cw [join [lrange [split $w .] 0 end-1] .]
    set chatid [chat::winid_to_chatid $cw]
    set xlib [chat::get_xlib $chatid]
    set jid [chat::get_jid $chatid]


    if {![is_juick_jid $jid]} {
        set mainchat [chat::chatid $xlib $options(main_jid)]
        set jid [chat::get_jid $mainchat]
    }

    message::send_msg $xlib $jid -type chat -body $body
}

proc get_juick_thread {w thing} {
    set cw [join [lrange [split $w .] 0 end-1] .]
    set chatid [chat::winid_to_chatid $cw]