diff options
-rwxr-xr-x | MandrivaUpdate | 4 | ||||
-rw-r--r-- | Rpmdrake/gui.pm | 10 | ||||
-rwxr-xr-x | rpmdrake | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate index 2139ce56..3f96024c 100755 --- a/MandrivaUpdate +++ b/MandrivaUpdate @@ -89,9 +89,7 @@ sub run_treeview_dialog { $w = ugtk2->new(N("Software Update")); $::main_window = $w->{real_window}; - ($typical_width) = string_size($w->{real_window}, translate("Graphical Environment") . "xmms-more-vis-plugins"); - $typical_width > 600 and $typical_width = 600; #- try to not being crazy with a too large value - $typical_width < 150 and $typical_width = 150; + compute_main_window_size($w); gtkadd( $w->{window}, diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 491ed1d2..3e07549e 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -39,7 +39,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 do_action get_info is_locale_available pkgs_provider reset_search set_node_state switch_pkg_list_mode 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 is_locale_available pkgs_provider reset_search set_node_state switch_pkg_list_mode toggle_nodes $clear_button %grp_columns %pkg_columns $dont_show_selections $find_entry $force_displaying_group $force_rebuild @initial_selection $pkgs $size_free $size_selected $urpm); our $dont_show_selections = $> ? 1 : 0; @@ -58,6 +58,14 @@ our %pkg_columns = ( ); +sub compute_main_window_size { + my ($w) = @_; + ($typical_width) = string_size($w->{real_window}, translate("Graphical Environment") . "xmms-more-vis-plugins"); + $typical_width > 600 and $typical_width = 600; #- try to not being crazy with a too large value + $typical_width < 150 and $typical_width = 150; +} + + sub format_pkg_simplifiedinfo { my ($pkgs, $key, $urpm, $descriptions) = @_; my ($name, $version) = split_fullname($key); @@ -196,9 +196,7 @@ sub run_treeview_dialog { $detail_list->set_headers_visible(0); $detail_list->set_rules_hint(1); - ($typical_width) = string_size($tree, translate("Graphical Environment") . "xmms-more-vis-plugins"); - $typical_width > 600 and $typical_width = 600; #- try to not being crazy with a too large value - $typical_width < 150 and $typical_width = 150; + compute_main_window_size($w); my $cursor_to_restore; $_->signal_connect( |