Tkabber

Check-in [f14959bebf]
Login

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

Overview
Comment:Renamed user_avatar_notification_hook to user_avatar_pep_notification_hook to prevent clashing with the avatarcache plugin in contrib.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f14959bebfc436e1c4ee42fd9eda553bdffafee8
User & Date: sgolovan 2016-02-04 05:37:50
Context
2016-02-04
15:44
Cleaned up the code, removed all kinds of commands for getting idle time except for the [tk inactive]. check-in: 811798a24b user: sgolovan tags: trunk
05:37
Renamed user_avatar_notification_hook to user_avatar_pep_notification_hook to prevent clashing with the avatarcache plugin in contrib. check-in: f14959bebf user: sgolovan tags: trunk
2016-02-01
15:50
Don't panic if the register window is already destroyed when registration answer is received. check-in: 83d485a207 user: sgolovan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.







1
2
3
4
5
6
7






2016-02-01  Sergei Golovan  <sgolovan@nes.ru>

	* plugins/general/gpgme.tcl: Don't draw the signed/encrypted message
	  icon for outgoing messages in groupchats because only drawing
	  incoming messages makes sense there.

	* register.tcl: Don't panic if the register window is already destroyed
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2016-02-04  Sergei Golovan  <sgolovan@nes.ru>

	* plugins/pep/user_avatar.tcl: Renamed user_avatar_notification_hook
	  to user_avatar_pep_notification_hook to prevent clashing with the
	  avatarcache plugin in contrib.

2016-02-01  Sergei Golovan  <sgolovan@nes.ru>

	* plugins/general/gpgme.tcl: Don't draw the signed/encrypted message
	  icon for outgoing messages in groupchats because only drawing
	  incoming messages makes sense there.

	* register.tcl: Don't panic if the register window is already destroyed

Changes to plugins/pep/user_avatar.tcl.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    custom::defvar options(auto-subscribe) 0 \
        [::msgcat::mc "Auto-subscribe to other's user avatar notifications."] \
        -command [namespace current]::register_in_disco \
        -group PEP -type boolean

    pubsub::register_event_notification_handler $metadata_node \
            [namespace current]::process_avatar_notification
    hook::add user_avatar_notification_hook \
            [namespace current]::notify_via_status_message

    hook::add finload_hook \
            [namespace current]::on_init 60
    hook::add connected_hook \
            [namespace current]::on_connect_disconnect
    hook::add disconnected_hook \







|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    custom::defvar options(auto-subscribe) 0 \
        [::msgcat::mc "Auto-subscribe to other's user avatar notifications."] \
        -command [namespace current]::register_in_disco \
        -group PEP -type boolean

    pubsub::register_event_notification_handler $metadata_node \
            [namespace current]::process_avatar_notification
    hook::add user_avatar_pep_notification_hook \
            [namespace current]::notify_via_status_message

    hook::add finload_hook \
            [namespace current]::on_init 60
    hook::add connected_hook \
            [namespace current]::on_connect_disconnect
    hook::add disconnected_hook \
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
        }
    }

    if {$parsed} {
        foreach f $fields {
            set avatar($f,$xlib,$jid) [set $f]
        }
        hook::run user_avatar_notification_hook $xlib $jid 1
    } elseif {$retract} {
        foreach f $fields {
            catch {unset avatar($f,$xlib,$jid)}
        }
        hook::run user_avatar_notification_hook $xlib $jid 0
    }
}

proc avatar::notify_via_status_message {xlib jid set} {
    set contact [::roster::itemconfig $xlib $jid -name]
    if {$contact == ""} {
        set contact $jid







|




|







206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
        }
    }

    if {$parsed} {
        foreach f $fields {
            set avatar($f,$xlib,$jid) [set $f]
        }
        hook::run user_avatar_pep_notification_hook $xlib $jid 1
    } elseif {$retract} {
        foreach f $fields {
            catch {unset avatar($f,$xlib,$jid)}
        }
        hook::run user_avatar_pep_notification_hook $xlib $jid 0
    }
}

proc avatar::notify_via_status_message {xlib jid set} {
    set contact [::roster::itemconfig $xlib $jid -name]
    if {$contact == ""} {
        set contact $jid