From cff0ebabca4634ae7baefc85398f4661040011a5 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 2 Mar 2004 14:01:42 +0000 Subject: add a "close" button (#7257) --- drakconsole | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drakconsole b/drakconsole index 61c90197..5b324861 100755 --- a/drakconsole +++ b/drakconsole @@ -19,16 +19,22 @@ use strict; use lib qw(/usr/lib/libDrakX); +use common; use standalone; #- warning, standalone must be loaded very first, for 'explanations' -use ugtk2 qw(:wrappers); +use ugtk2 qw(:create :wrappers); use Gnome2::Vte; my $w = ugtk2->new; -$w->{rwindow}->add(my $vte = gtksignal_connect(Gnome2::Vte::Terminal->new, - 'child-exited' => sub { ugtk2->exit }) +$w->{rwindow}->add(gtkpack_(Gtk2::VBox->new(0, 0), + 1, my $vte = gtksignal_connect(Gnome2::Vte::Terminal->new, 'child-exited' => sub { ugtk2->exit }), + 0, gtkpack__(create_hbox('end'), gtksignal_connect(Gtk2::Button->new(N("Close")), + clicked => sub { ugtk2->exit }) + ) + ), ); $w->{rwindow}->show_all; +#$ENV{PS1} = qq(Type "exit"\n); $vte->fork_command($ENV{SHELL}, [ $ENV{SHELL} ], [ map { "$_=$ENV{$_}" } keys %ENV ], $ENV{PWD}, 0, 0, 0); $w->main; -- cgit v1.2.1