diff options
author | Günther Deschner <gd@samba.org> | 2009-05-15 19:43:19 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-05-26 09:39:35 +0200 |
commit | 91d0029b089ff7ed130efff5f9ad3bad288671a0 (patch) | |
tree | 93eaad08ab35a29300b7008519366b19db9df130 /source3/lib | |
parent | ae87d734dabd01172f7198878bfb0b3cc72dc3b8 (diff) | |
download | samba-91d0029b089ff7ed130efff5f9ad3bad288671a0.tar.gz |
s3-netdomjoin-gui: allow to switch between workgroups/domains with the same name.
Guenther
(cherry picked from commit d800ee50335ecbd2dbd3b451a18a00780ac28f04)
(cherry picked from commit 9db1fc45786872d938939bd33b3b867ee599c9a2)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c | 6 |
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 0a06a7789cb..c4821133327 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; } |