aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-12 09:40:09 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-12 09:40:09 +0000
commitbc5e0db8beb55defcf22232a750196f9e2d7fc4a (patch)
treed3580e085af577252b50397a729ad40af80a5034
parent833422d0bd27c4be0ecf8de0020a05f3c68e8985 (diff)
downloadrpmdrake-bc5e0db8beb55defcf22232a750196f9e2d7fc4a.tar
rpmdrake-bc5e0db8beb55defcf22232a750196f9e2d7fc4a.tar.gz
rpmdrake-bc5e0db8beb55defcf22232a750196f9e2d7fc4a.tar.bz2
rpmdrake-bc5e0db8beb55defcf22232a750196f9e2d7fc4a.tar.xz
rpmdrake-bc5e0db8beb55defcf22232a750196f9e2d7fc4a.zip
(run_treeview_dialog) move search types menu into Entry (needs
drakxtools-10.6.18+)
-rwxr-xr-xrpmdrake28
1 files changed, 13 insertions, 15 deletions
diff --git a/rpmdrake b/rpmdrake
index b89b79b0..9c957766 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -382,20 +382,14 @@ sub run_treeview_dialog {
my @search_types = qw(normal descriptions summaries files);
my $current_search_type = $search_types[0];
- my $search_types_optionmenu = Gtk2::ComboBox->new_with_strings(
- [
- N("in names"),
- N("in descriptions"),
- N("in summaries"),
- N("in file names"),
- ],
- N("in names")
- );
- $search_types_optionmenu->signal_connect(
- changed => sub {
- $current_search_type = $search_types[$search_types_optionmenu->get_active];
- },
- );
+ my $search_menu = Gtk2::Menu->new;
+ my $i = 0;
+ foreach (N("in names"), N("in descriptions"), N("in summaries"), N("in file names")) {
+ my ($name, $val) = ($_, $i);
+ $search_menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label($name)),
+ activate => sub { $current_search_type = $search_types[$val] }));
+ $i++;
+ }
my $info = Gtk2::Mdv::TextView->new;
$info->set_left_margin(2);
@@ -522,10 +516,14 @@ sub run_treeview_dialog {
$cbox,
gtkset_size_request(Gtk2::Alignment->new(0, 0, 0, 0), 100, 1),
gtknew('Label', text => N("Find:")),
- $search_types_optionmenu,
$find_entry = gtknew('Sexy_IconEntry', clear_button => 1,
primary_icon => Gtk2::Image->new_from_stock('gtk-find', 'menu'),
'icon-released' => $find_callback,
+ 'icon-pressed' => sub {
+ my (undef, $pos, $button) = @_;
+ return if $pos != 0;
+ $search_menu->popup(undef, undef, undef, undef, $button, undef);
+ },
key_press_event => sub {
$_[1]->keyval == $Gtk2::Gdk::Keysyms{Return}
and $find_callback->();