SetupTreeEditor

Here is room for additional scripts for Gamers.IRC.

You are highly advised to read the How-To first!
User avatar
Tuxman
Administrator
Posts: 1873
Joined: 24.10.2003 00:13
Status: That guy
Contact:

SetupTreeEditor

Unread postby Tuxman » 20.06.2012 17:35

You can edit the /setup tree on the left side of the window with this simple dialog. To open it, use the command /treeedit.

Code: Select all

dialog tblTreeEdit {
  title "Gamers.IRC Tree Editor"
  size -1 -1 100 117
  option dbu
  text "Group (closed):", 1, 1 44 64 8
  text "Group (expanded):", 2, 1 55 64 8
  text "Node:", 3, 1 66 64 8
  text "Item:", 4, 1 77 64 8
  edit "", 5, 67 43 20 10, limit 1
  edit "", 6, 67 54 20 10, limit 1
  edit "", 7, 67 65 20 10, limit 1
  edit "", 8, 67 76 20 10, limit 1
  text "", 9, 1 2 96 40
  button "Reset", 10, 1 102 27 12
  button "Save", 11, 72 102 27 12, ok default
  button "Insert Unicode characters", 12, 1 88 98 12
}

on *:load:{
  ; aktuelle Einträge zwischenspeichern (für Reset)
  writeini bin/ini/treeview.ini tvsettings oldplus $readini(bin/ini/treeview.ini,tvsettings,plus)
  writeini bin/ini/treeview.ini tvsettings oldminus $readini(bin/ini/treeview.ini,tvsettings,minus)
  writeini bin/ini/treeview.ini tvsettings oldmain $readini(bin/ini/treeview.ini,tvsettings,main)
  writeini bin/ini/treeview.ini tvsettings oldlink $readini(bin/ini/treeview.ini,tvsettings,link)
}

on *:dialog:tblTreeEdit:init:*:{
  treeedit_reload
  did -ra $dname 9 This dialog will allow you to edit the symbols used for the tree view in the Gamers.IRC Setup dialog. $+ $crlf $+ $crlf $+ Note that changes will be applied after reopening the Setup dialog.
}

on *:dialog:tblTreeEdit:sclick:*:{
  if ($did == 10) {
    writeini bin/ini/treeview.ini tvsettings plus $readini(bin/ini/treeview.ini,tvsettings,oldplus)
    writeini bin/ini/treeview.ini tvsettings minus $readini(bin/ini/treeview.ini,tvsettings,oldminus)
    writeini bin/ini/treeview.ini tvsettings main $readini(bin/ini/treeview.ini,tvsettings,oldmain)
    writeini bin/ini/treeview.ini tvsettings link $readini(bin/ini/treeview.ini,tvsettings,oldlink)
    treeedit_reload
  }
  elseif ($did == 11) {
    writeini bin/ini/treeview.ini tvsettings plus $$did($dname,5).text
    writeini bin/ini/treeview.ini tvsettings minus $$did($dname,6).text
    writeini bin/ini/treeview.ini tvsettings main $$did($dname,7).text
    writeini bin/ini/treeview.ini tvsettings link $$did($dname,8).text
  }
  elseif ($did == 12) {
    ; open character map
    r charmap
  }
}

alias treeedit { dialog -m tblTreeEdit tblTreeEdit }
alias -l treeedit_reload {
  did -ra tblTreeEdit 5 $readini(bin/ini/treeview.ini,tvsettings,plus)
  did -ra tblTreeEdit 6 $readini(bin/ini/treeview.ini,tvsettings,minus)
  did -ra tblTreeEdit 7 $readini(bin/ini/treeview.ini,tvsettings,main)
  did -ra tblTreeEdit 8 $readini(bin/ini/treeview.ini,tvsettings,link)
}
^\__/
..O.o

This is Einkaufswagen. Copy Einkaufswagen into your signature to help him on his way to world domination.

Who is online

Users browsing this forum: No registered users and 1 guest