summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-07-07 00:46:37 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-07-07 00:46:37 +0000
commit6fd7051f446c2ccfc8462417b577453ccbbbc727 (patch)
treee15c2b82266ea8b93f6e024a4db13acb9cb4eba7
parent1500a9a7a083ea4677bd1074343c9de2593d8443 (diff)
downloaddrakx-backup-do-not-use-6fd7051f446c2ccfc8462417b577453ccbbbc727.tar
drakx-backup-do-not-use-6fd7051f446c2ccfc8462417b577453ccbbbc727.tar.gz
drakx-backup-do-not-use-6fd7051f446c2ccfc8462417b577453ccbbbc727.tar.bz2
drakx-backup-do-not-use-6fd7051f446c2ccfc8462417b577453ccbbbc727.tar.xz
drakx-backup-do-not-use-6fd7051f446c2ccfc8462417b577453ccbbbc727.zip
add double clic event
-rw-r--r--perl-install/standalone/drakhosts21
1 files changed, 14 insertions, 7 deletions
diff --git a/perl-install/standalone/drakhosts b/perl-install/standalone/drakhosts
index f10c79043..23441d1e5 100644
--- a/perl-install/standalone/drakhosts
+++ b/perl-install/standalone/drakhosts
@@ -209,11 +209,18 @@ $treeview->set_rules_hint(TRUE);
$treeview->get_selection->set_mode('single');
add_columns($treeview);
-my $okcancel = create_okcancel({
- cancel_clicked => sub { ugtk2->exit },
- ok_clicked => \&write_conf_hosts,
- },
- );
+$treeview->signal_connect(button_press_event => sub {
+ my (undef, $event) = @_;
+ my $model = $treeview->get_model;
+ my $selection = $treeview->get_selection;
+ my $iter = $selection->get_selected;
+ if ($iter) {
+ my $path = $model->get_path($iter);
+ my $i = ($path->get_indices)[0];
+ add_modify_entry($model, $treeview, "modify") if $event->type eq '2button-press';
+ }
+ });
+
# main interface
$W->add(gtkpack_(Gtk2::VBox->new(0,0),
@@ -242,9 +249,9 @@ $W->add(gtkpack_(Gtk2::VBox->new(0,0),
err_dialog(N("Error"), N("Failed to remove host.") . "\n\n" . $err);
}
}),
+ if_($::isEmbedded, 0, gtksignal_connect(Gtk2::Button->new(N("Quit")), clicked => sub { ugtk2->exit })),
),
- if_($::isEmbedded, 0, $okcancel),
- ),
+ ),
);
$W->show_all;