--- deliantra/Deliantra-Client/DC/BindingEditor.pm 2006/07/30 13:16:44 1.4 +++ deliantra/Deliantra-Client/DC/BindingEditor.pm 2006/10/01 14:48:51 1.7 @@ -4,7 +4,7 @@ use CFPlus::UI; -our @ISA = CFPlus::UI::FancyFrame::; +our @ISA = CFPlus::UI::Toplevel::; my @ALLOWED_MODIFIER_KEYS = ( CFPlus::SDLK_LSHIFT, @@ -131,13 +131,13 @@ sub cfg_bind { my ($self, $mod, $sym, $cmds) = @_; - $::CFG->{profile}{default}{bindings}{$mod}{$sym} = $cmds; + $::PROFILE->{bindings}{$mod}{$sym} = $cmds; ::update_bindings (); } sub cfg_unbind { my ($self, $mod, $sym, $cmds) = @_; - delete $::CFG->{profile}{default}{bindings}{$mod}{$sym}; + delete $::PROFILE->{bindings}{$mod}{$sym}; ::update_bindings (); } @@ -186,7 +186,7 @@ Scalar::Util::weaken $self; - $self->{binder} = new CFPlus::UI::FancyFrame + $self->{binder} = new CFPlus::UI::Toplevel title => "Bind Action", x => "center", y => "center", @@ -232,7 +232,9 @@ $self->commit if $commit; $end_cb->() if $end_cb; - (delete $self->{binder})->destroy; + if (my $binder = delete $self->{binder}) { + $binder->destroy; + } 1 }, on_focus_out => sub {