diff options
-rwxr-xr-x | MandrivaUpdate | 10 | ||||
-rw-r--r-- | Rpmdrake/gui.pm | 11 |
2 files changed, 7 insertions, 14 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate index b8e7762f..aaef04d7 100755 --- a/MandrivaUpdate +++ b/MandrivaUpdate @@ -44,7 +44,7 @@ use Gtk2::SimpleList; # make Rpmdrake::gui aware MandrivaUpdate do not use the same columns ids as rpmdrake: %Rpmdrake::gui::pkg_columns = ( - text => 1, + text => 2, selected => 0, ); @@ -75,7 +75,7 @@ sub refresh_packages_list { @{$list->{data}} = map { $data{$_} = $i++; my $summary = get_summary($_); - [ $pkgs->{$_}{selected}, format_name_n_summary($_, $summary) ]; + [ $pkgs->{$_}{selected}, format_name_n_summary($_, $summary), $_ ]; } grep { $pkgs->{$_}{pkg} } @requested; gtktext_insert($info, formatAlaTeX(N("The list of updates is empty. This means that either there is @@ -127,6 +127,7 @@ sub run_treeview_dialog { child => $list = Gtk2::SimpleList->new( " " . " " . " " => 'bool', #N("Selected") " " . "" . " " => 'markup', #N("Name") + '' => 'hidden', ), ), @@ -183,7 +184,7 @@ sub run_treeview_dialog { $list->get_selection->signal_connect(changed => sub { my ($model, $iter) = $_[0]->get_selected; $model && $iter or return; - gtktext_insert($info, get_info(get_name($model->get($iter, 1)), $w->{real_window}->window)); + gtktext_insert($info, get_info($model->get($iter, 2), $w->{real_window}->window)); $info->scroll_to_iter($info->get_buffer->get_start_iter, 0, 0, 0, 0); }); @@ -200,10 +201,9 @@ sub run_treeview_dialog { my $cell = ($list->get_column(0)->get_cell_renderers)[0]; $cell->signal_connect(toggled => sub { my ($cell, $text_path) = @_; - my ($val, $name) = @{$list->{data}[$text_path]}; + my ($val, undef, $name) = @{$list->{data}[$text_path]}; gtkset_mousecursor_wait($w->{real_window}->window); my $_guard = before_leaving(sub {gtkset_mousecursor_normal($w->{real_window}->window) }); - $name = get_name($name); toggle($list, $name); }); $action_button->set_sensitive(0) if $>; diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index d07c4e24..84a22bd2 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -40,7 +40,7 @@ use Rpmdrake::pkg; use Rpmdrake::icon; use Gtk2::Gdk::Keysyms; -our @EXPORT = qw(ask_browse_tree_given_widgets_for_rpmdrake build_tree callback_choices closure_removal compute_main_window_size do_action get_info get_name get_summary is_locale_available node_state pkgs_provider reset_search set_node_state switch_pkg_list_mode toggle_all toggle_nodes +our @EXPORT = qw(ask_browse_tree_given_widgets_for_rpmdrake build_tree callback_choices closure_removal 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 $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); our $dont_show_selections = $> ? 1 : 0; @@ -266,16 +266,9 @@ sub update_size { } } -sub get_name { - my ($name) = @_; - return $name=~ m!<b>(.*)</b>! ? $1 : $name; -} - sub children { my ($w) = @_; - map { - my $txt = get_name($w->{detail_list_model}->get($_, $pkg_columns{text})); - get_name($w->{detail_list_model}->get($_, $pkg_columns{text})) } gtktreeview_children($w->{detail_list_model}); + map { $w->{detail_list_model}->get($_, $pkg_columns{text}) } gtktreeview_children($w->{detail_list_model}); } sub toggle_all { |