aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-01-09 16:13:17 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-01-09 16:13:17 +0000
commit808c37f4dec8c9ef7915e6e5428b19e3356ac3e0 (patch)
tree8fd2d4347218dc7042a0f983be01a90faa0a5c51
parent68b8641664cb2b1a06fc697578f95bb2a42032a2 (diff)
downloadrpmdrake-808c37f4dec8c9ef7915e6e5428b19e3356ac3e0.tar
rpmdrake-808c37f4dec8c9ef7915e6e5428b19e3356ac3e0.tar.gz
rpmdrake-808c37f4dec8c9ef7915e6e5428b19e3356ac3e0.tar.bz2
rpmdrake-808c37f4dec8c9ef7915e6e5428b19e3356ac3e0.tar.xz
rpmdrake-808c37f4dec8c9ef7915e6e5428b19e3356ac3e0.zip
try to have a more sensible default size for the rpmnew dialog
-rwxr-xr-xrpmdrake14
-rw-r--r--rpmdrake.spec4
2 files changed, 11 insertions, 7 deletions
diff --git a/rpmdrake b/rpmdrake
index e0134a96..67da6908 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -894,12 +894,14 @@ sub dialog_rpmnew {
} @{$p2r{$pkg}}
} keys %p2r);
gtkadd($d->{window},
- gtkpack__(Gtk2::VBox->new(0,5),
- Gtk2::Label->new($msg),
- $sum_rpmnew < 6 ? $packtable
- : gtkset_size_request(create_scrolled_window($packtable),
- $typical_width*1.7, min(70 + $sum_rpmnew*20, 450)),
- gtkpack__(create_hbox(), gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { Gtk2->main_quit }))));
+ gtkpack_(Gtk2::VBox->new(0,5),
+ 0, Gtk2::Label->new($msg),
+ 1, create_scrolled_window($packtable),
+ 0, gtkpack__(create_hbox(), gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { Gtk2->main_quit }))));
+ my ($xpreq, $ypreq) = $packtable->size_request->values;
+ my ($xwreq, $ywreq) = $d->{rwindow}->size_request->values;
+ $d->{rwindow}->set_default_size(max($typical_width, min($typical_width*2.5, $xpreq+$xwreq)),
+ max(200, min(450, $ypreq+$ywreq)));
$d->main;
return 0;
}
diff --git a/rpmdrake.spec b/rpmdrake.spec
index 4046380b..972ee7cf 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -16,7 +16,8 @@ Release: %{release}
License: GPL
Source0: rpmdrake.tar.bz2
Summary: Mandrake Linux graphical front end for choosing packages for installion/removal
-Requires: perl-MDK-Common urpmi >= 4.0 perl-URPM >= 0.60 drakxtools >= 1.1.9-36mdk grpmi >= 9.0 rpmtools >= 4.5 perl-GTK2
+Requires: perl-MDK-Common urpmi >= 4.0 perl-URPM >= 0.60 drakxtools >= 1.1.9-36mdk grpmi >= 9.0 rpmtools >= 4.5
+Requires: perl-GTK2 > 0.0.cvs.2003.01.08.1
BuildRequires: curl-devel rpm-devel gettext openssl-devel perl-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Group: System/Configuration/Packaging
@@ -122,6 +123,7 @@ rm -rf $RPM_BUILD_ROOT
- allow to retry downloads
- rpmdrake:
- don't reset selection list when no package was installed/removed
+ - try to have a more sensible default size for the rpmnew dialog
* Wed Jan 8 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-1mdk
- gtk2 (possibly contains important breakages, use with care)