diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-12-06 13:23:52 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-12-06 13:23:52 +0000 |
commit | ec56e2a258495b714e58b514c7330b699646f81e (patch) | |
tree | c4347be752ef35cdf149e637ec4f4d6ba7cae536 /Rpmdrake/gui.pm | |
parent | 50b5007e2fbc075ca9339c79659cb50069e4e561 (diff) | |
download | rpmdrake-ec56e2a258495b714e58b514c7330b699646f81e.tar rpmdrake-ec56e2a258495b714e58b514c7330b699646f81e.tar.gz rpmdrake-ec56e2a258495b714e58b514c7330b699646f81e.tar.bz2 rpmdrake-ec56e2a258495b714e58b514c7330b699646f81e.tar.xz rpmdrake-ec56e2a258495b714e58b514c7330b699646f81e.zip |
(sort_callback) introduce it in order to fix Gtk+ sorting by using RPM version sorting logic (#35209)
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r-- | Rpmdrake/gui.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 51eb5d81..b26c945f 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -41,6 +41,7 @@ use Rpmdrake::icon; use Gtk2::Gdk::Keysyms; 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); our $dont_show_selections = $> ? 1 : 0; @@ -780,4 +781,9 @@ sub get_info { format_pkg_simplifiedinfo($pkgs, $key, $urpm, $descriptions); } +sub sort_callback { + my ($store, $treeiter1, $treeiter2) = @_; + URPM::rpmvercmp(map { $store->get_value($_, $pkg_columns{version}) } $treeiter1, $treeiter2); +} + 1; |