summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-15 19:43:19 +0200
committerGünther Deschner <gd@samba.org>2009-05-15 19:51:03 +0200
commitd800ee50335ecbd2dbd3b451a18a00780ac28f04 (patch)
tree64448a319a0be65b20364199fa11bceb85a51617
parent8c74d31962eb82f7dcc07000aeb27a84a633a225 (diff)
downloadsamba-d800ee50335ecbd2dbd3b451a18a00780ac28f04.tar.gz
samba-d800ee50335ecbd2dbd3b451a18a00780ac28f04.tar.bz2
samba-d800ee50335ecbd2dbd3b451a18a00780ac28f04.zip
s3-netdomjoin-gui: allow to switch between workgroups/domains with the same name.
Guenther
-rw-r--r--source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 0a06a7789c..c482113332 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -950,7 +950,8 @@ static void callback_enter_workgroup_and_unlock(GtkWidget *widget,
gtk_widget_set_sensitive(GTK_WIDGET(state->button_ok), FALSE);
return;
}
- if (strcasecmp(state->name_buffer_initial, entry_text) == 0) {
+ if ((strcasecmp(state->name_buffer_initial, entry_text) == 0) &&
+ (state->name_type_initial == NetSetupWorkgroupName)) {
gtk_widget_set_sensitive(GTK_WIDGET(state->button_ok), FALSE);
return;
}
@@ -972,7 +973,8 @@ static void callback_enter_domain_and_unlock(GtkWidget *widget,
gtk_widget_set_sensitive(GTK_WIDGET(state->button_ok), FALSE);
return;
}
- if (strcasecmp(state->name_buffer_initial, entry_text) == 0) {
+ if ((strcasecmp(state->name_buffer_initial, entry_text) == 0) &&
+ (state->name_type_initial == NetSetupDomainName)) {
gtk_widget_set_sensitive(GTK_WIDGET(state->button_ok), FALSE);
return;
}