diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-08 23:45:02 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-08 23:45:02 +0000 |
commit | a3f578efbce1bc645499611f0f1cc13c996f3275 (patch) | |
tree | ce010f553215da7109f4597540ff8c329cc6416e /perl-install/standalone/drakboot | |
parent | f7b7767b21f34f99a5b245db1314bd060ced9009 (diff) | |
download | drakx-backup-do-not-use-a3f578efbce1bc645499611f0f1cc13c996f3275.tar drakx-backup-do-not-use-a3f578efbce1bc645499611f0f1cc13c996f3275.tar.gz drakx-backup-do-not-use-a3f578efbce1bc645499611f0f1cc13c996f3275.tar.bz2 drakx-backup-do-not-use-a3f578efbce1bc645499611f0f1cc13c996f3275.tar.xz drakx-backup-do-not-use-a3f578efbce1bc645499611f0f1cc13c996f3275.zip |
simplify code through Gtk2::ComboBox->new_with_strings()
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-x | perl-install/standalone/drakboot | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index 4fe1e0513..fd7649e13 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -78,12 +78,8 @@ unless ($::isEmbedded) { ######### menus end } -my $user_combo = Gtk2::ComboBox->new_text; -$user_combo->set_popdown_strings(sort(list_users())); -$user_combo->entry->set_text($auto_mode->{autologin}) if $auto_mode->{autologin}; -my $desktop_combo = Gtk2::ComboBox->new_text; -$desktop_combo->set_popdown_strings(sort(split(' ', `/usr/sbin/chksession -l`))); -$desktop_combo->entry->set_text($auto_mode->{desktop}) if $auto_mode->{desktop}; +my $user_combo = Gtk2::ComboBox->new_with_strings([ sort(list_users()) ], $auto_mode->{autologin}); +my $desktop_combo = Gtk2::ComboBox->new_with_strings([ sort(split(' ', `/usr/sbin/chksession -l`)) ], $auto_mode->{desktop}); my %themes = ('path' => '/usr/share/bootsplash/themes/', 'sysconfig' => '/etc/sysconfig/bootsplash', @@ -128,13 +124,12 @@ foreach (all('.')) { -f "$themes{path}$_$themes{boot}{path}bootsplash-$cur_res.jpg" and push @boot_thms, $_; } } -my %combo = ('thms' => '', 'lilo' => '', 'boot' => ''); +my %combo = ('thms' => '', 'lilo' => ''); foreach (keys(%combo)) { $combo{$_} = gtkset_size_request(Gtk2::ComboBox->new_text, 10, -1); } -$combo{boot}->set_popdown_strings(@boot_thms); -$combo{boot}->entry->set_text($themes{default}); +$combo{boot} = gtkset_size_request(Gtk2::ComboBox->new_with_strings(\@boot_thms, $themes{default}), 10, -1);; my $boot_pic = gtkcreate_img($themes{def_thmb}); change_image($boot_pic, $themes{default}); |