summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-12 08:55:32 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-12 08:55:32 +0000
commitf025ec375bf9c80863048c07562cc71a8b3142ab (patch)
tree0d01fda948dcf3e00689418bcad9af834ce27a1a /perl-install/standalone
parent4308876e7129cb8aa956a87cde04ee1127f9ca21 (diff)
downloaddrakx-backup-do-not-use-f025ec375bf9c80863048c07562cc71a8b3142ab.tar
drakx-backup-do-not-use-f025ec375bf9c80863048c07562cc71a8b3142ab.tar.gz
drakx-backup-do-not-use-f025ec375bf9c80863048c07562cc71a8b3142ab.tar.bz2
drakx-backup-do-not-use-f025ec375bf9c80863048c07562cc71a8b3142ab.tar.xz
drakx-backup-do-not-use-f025ec375bf9c80863048c07562cc71a8b3142ab.zip
(advanced_install) "Install" button is sensitive only if there're some
fonts in the font list
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakfont5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 40f2e0529..0b8fc2440 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -636,19 +636,22 @@ sub dialog {
}
sub advanced_install() {
+ my $button;
$model = Gtk2::TreeStore->new("Glib::String");
$list = Gtk2::TreeView->new_with_model($model);
$list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$list->set_headers_visible(0);
$list->get_selection->set_mode('browse');
$list->set_rules_hint(1);
+ $model->signal_connect("row-inserted" => sub { $button and $button->set_sensitive(1) });
+ $model->signal_connect("row-deleted" => sub { $button and $button->set_sensitive($model->get_iter_first) });
dialog(N("Import fonts"),
[ 1, create_scrolled_window($list) ],
[
gtksignal_connect(Gtk2::Button->new(N("Add")), clicked => \&font_choice),
gtksignal_connect(Gtk2::Button->new(N("Remove Selected")), clicked => \&list_remove),
- gtksignal_connect(Gtk2::Button->new(N("Install fonts")),
+ gtksignal_connect($button = gtkset_sensitive(Gtk2::Button->new(N("Install fonts")), 0),
clicked => sub {
$dialog->destroy;
undef $dialog;