Reflex — File Browser

Reflexv0.1 / Reflexv0.1 / Reflex / system / scripts / options.mrc

options.mrc — 5.8 KB — Download this file

alias options {
  if (!$dialog(options)) { dialog -m options options }
  else { dialog -v options options }
}
dialog options {
  title "Options"
  size -1 -1 270 161
  option dbu
  icon C:\Documents and Settings\Allen\My Documents\me_0003.jpg, 0
  list 1, 2 2 43 143, size
  edit "  General", 2, 48 2 219 14, read
  button "Cancel", 3, 233 147 33 12, cancel
  button "OK", 4, 195 147 34 12, default ok
  box "Software Updates", 6, 49 17 218 49
  check "Reflex should check for updates to Reflex.", 7, 55 28 205 10
  check "Reflex should check for updates to mIRC.", 8, 55 52 205 10
  check "Auto update outdated scripts with the newer version. ", 9, 65 40 195 10
  box "Connection Settings", 10, 49 67 218 25
  text "Set up proxies for connection to servers and dcc.", 11, 55 78 146 8
  button "Connection Settings...", 12, 203 76 59 12
  box "Switchbar", 5, 49 30 218 61, hide
  check "Show Icons", 13, 54 66 53 10, hide left
  check "Show Gripper", 14, 54 78 53 10, hide left
  text "Posistion", 15, 55 42 32 8, hide
  radio "Top", 16, 100 41 35 10, hide group
  radio "Bottom", 17, 141 41 39 10, hide
  text "Border Style", 18, 55 54 32 8, hide
  radio "Heavy", 19, 100 53 35 10, hide group
  radio "Light", 20, 141 53 39 10, hide
  box "Toolbar", 21, 49 92 218 53, hide
  text "Posistion", 24, 55 104 32 8, hide
  text "Border Style", 25, 55 116 32 8, hide
  radio "Flat", 26, 100 115 35 10, hide group
  radio "Light", 29, 141 115 39 10, hide
  radio "Top", 27, 100 103 40 10, hide group
  radio "Bottom", 28, 141 103 40 10, hide
  radio "Left", 22, 182 103 40 10, hide
  radio "Right", 23, 223 103 40 10, hide
  button "Customize Toolbar..", 30, 203 127 59 12, hide
  text "Alter the list of buttons which appear on the toolbar.", 31, 55 129 146 8, hide
  text "Icon Pack", 32, 55 19 33 8, hide
  combo 33, 100 18 60 50, hide size drop
  box "Miscellaneous Options", 34, 49 92 218 25
  check "Auto-Identify using saved passwords.", 35, 54 102 147 10
  button "Saved Passwords", 36, 203 100 59 12
}

on *:dialog:options:init:0: {
  mdx SetMircVersion $version
  mdx MarkDialog $dname
  mdx SetDialog $dname Icon
  mdx SetControlMDX 1 listview icon single showsel rowselect > $mdx_views
  did -i $dname 1 1 seticon normal 0 7, $+ $icons
  did -i $dname 1 1 seticon normal 0 8, $+ $icons
  did -i $dname 1 1 iconspacing * 5
  did -a $dname 1 + 1 0 0 General
  did -a $dname 1 + 2 0 0 Interface
  mdx SetColor $dname 2 text 15789032
  mdx SetColor $dname 2 textbg 9070933
  mdx SetColor $dname 2 background 9070933
  mdx SetFont $dname 2 18 700 Tahoma

  if ($data(update_reflex)) { did -c $dname 7 }
  else { did -b $dname 9 }
  if ($data(autoupdate_reflex)) { did -c $dname 9 }
  if ($data(update_mirc)) { did -c $dname 8 }

  if ($data(autoidentify)) { did -c $dname 35 }

  var %i = $findfile($icodir,*_pack.icl,0,did -a options 33 $remove($nopath($1-),_pack.icl)) , %x = 1
  while (%x <= %i) {
    if ($remove($findfile($icodir,*_pack.icl,%x),$shortfn($mircdir),$mircdir) == $icons) { did -c options 33 %x }
    inc %x
  }

  if ($data(switch_pos) == top) { did -c $dname 16 }
  elseif ($data(switch_pos) == bottom) { did -c $dname 17 }
  if ($data(switch_style) == 1) { did -c $dname 19 }
  elseif ($data(switch_style) == 2) { did -c $dname 20 }
  if ($data(switch_showIcons)) { did -c $dname 13 }
  if ($data(switch_showGripper)) { did -c $dname 14 }

  if ($data(side_pos) == top) { did -c $dname 27 }
  elseif ($data(side_pos) == bottom) { did -c $dname 28 }
  elseif ($data(side_pos) == left) { did -c $dname 22 }
  elseif ($data(side_pos) == right) { did -c $dname 23 }
  if ($data(side_style) == 1) { did -c $dname 26 }
  elseif ($data(side_style) == 2) { did -c $dname 29 }
}
on *:dialog:options:sclick:4: {
  if ($did($dname,7).state) { data update_reflex $true }
  else { data update_reflex $false }
  if ($did($dname,8).state) { data update_mirc $true }
  else { data update_mirc $false }
  if ($did($dname,9).state) { data autoupdate_reflex $true }
  else { data autoupdate_reflex $false }

  if ($did($dname,35).state) { data autoidentify $true }
  else { data autoidentify $false }

  if ($did($dname,16).state) { switchbar_move top }
  else { switchbar_move bottom }
  if ($did($dname,20).state) { data switch_style 2 }
  else { data switch_style 1 }
  if ($did($dname,13).state) { data switch_showIcons 1 }
  else { data switch_showIcons 0 }
  if ($did($dname,14).state) { data switch_showGripper 1 }
  else { data switch_showGripper 0 }

  if ($did($dname,28).state) { sidebar_move bottom }
  elseif ($did($dname,22).state) { sidebar_move left }
  elseif ($did($dname,23).state) { sidebar_move right }
  else { sidebar_move top }
  if ($did($dname,29).state) { data side_style 2 }
  else { data side_style 1 }
  if ($did($dname,33).sel) {
    if ($findfile($icodir,*_pack.icl,$did($dname,33).sel)) { data iconpack $remove($v1,$mircdir,$shortfn($mircdir)) }
  }
}
on *:dialog:options:sclick:1: {
  did -i $dname 1 1 page event
  tokenize 32 $did($dname,1,1)
  if ($1 == sclick) { 
    var %i = $calc($3 - 1)
    if (%i == 0) { return }
    var %t = $gettok(General.Interface.Features,%i,46)
    var %general = 6,7,8,9,10,11,12,34,35,36
    var %interface = 5,13,14,15,16,17,18,19,20,22,23,21,24,25,26,27,28,29,30,31,32,33
    did -o $dname 2 1 $+($str($chr(160),2),%t)
    if ($replace($deltok(%general %interface,%i,32),$chr(32),$chr(44))) { did -h $dname $v1 }
    if ($gettok(%general %interface,%i,32)) { did -v $dname $v1 }
  }
}
on *:dialog:options:sclick:7: {
  if ($did($dname,7).state) { did -e $dname 9 }
  else { did -b $dname 9 }
}
on *:dialog:options:sclick:12: {
  window -a $iif($chr(32) isin $active," $+ $active $+ ",$active)
  sendkeys $chr(37) $+ o
  sendkeys {PGUP}{RIGHT}{DOWN}{DOWN}{DOWN}{DOWN}
}
on *:dialog:options:sclick:30: {
  sidebar_configure
}