# data file for the FLTK User Interface Designer (FLUID)
version 2.0100 
images_dir ./ 
header_name {.h} 
code_name {.cpp} 
gridx 5 
gridy 5 
snap 3
decl {/*
 * $Id$
 *
 * Keyboard shortcuts applet
 * Part of Equinox Desktop Environment (EDE).
 * Copyright (c) 2005-2006 EDE Authors.
 *
 * This program is licenced under terms of the
 * GNU General Public Licence version 2 or newer.
 * See COPYING for details.
 */} {} 

decl {\#include "../edelib2/NLS.h"} {} 

decl {\#include "../edeconf.h"} {} 

decl {\#include "Shortcut_Button.h"} {public
} 

decl {\#include "ekeys.h"} {} 

Function {} {open
} {
  code {//fl_init_locale_support("ekeyconf", PREFIX"/share/locale");
readKeysConfiguration();} {}
  {fltk::Window} iconsConfWindow {
    label {Keyboard settings} open
    xywh {471 199 275 265} resizable visible
  } {
    {fltk::Button} {} {
      label {&OK}
      callback {writeKeysConfiguration();
sendUpdateInfo();
exit(0);}
      xywh {20 237 80 25}
    }
    {fltk::Button} {} {
      label {&Cancel}
      callback {exit(0);}
      xywh {190 237 80 24}
    }
    {fltk::Button} {} {
      label {&Apply}
      callback {writeKeysConfiguration();
sendUpdateInfo();}
      xywh {105 237 80 24}
    }
    {fltk::TabGroup} {} {open
      xywh {1 5 267 226} color 0xfffffffe
    } {
      {fltk::Group} {} {
        label Shortcuts open
        xywh {0 23 263 200} align 5
      } {
        {fltk::InvisibleBox} {} {
          label {Keyboard shortcut:}
          xywh {20 52 140 20} align 36
        }
        {fltk::Button} shortcut {
          label {Keyboard shortcut:}
          callback {setshortcutfor(action->text(),shortcut->svalue);} selected
          tooltip {To set a shortcut:
   Click here, then type the key combination you want.
To delete the shortcut:
   Click here, then type backspace.
To get out of shortcut-setting mode:
   Click the mouse on this again, or on some other field.}
          xywh {20 72 140 20} align 36 color 7
          class Shortcut_Button
        }
        {fltk::InputBrowser} action {
          label {Action:}
          callback {shortcut->svalue = getshortcutfor(action->text());
shortcut->redraw();}
          xywh {20 26 165 21} align 5
          extra_code {action->text("Next window");}
        } {}
        {fltk::Button} {} {
          label {&New shortcut...}
          callback {newShortcutWindow->show();}
          xywh {20 127 110 25}
        }
        {fltk::Button} {} {
          label {&Remove shortcut}
          callback {removeShortcut(action->text());
populatelist(action);
action->text(action->child(0)->label());
action->do_callback();}
          xywh {140 127 110 25}
        }
      }
    }
  }
  {fltk::Window} newShortcutWindow {
    label {Define new shortcut} open
    xywh {601 395 285 114} hide resizable modal
  } {
    {fltk::Input} shortcutName {
      label {&Shortcut name:}
      xywh {104 15 170 24}
    }
    {fltk::Input} shortcutCommand {
      label {C&ommand}
      xywh {104 49 170 24}
    }
    {fltk::Button} {} {
      label {&Ok}
      callback {addShortcut(shortcutName->value(),shortcutCommand->value());
populatelist(action);
action->text(shortcutName->value());
action->do_callback();
newShortcutWindow->hide();}
      xywh {49 83 88 24}
    }
    {fltk::Button} {} {
      label {&Cancel}
      callback {newShortcutWindow->hide();}
      xywh {158 83 88 24}
    }
  }
  code {populatelist(action);
shortcut->svalue = getshortcutfor("Next window");
shortcut->redraw();

// Grab all keyboard events from window manager
XGrabKey(fltk::xdisplay, AnyKey, AnyModifier, fltk::xid(w), true, GrabModeAsync, GrabModeAsync);} {}
} 
