--- deliantra/Deliantra-Client/DC/UI.pm 2006/06/19 05:18:14 1.308 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/06/21 12:59:23 1.309 @@ -3474,6 +3474,18 @@ $self } +sub cfg_bind { + my ($self, $mod, $sym, $cmds) = @_; + $::CFG->{profile}{default}{bindings}{$mod}{$sym} = $cmds; + ::update_bindings (); +} + +sub cfg_unbind { + my ($self, $mod, $sym, $cmds) = @_; + delete $::CFG->{profile}{default}{bindings}{$mod}{$sym}; + ::update_bindings (); +} + sub commit { my ($self) = @_; my ($mod, $sym, $cmds) = $self->get_binding; @@ -3553,9 +3565,7 @@ # and then just binds it. sub do_quick_binding { my ($self, $cmds, $end_cb) = @_; - $self->set_binding (undef, undef, $cmds, sub { - $::CFG->{bindings}->{$_[0]}->{$_[1]} = $_[2]; - }); + $self->set_binding (undef, undef, $cmds, sub { $self->cfg_bind (@_) }); $self->ask_for_bind (1, $end_cb); }