aboutsummaryrefslogtreecommitdiffstats
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
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
-rwxr-xr-xMandrivaUpdate4
-rw-r--r--Rpmdrake/gui.pm10
-rwxr-xr-xrpmdrake4
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);
diff --git a/rpmdrake b/rpmdrake
index 0068e0a6..67fb8771 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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(