summaryrefslogtreecommitdiffstats
path: root/perl-install/my_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-09 03:02:37 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-09 03:02:37 +0000
commit950fe7395621dc21885ac3e1280e007248646608 (patch)
treee3016a95189ee4c75a05b816d91dd22f071bd2c0 /perl-install/my_gtk.pm
parentc7df31b71335c18d60cdb8a7f5fee24d56cca4b8 (diff)
downloaddrakx-950fe7395621dc21885ac3e1280e007248646608.tar
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.gz
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.bz2
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.xz
drakx-950fe7395621dc21885ac3e1280e007248646608.zip
no_comment
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r--perl-install/my_gtk.pm23
1 files changed, 12 insertions, 11 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 848a764a4..29de8a794 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -239,19 +239,20 @@ sub create_menu($@) {
$w
}
+sub add2notebook {
+ my ($n, $title, $book) = @_;
+
+ my ($w1, $w2) = map { new Gtk::Label($_) } $title, $title;
+ $book->{widget_title} = $w1;
+ $n->append_page_menu($book, $w1, $w2);
+ $book->show;
+ $w1->show;
+ $w2->show;
+}
+
sub create_notebook(@) {
my $n = new Gtk::Notebook;
- while (@_) {
- my $title = shift;
- my $book = shift;
-
- my ($w1, $w2) = map { new Gtk::Label($_) } $title, $title;
- $book->{widget_title} = $w1;
- $n->append_page_menu($book, $w1, $w2);
- $book->show;
- $w1->show;
- $w2->show;
- }
+ add2notebook($n, splice(@_, 0, 2)) while @_;
$n
}