summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-05-16 11:03:01 +0000
committerdamien <damien@mandriva.com>2001-05-16 11:03:01 +0000
commitc2f82629c6968282bd55c348df822d03f5b9c553 (patch)
treeba38addf6276e1718989df966edd4cb4264c30e3
parent68540dce9e233595426d7ae01a8161c4bed5d8c2 (diff)
downloaddrakx-c2f82629c6968282bd55c348df822d03f5b9c553.tar
drakx-c2f82629c6968282bd55c348df822d03f5b9c553.tar.gz
drakx-c2f82629c6968282bd55c348df822d03f5b9c553.tar.bz2
drakx-c2f82629c6968282bd55c348df822d03f5b9c553.tar.xz
drakx-c2f82629c6968282bd55c348df822d03f5b9c553.zip
icons management
-rw-r--r--perl-install/interactive.pm8
-rw-r--r--perl-install/my_gtk.pm1
2 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index ec14ab59c..55b4e58ae 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -55,7 +55,7 @@ sub new($) {
}
sub vnew {
- my ($type, $su) = @_;
+ my ($type, $su, $icon) = @_;
$su = $su eq "su";
require c;
if ($ENV{DISPLAY} && system('/usr/X11R6/bin/xtest') == 0) {
@@ -66,7 +66,11 @@ sub vnew {
}
}
eval { require interactive_gtk };
- !$@ and return interactive_gtk->new;
+ if (!$@) {
+ my $o = interactive_gtk->new;
+ $icon and $o->{icon} = $icon;
+ return $o;
+ }
}
if ($su && $>) {
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index d2985c478..a4eaa7583 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -370,6 +370,7 @@ sub create_box_with_title($@) {
$o->{box_size} = sum(map { round(length($_) / 60 + 0.5) } map { split "\n" } @_);
$o->{box} = new Gtk::VBox(0,0);
+ $o->{icon} and eval { gtkpack__($o->{box}, gtkset_border_width(gtkpack_(new Gtk::HBox(0,0), 1, gtkpng($o->{icon})),5)); };
if (@_ <= 2 && $o->{box_size} > 4) {
my $font = $o->{box}->style->font;
my $wanted = $o->{box_size} * ($font->ascent + $font->descent) + 7;