[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2533-g6759c12

Günther Deschner gd at samba.org
Mon Jun 9 08:36:41 GMT 2008


The branch, v3-2-test has been updated
       via  6759c12f6658b82a9d4477ef8a4c060a567be866 (commit)
       via  4f5dbc885f5acb33db28a7a7966353e7decf5de4 (commit)
       via  5befdac5840422365feffa93d24adfd878c18838 (commit)
       via  dfd7a3d2b142fba93dcbc3fbe8ad2b894f46af6f (commit)
      from  6f12d0c150c4b8ed0730e994545b2a4db7de6d2f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 6759c12f6658b82a9d4477ef8a4c060a567be866
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jun 5 19:04:31 2008 +0200

    netdomjoin-gui: enable NetGetJoinInformation() call after successfull joining.
    
    Now that libnetjoin reloads configuration after joining, we can rely on the
    NetGetJoinInformation() output and use it for displaying the new domain name and
    type.
    
    Guenther
    (cherry picked from commit cc1b8de2632e87002cac86838f2a77ab9771ce2c)

commit 4f5dbc885f5acb33db28a7a7966353e7decf5de4
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jun 5 19:02:09 2008 +0200

    netdomjoin-gui: fix more gtk runtime warnings.
    
    Guenther
    (cherry picked from commit 521ea68719524eeef827875e018bb8cba2a92e87)

commit 5befdac5840422365feffa93d24adfd878c18838
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jun 5 01:11:23 2008 +0200

    netdomjoin-gui: disable annoying "reboot now" dialog.
    
    Guenther
    (cherry picked from commit 8f0c5f1bedaae7a86ca671cdb2ba798079ec1d84)

commit dfd7a3d2b142fba93dcbc3fbe8ad2b894f46af6f
Author: Günther Deschner <gd at samba.org>
Date:   Tue Jun 3 15:19:46 2008 +0200

    netdomjoin-gui: some minor fixes + hunting down typecast bugs.
    
    Guenther
    (cherry picked from commit 0fa6c8c6a3efd026154e8af54ba73b3d3de1affa)

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

Summary of changes:
 .../examples/netdomjoin-gui/netdomjoin-gui.c       |   50 ++++++++++++++------
 1 files changed, 36 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index df81937..418b9c8 100644
--- a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -113,7 +113,10 @@ static void callback_do_close(GtkWidget *widget,
 {
 	debug("callback_do_close called\n");
 
-	gtk_widget_destroy(data);
+	if (data) {
+		gtk_widget_destroy(GTK_WIDGET(data));
+		data = NULL;
+	}
 }
 
 static void callback_do_freeauth(GtkWidget *widget,
@@ -127,7 +130,8 @@ static void callback_do_freeauth(GtkWidget *widget,
 	SAFE_FREE(state->password);
 
 	if (state->window_creds_prompt) {
-		gtk_widget_destroy(state->window_creds_prompt);
+		gtk_widget_destroy(GTK_WIDGET(state->window_creds_prompt));
+		state->window_creds_prompt = NULL;
 	}
 }
 
@@ -141,8 +145,14 @@ static void callback_do_freeauth_and_close(GtkWidget *widget,
 	SAFE_FREE(state->account);
 	SAFE_FREE(state->password);
 
-	gtk_widget_destroy(state->window_creds_prompt);
-	gtk_widget_destroy(state->window_do_change);
+	if (state->window_creds_prompt) {
+		gtk_widget_destroy(GTK_WIDGET(state->window_creds_prompt));
+		state->window_creds_prompt = NULL;
+	}
+	if (state->window_do_change) {
+		gtk_widget_destroy(GTK_WIDGET(state->window_do_change));
+		state->window_do_change = NULL;
+	}
 }
 
 static void free_join_state(struct join_state *s)
@@ -201,8 +211,10 @@ static void callback_apply_description_change(GtkWidget *widget,
 static void callback_do_exit(GtkWidget *widget,
 			     gpointer data)
 {
+#if 0
 	GtkWidget *dialog;
 	gint result;
+#endif
 	struct join_state *state = (struct join_state *)data;
 
 	if (!state->settings_changed) {
@@ -210,6 +222,7 @@ static void callback_do_exit(GtkWidget *widget,
 		return;
 	}
 
+#if 0
 	dialog = gtk_message_dialog_new(GTK_WINDOW(state->window_main),
 					GTK_DIALOG_DESTROY_WITH_PARENT,
 					GTK_MESSAGE_QUESTION,
@@ -225,8 +238,14 @@ static void callback_do_exit(GtkWidget *widget,
 		default:
 			break;
 	}
-	gtk_widget_destroy(dialog);
-	gtk_widget_destroy(state->window_main);
+	if (dialog) {
+		gtk_widget_destroy(GTK_WIDGET(dialog));
+	}
+#endif
+	if (state->window_main) {
+		gtk_widget_destroy(GTK_WIDGET(state->window_main));
+		state->window_main = NULL;
+	}
 	do_cleanup(state);
 	exit(0);
 }
@@ -257,7 +276,7 @@ static void callback_do_reboot(GtkWidget *widget,
 	gtk_widget_show(dialog);
 #else
 	gtk_dialog_run(GTK_DIALOG(dialog));
-	gtk_widget_destroy(dialog);
+	gtk_widget_destroy(GTK_WIDGET(dialog));
 #endif
 
 	gtk_label_set_text(GTK_LABEL(state->label_reboot),
@@ -278,12 +297,12 @@ static void callback_do_reboot(GtkWidget *widget,
 		}
 
 		debug("got new status: %s\n", buffer);
-#if 0
+
 		SAFE_FREE(state->name_buffer_new);
 		state->name_buffer_new = strdup(buffer);
-		SAFE_FREE(buffer);
 		state->name_type_new = type;
-#endif
+		state->name_buffer_initial = strdup(buffer);
+		state->name_type_initial = type;
 		NetApiBufferFree((void *)buffer);
 
 		gtk_label_set_text(GTK_LABEL(state->label_current_name_buffer),
@@ -388,10 +407,13 @@ static void callback_do_storeauth(GtkWidget *widget,
 	SAFE_FREE(state->account);
 	SAFE_FREE(state->password);
 
-	callback_return_username(state->entry_account, state);
-	callback_return_password(state->entry_password, state);
+	callback_return_username(state->entry_account, (gpointer)state);
+	callback_return_password(state->entry_password, (gpointer)state);
 
-	gtk_widget_destroy(state->window_creds_prompt);
+	if (state->window_creds_prompt) {
+		gtk_widget_destroy(GTK_WIDGET(state->window_creds_prompt));
+		state->window_creds_prompt = NULL;
+	}
 }
 
 static void callback_continue(GtkWidget *widget,
@@ -1537,7 +1559,7 @@ static int init_join_state(struct join_state **state)
 {
 	struct join_state *s;
 
-	s = malloc(sizeof(struct join_state));
+	s = (struct join_state *)malloc(sizeof(struct join_state));
 	if (!s) {
 		return -1;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list