[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1644-gd800ee5

Günther Deschner gd at samba.org
Fri May 15 17:51:32 GMT 2009


The branch, master has been updated
       via  d800ee50335ecbd2dbd3b451a18a00780ac28f04 (commit)
       via  8c74d31962eb82f7dcc07000aeb27a84a633a225 (commit)
       via  473bf41d20b25bd7d98ea6647e6295b3fb6f34e1 (commit)
      from  c085c8311dfadcb05594714149632e9523a27c14 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d800ee50335ecbd2dbd3b451a18a00780ac28f04
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 15 19:43:19 2009 +0200

    s3-netdomjoin-gui: allow to switch between workgroups/domains with the same name.
    
    Guenther

commit 8c74d31962eb82f7dcc07000aeb27a84a633a225
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 15 19:42:05 2009 +0200

    s3-netdomjoin-gui: cosmetic fix for empty hostnames.
    
    Guenther

commit 473bf41d20b25bd7d98ea6647e6295b3fb6f34e1
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 15 17:06:54 2009 +0200

    s3-netdomjoin-gui: only gray out labels when not root and not connecting to
    remote machines.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 .../examples/netdomjoin-gui/netdomjoin-gui.c       |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 66e9572..c482113 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -878,6 +878,7 @@ static void callback_enter_hostname_and_unlock(GtkWidget *widget,
 	if (!entry_text || entry_text[0] == 0) {
 		state->hostname_changed = FALSE;
 		gtk_widget_set_sensitive(GTK_WIDGET(state->button_ok), FALSE);
+		gtk_label_set_text(GTK_LABEL(state->label_full_computer_name), "");
 		return;
 	}
 	if (strcasecmp(state->my_hostname, entry_text) == 0) {
@@ -949,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;
 	}
@@ -971,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;
 	}
@@ -1490,7 +1493,7 @@ static int draw_main_window(struct join_state *state)
 		entry = gtk_entry_new();
 		gtk_entry_set_max_length(GTK_ENTRY(entry), 256);
 
-		if (state->uid != 0) {
+		if (!state->target_hostname && state->uid != 0) {
 			gtk_widget_set_sensitive(GTK_WIDGET(entry), FALSE);
 		}
 		g_signal_connect(G_OBJECT(entry), "changed",
@@ -1579,7 +1582,7 @@ static int draw_main_window(struct join_state *state)
 			 G_CALLBACK(callback_do_change),
 			 (gpointer)state);
 	gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0);
-	if (state->uid != 0) {
+	if (!state->target_hostname && state->uid != 0) {
 		gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
 	}
 	gtk_widget_show(button);
@@ -1589,7 +1592,7 @@ static int draw_main_window(struct join_state *state)
 	gtk_label_set_line_wrap(GTK_LABEL(state->label_reboot), TRUE);
 	gtk_misc_set_alignment(GTK_MISC(state->label_reboot), 0, 0);
 	gtk_box_pack_start(GTK_BOX(vbox), state->label_reboot, TRUE, TRUE, 0);
-	if (state->uid != 0) {
+	if (!state->target_hostname && state->uid != 0) {
 		gtk_label_set_text(GTK_LABEL(state->label_reboot),
 			   "You cannot change computer description as you're not running with root permissions");
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list