summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-06-10 02:49:00 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-06-10 02:49:00 +0000
commit659193ac7a4af0d5392f7f556d7467186550db09 (patch)
tree5ecccdfba971fab6efbd9a9b3dcc012e7332e1e9
parentfc75804b6f8edf8c6d37460f6134cebc2496a05e (diff)
downloaddrakwizard-659193ac7a4af0d5392f7f556d7467186550db09.tar
drakwizard-659193ac7a4af0d5392f7f556d7467186550db09.tar.gz
drakwizard-659193ac7a4af0d5392f7f556d7467186550db09.tar.bz2
drakwizard-659193ac7a4af0d5392f7f556d7467186550db09.tar.xz
drakwizard-659193ac7a4af0d5392f7f556d7467186550db09.zip
add more test
-rwxr-xr-xsamba_wizard/Samba.pm39
1 files changed, 33 insertions, 6 deletions
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index 2aa837b5..011f3e50 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -27,6 +27,7 @@ use strict;
use common;
use services;
use MDK::Wizard::Wizcommon;
+use Gtk2;
use Libconf::Templates;
use Libconf::Glueconf::Samba::Smb_conf;
@@ -63,9 +64,9 @@ my $o = {
wiz_dns_proxy => '',
wiz_sambatype => '',
},
- init => sub {
- test_host_domain($SHORTHOSTNAME, $DOMAINNAME);
- },
+# init => sub {
+# test_host_domain($SHORTHOSTNAME, $DOMAINNAME);
+# },
needed_rpm => [ 'samba-server' ],
defaultimage => "/usr/share/wizards/samba_wizard/images/samba.png"
};
@@ -445,16 +446,38 @@ sub write_conf_restart_smb {
# remember one variable cannot be commented and not in the same file.
sub do_it {
$::testing and return;
+
+
+ my $window = Gtk2::Window->new( "toplevel" );
+ $window->signal_connect( "destroy", sub { Gtk2->main_quit; } );
+ $window->set_title( "Barre de progression" );
+ $window->set_border_width( 0 );
+
+ my $vbox = Gtk2::VBox->new( FALSE, 5 );
+ $vbox->set_border_width( 10 );
+ $window->add( $vbox );
+ $vbox->show();
+
+
+ # Centre les objets
+ my $align = Gtk2::Alignment->new( 0.5, 0.5, 0, 0 );
+ $vbox->pack_start( $align, FALSE, FALSE, 5 );
+ $align->show();
+
+ my $obar = Gtk2::ProgressBar->new();
# display a wait dialog box
my $in = 'interactive'->vnew('su', 'Samba');
- my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server..."));
-
+ $obar->show();
+# my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server..."));
+ $obar->set_text("test");
+ $obar->set_fraction(0);
# global section
$samba->{global}{workgroup} = $o->{var}{wiz_workgroup};
$samba->{global}{'server string'} = $o->{var}{wiz_banner};
$o->{var}{wiz_netbios} and $o->{var}{wiz_netbios} and $samba->{global}{netbios} = $o->{var}{wiz_netbios};
# add special global options
+ $obar->set_fraction(0.2);
global_special_options;
# log level in global section
@@ -462,9 +485,13 @@ sub do_it {
$o->{var}{wiz_log_level} and $samba->{global}{'log level'} = $o->{var}{wiz_log_level};
$o->{var}{wiz_max_log_size} and $samba->{global}{'max log size'} = $o->{var}{wiz_max_log_size};
+ $obar->set_fraction(0.7);
write_conf_restart_smb();
# remove wait message
- undef $w;
+# undef $w;
+ $obar->set_fraction(0.9);
check_started('smbd');
+ $obar->set_fraction(1.0);
+ undef $obar;
}
1;