aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/gui.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-15 15:36:28 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-15 15:36:28 +0000
commit052ea5fe3e6ecebf5acdc08318ed9b2957f0d679 (patch)
tree9e14189b7ecb04b5dca1d342960350db5a3e1855 /Rpmdrake/gui.pm
parent6552c04ac5fd6feae614bdf1ec8ce89f0d1a5fa1 (diff)
downloadrpmdrake-052ea5fe3e6ecebf5acdc08318ed9b2957f0d679.tar
rpmdrake-052ea5fe3e6ecebf5acdc08318ed9b2957f0d679.tar.gz
rpmdrake-052ea5fe3e6ecebf5acdc08318ed9b2957f0d679.tar.bz2
rpmdrake-052ea5fe3e6ecebf5acdc08318ed9b2957f0d679.tar.xz
rpmdrake-052ea5fe3e6ecebf5acdc08318ed9b2957f0d679.zip
(compute_main_window_size) factorize strange typicall width computing here
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r--Rpmdrake/gui.pm10
1 files changed, 9 insertions, 1 deletions
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);