summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2007-10-26 14:46:01 +0000
committerAntoine Ginies <aginies@mandriva.com>2007-10-26 14:46:01 +0000
commitc7f26eab3db78a8373f1e3baeb7a0e1edbdf1a78 (patch)
tree2269c0b6e201a6174c4940278b08daf6b55d48b7
parentb51ea8e2755c49f12f84b31539879453ab4bbf62 (diff)
downloaddrakx-net-c7f26eab3db78a8373f1e3baeb7a0e1edbdf1a78.tar
drakx-net-c7f26eab3db78a8373f1e3baeb7a0e1edbdf1a78.tar.gz
drakx-net-c7f26eab3db78a8373f1e3baeb7a0e1edbdf1a78.tar.bz2
drakx-net-c7f26eab3db78a8373f1e3baeb7a0e1edbdf1a78.tar.xz
drakx-net-c7f26eab3db78a8373f1e3baeb7a0e1edbdf1a78.zip
fix wizard bug
-rwxr-xr-xbin/draksambashare20
1 files changed, 11 insertions, 9 deletions
diff --git a/bin/draksambashare b/bin/draksambashare
index 4c08191..a3897fc 100755
--- a/bin/draksambashare
+++ b/bin/draksambashare
@@ -1045,12 +1045,7 @@ sub add_data_printer_list {
sub configure_samba {
- local $::isEmbedded = 0;
- my $in = 'interactive'->vnew('su');
- undef $::WizardTable;
- undef $::WizardWindow;
- $::isWizard = 1;
- use wizards;
+ require wizards;
my %type = (
2 => N("PDC - primary domain controller"),
3 => N("Standalone - standalone server"),
@@ -1196,10 +1191,17 @@ sub configure_samba {
},
},
});
- $wiz->process($in);
- gtkset_mousecursor_normal();
+ eval { $wiz->process($in) };
+ my $err = $@;
+ $::isWizard = 0;
+ $::WizardWindow->destroy;
+ undef $::WizardTable;
+ undef $::WizardWindow;
+ if ($err && $err !~ /wizcancel/) {
+ err_dialog(N("Error"), N("Failed to configure Samba server.") . "\n\n" . $err);
}
-
+}
+
sub global_special_options() {
# set charset
$samba->{global}{'dos charset'} ||= "850";