diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-29 15:55:33 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-29 15:55:33 +0000 |
commit | 8a3d08b99e8cdc5acfeda98f3104109365ad10d5 (patch) | |
tree | d4f87e8dccc3a8bd8d5173f69a5fed003dbc028c | |
parent | f7386742c4ac4ebde9af0613dd8436c8af832d41 (diff) | |
download | rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar.gz rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar.bz2 rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar.xz rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.zip |
Add a button to clear the search text field and to redraw the package tree
-rwxr-xr-x | rpmdrake | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -1192,10 +1192,21 @@ Is it ok to continue?", Gtk2::HBox->new(0, 10), Gtk2::Label->new(N("Find:")), $search_types_optionmenu, - gtksignal_connect($find_entry = Gtk2::Entry->new, - key_press_event => sub { $_[1]->keyval == $Gtk2::Gdk::Keysyms{Return} - and $find_callback->() }), - gtksignal_connect(Gtk2::Button->new(but(N("Search"))), clicked => $find_callback) + gtksignal_connect( + $find_entry = Gtk2::Entry->new, + key_press_event => sub { + $_[1]->keyval == $Gtk2::Gdk::Keysyms{Return} + and $find_callback->(); + }, + ), + gtksignal_connect(Gtk2::Button->new(but(N("Search"))), clicked => $find_callback), + gtksignal_connect( + Gtk2::Button->new(but(N("Clear"))), + clicked => sub { + $find_entry->set_text(""); + $options->{rebuild_tree}->(); + }, + ), ), 1, $table, 0, gtkpack_( |