Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ########################
- ; #*******Dialogs********#
- ; ########################
- alias favorite {
- var %nw $hget(nth, $network) | var %i $hget(nth, $+(Favs,%nw))
- if ($1) { var %i $addtok(%i, $1, 4) | hadd nth Favs %i | halt }
- dialog -mdrvo fav fav
- var %x $numtok(%i, 4), %y 1
- while (%y <= %x) { did -a fav 1 $gettok(%i,%y,4) | inc %y }
- }
- dialog fav {
- title "Favorite Channels"
- size -1 -1 346 283
- option pixels
- list 1, 22 28 300 195, size
- button "Add", 3, 24 234 88 24, flat
- button "Remove", 2, 126 234 88 24, flat
- button "Join", 4, 228 234 88 24, flat default
- box "Favorite Channel List", 5, 10 8 324 262
- }
- on *:dialog:fav:sclick:*: {
- var %i $did
- if (!$did(fav,1,1).sel) { halt }
- if (%i == 4) { join $did(fav,1).seltext }
- elseif (%i == 2) {
- var %nw $hget(nth, $network)
- hadd nth Favs $remtok( $hget(nth, $+(Favs,%nw)), $did(fav,1).seltext, 1, 4)
- var %i $hget(nth, $+(Favs,%nw)), %x $numtok(%i, 4), %y 1, %s $did(fav,1,1).sel
- did -r fav 1
- while (%y <= %x) { did -a recent 1 $gettok(%i,%y,4) | inc %y }
- did -cf fav 1 %s
- }
- elseif (%i == 3) { if (!$hget(nth, $network)) { hadd nth $network $network } | var %nw $hget(nth, $network) | if (!$hget(nth, $+(favs,%nw))) { hadd nth $+(favs,%nw) favorite $active } }
- }
- on *:dialog:fav:dclick:*: { if ($did == 1) { join $did(fav,1).seltext } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement