diff options
author | Daniel Burrows <dburrows@debian.org> | 2007-11-15 19:50:25 -0800 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2007-11-15 19:50:25 -0800 |
commit | aa0fe49f190c8f12f90802749743c61fe8b5d7fc (patch) | |
tree | acc9c8ab9792408ed587c70f524fcf3a98bd39a2 /src | |
parent | d7effbfc361195443b478a7fa360d7db8151a4ca (diff) | |
download | aptitude-aa0fe49f190c8f12f90802749743c61fe8b5d7fc.tar.gz |
Fully qualify keybindings in several places, and remove a lot of unnecessary qualification in cmine.
Diffstat (limited to 'src')
-rw-r--r-- | src/mine/cmine.cc | 54 | ||||
-rw-r--r-- | src/pkg_tree.cc | 2 |
2 files changed, 21 insertions, 35 deletions
diff --git a/src/mine/cmine.cc b/src/mine/cmine.cc index 6ebe6cb0..4eafe8a9 100644 --- a/src/mine/cmine.cc +++ b/src/mine/cmine.cc @@ -373,8 +373,6 @@ void cmine::do_new_game() cw::button_ref okbutton = cw::button::create(_("Ok")); cw::button_ref cancelbutton = cw::button::create(_("Cancel")); - using cwidget::config::global_bindings; - table->connect_key_post("Confirm", &cw::config::global_bindings, okbutton->pressed.make_slot()); easybutton->connect_key("Confirm", &cw::config::global_bindings, okbutton->pressed.make_slot()); @@ -587,8 +585,6 @@ void cmine::set_board(mine_board *_board) bool cmine::handle_key(const cwidget::config::key &k) { - using cwidget::util::arg; - cw::widget_ref tmpref(this); int width,height; @@ -929,34 +925,24 @@ void cmine::init_bindings() { srand(time(0)); - using cwidget::set_style; - using cwidget::style_attrs_off; - using cwidget::style_attrs_on; - using cwidget::style_bg; - using cwidget::style_fg; - - set_style("MineFlag", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); - set_style("MineBomb", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); - set_style("MineDetonated", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); - set_style("MineNumber1", cw::style_fg(COLOR_WHITE)); - set_style("MineNumber2", cw::style_fg(COLOR_GREEN)); - set_style("MineNumber3", cw::style_fg(COLOR_CYAN)); - set_style("MineNumber4", cw::style_fg(COLOR_MAGENTA)+cw::style_attrs_on(A_BOLD)); - set_style("MineNumber5", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); - set_style("MineNumber6", cw::style_attrs_on(A_BOLD)+cw::style_fg(COLOR_CYAN)); - set_style("MineNumber7", cw::style_attrs_on(A_BOLD)+cw::style_fg(COLOR_GREEN)); - set_style("MineNumber8", cw::style_attrs_on(A_BOLD)); - set_style("MineBorder", cw::style_attrs_on(A_BOLD)); - - using cwidget::config::global_bindings; - using cwidget::config::key; - using cwidget::config::keybindings; - - cw::config::global_bindings.set("MineUncoverSweepSquare", key(KEY_ENTER, true)); - cw::config::global_bindings.set("MineFlagSquare", key(L'f', false)); - cw::config::global_bindings.set("MineNewGame", key(L'n', false)); - cw::config::global_bindings.set("MineSaveGame", key(L'S', false)); - cw::config::global_bindings.set("MineLoadGame", key(L'L', false)); - - bindings = new keybindings(&cw::config::global_bindings); + cw::set_style("MineFlag", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); + cw::set_style("MineBomb", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); + cw::set_style("MineDetonated", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); + cw::set_style("MineNumber1", cw::style_fg(COLOR_WHITE)); + cw::set_style("MineNumber2", cw::style_fg(COLOR_GREEN)); + cw::set_style("MineNumber3", cw::style_fg(COLOR_CYAN)); + cw::set_style("MineNumber4", cw::style_fg(COLOR_MAGENTA)+cw::style_attrs_on(A_BOLD)); + cw::set_style("MineNumber5", cw::style_fg(COLOR_RED)+cw::style_attrs_on(A_BOLD)); + cw::set_style("MineNumber6", cw::style_attrs_on(A_BOLD)+cw::style_fg(COLOR_CYAN)); + cw::set_style("MineNumber7", cw::style_attrs_on(A_BOLD)+cw::style_fg(COLOR_GREEN)); + cw::set_style("MineNumber8", cw::style_attrs_on(A_BOLD)); + cw::set_style("MineBorder", cw::style_attrs_on(A_BOLD)); + + cw::config::global_bindings.set("MineUncoverSweepSquare", cw::config::key(KEY_ENTER, true)); + cw::config::global_bindings.set("MineFlagSquare", cw::config::key(L'f', false)); + cw::config::global_bindings.set("MineNewGame", cw::config::key(L'n', false)); + cw::config::global_bindings.set("MineSaveGame", cw::config::key(L'S', false)); + cw::config::global_bindings.set("MineLoadGame", cw::config::key(L'L', false)); + + bindings = new cw::config::keybindings(&cw::config::global_bindings); } diff --git a/src/pkg_tree.cc b/src/pkg_tree.cc index d8a2b480..d249f2ea 100644 --- a/src/pkg_tree.cc +++ b/src/pkg_tree.cc @@ -54,7 +54,7 @@ cw::editline::history_list pkg_tree::limit_history, pkg_tree::grouping_history, void pkg_tree::init_bindings() { - bindings=new keybindings(cw::tree::bindings); + bindings=new cw::config::keybindings(cw::tree::bindings); } pkg_tree::pkg_tree(const std::string &def_grouping, |