aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-08-20 13:46:02 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-08-20 13:46:02 +0000
commit73017b4e9a6c1554335d507fcd56888a434e0b1a (patch)
tree67820c53a304ca0579244a6f3bb197b6e4937c80
parent6be2d226a76992a529282abe4d309ce1286f2453 (diff)
downloadrpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar
rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar.gz
rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar.bz2
rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.tar.xz
rpmdrake-73017b4e9a6c1554335d507fcd56888a434e0b1a.zip
try to use a "typical width" to set the maximum size of the
packages column, rather than pure hardcoding
-rwxr-xr-xrpmdrake8
1 files changed, 5 insertions, 3 deletions
diff --git a/rpmdrake b/rpmdrake
index f1055994..1ba2923f 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -324,8 +324,10 @@ or you already installed all of them."));
$::noBorder = 0;
$tree = Gtk::CTree->new(3, 0);
$tree->set_selection_mode('browse');
- $tree->set_column_auto_resize($_, 1) foreach 1..2;
- $tree->set_column_width(0, 260);
+ $tree->set_column_auto_resize($_, 1) foreach 0..2;
+ my $typical_width = $tree->get_style->font->string_width("Develop xmms-more-vis-plugins-1.6.0.0-2mdk");
+ $typical_width > 500 and $typical_width = 500; #- try to not being crazy with a too large value
+ $tree->set_column_max_width(0, $typical_width);
$tree->signal_connect(tree_select_row => sub {
$disable_treeselect_callback and return;
if (!$_[1]->row->is_leaf && !$_[1]->row->children) {
@@ -498,7 +500,7 @@ Is it ok to continue?", $formatlistpkg->(sort { $a cmp $b } keys %{$urpm->{state
0;
});
- $w->{window}->set_usize(660, 500);
+ $w->{window}->set_usize($typical_width*2.7, 500);
$w->{rwindow}->show_all;
my $widgets = { w => $w, tree => $tree, info => $info, status => $status};