diff options
-rw-r--r-- | Rpmdrake/gui.pm | 5 | ||||
-rwxr-xr-x | rpmdrake | 14 |
2 files changed, 7 insertions, 12 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 60a9cf5e..22918fbb 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -43,7 +43,7 @@ use feature 'state'; our @EXPORT = qw(ask_browse_tree_given_widgets_for_rpmdrake build_tree callback_choices compute_main_window_size do_action get_info get_summary is_locale_available node_state pkgs_provider reset_search set_node_state switch_pkg_list_mode toggle_all toggle_nodes sort_callback - $clear_button %grp_columns %pkg_columns $dont_show_selections @filtered_pkgs $find_entry $force_displaying_group $force_rebuild @initial_selection $pkgs $size_free $size_selected $urpm); + %grp_columns %pkg_columns $dont_show_selections @filtered_pkgs $find_entry $force_displaying_group $force_rebuild @initial_selection $pkgs $size_free $size_selected $urpm); our $dont_show_selections = $> ? 1 : 0; @@ -434,10 +434,9 @@ sub ask_browse_tree_given_widgets_for_rpmdrake { $w->{w}->main; } -our ($clear_button, $find_entry); +our $find_entry; sub reset_search() { - $clear_button and $clear_button->set_sensitive(0); $find_entry and $find_entry->set_text(""); } @@ -44,6 +44,7 @@ use ugtk2 qw(:all); use Gtk2::Gdk::Keysyms; use Rpmdrake::widgets; use feature 'state'; +use Gtk2::Sexy; $ugtk2::wm_icon = "title-$MODE"; @@ -401,7 +402,6 @@ sub run_treeview_dialog { $info->set_right_margin(15); #- workaround when right elevator of scrolled window appears my $find_callback = sub { - $clear_button and $clear_button->set_sensitive(1); do_search($find_entry, $tree, $tree_model, $options, $current_search_type, $urpm, $pkgs); }; @@ -522,17 +522,14 @@ sub run_treeview_dialog { $cbox, gtknew('Label', text => N("Find:")), $search_types_optionmenu, - $find_entry = gtknew('Entry', + $find_entry = gtknew('Sexy_IconEntry', clear_button => 1, + primary_icon => Gtk2::Image->new_from_stock('gtk-find', 'menu'), + 'icon-released' => $find_callback, 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( - $clear_button = Gtk2::Button->new(but(N("Clear"))), - clicked => sub { reset_search() }, - ), + ), ), 1, $hpaned, 0, $status, @@ -560,7 +557,6 @@ sub run_treeview_dialog { ), ); $action_button->set_sensitive(0) if $>; - $clear_button->set_sensitive(0); $find_entry->grab_focus; gtktext_insert($info, [ |