summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-12 23:12:53 +0200
committerGünther Deschner <gd@samba.org>2008-04-13 00:46:33 +0200
commita75421b0190763e5e482db215d8b1e6052bdcc19 (patch)
tree942f02066e05ba2e72eb3532b5d0adcf3ecc9cd1 /source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
parent25953779884483b9bb49feaa7da0f634ed20681b (diff)
downloadsamba-a75421b0190763e5e482db215d8b1e6052bdcc19.tar.gz
samba-a75421b0190763e5e482db215d8b1e6052bdcc19.tar.bz2
samba-a75421b0190763e5e482db215d8b1e6052bdcc19.zip
Fix ou handling in netdomjoin-gui.
The ou list was concatenated again and again... Guenther (This used to be commit 84608e165e24c68c12d40086f81684ef37f69159)
Diffstat (limited to 'source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c')
-rw-r--r--source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index fa1bafd5ae..a7b2079f95 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -84,6 +84,7 @@ typedef struct join_state {
uint16_t server_role;
gboolean settings_changed;
gboolean hostname_changed;
+ uint32_t stored_num_ous;
} join_state;
static void debug(const char *format, ...)
@@ -932,11 +933,15 @@ static void callback_do_getous(GtkWidget *widget,
return;
}
+ for (i=0; i<state->stored_num_ous; i++) {
+ gtk_combo_box_remove_text(GTK_COMBO_BOX(state->entry_ou_list), 0);
+ }
for (i=0; i<num_ous && ous[i] != NULL; i++) {
gtk_combo_box_append_text(GTK_COMBO_BOX(state->entry_ou_list),
ous[i]);
}
NetApiBufferFree(ous);
+ state->stored_num_ous = num_ous;
gtk_combo_box_set_active(GTK_COMBO_BOX(state->entry_ou_list), num_ous-1);
}