summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/examples
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-02 00:49:33 +0200
committerGünther Deschner <gd@samba.org>2008-09-05 13:06:09 +0200
commitb0ab216cd53acf119aaba88a3d07f01810a5dfa9 (patch)
treec67005cba47d697ea4e03fd32fcd2e7776cacd3f /source3/lib/netapi/examples
parent78ed824dab95209ea9d48d4478e3a5de24060b7d (diff)
downloadsamba-b0ab216cd53acf119aaba88a3d07f01810a5dfa9.tar.gz
samba-b0ab216cd53acf119aaba88a3d07f01810a5dfa9.tar.bz2
samba-b0ab216cd53acf119aaba88a3d07f01810a5dfa9.zip
netdomjoin-gui: fix some small errors in callbacks.
Guenther (This used to be commit 74031b0b4ac1301cff6ca551c3264c4137a43294)
Diffstat (limited to 'source3/lib/netapi/examples')
-rw-r--r--source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 45571e3f14..d5b60f1878 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -827,9 +827,11 @@ static void callback_enter_hostname_and_unlock(GtkWidget *widget,
if (strcasecmp(state->my_hostname, entry_text) == 0) {
state->hostname_changed = FALSE;
gtk_widget_set_sensitive(GTK_WIDGET(state->button_ok), FALSE);
- return;
+ /* return; */
+ } else {
+ state->hostname_changed = TRUE;
}
- state->hostname_changed = TRUE;
+
if (state->name_type_initial == NetSetupDomainName) {
if (asprintf(&str, "%s.%s", entry_text, state->my_dnsdomain) == -1) {
return;
@@ -852,7 +854,7 @@ static void callback_enter_computer_description_and_unlock(GtkWidget *widget,
{
const gchar *entry_text = NULL;
struct join_state *state = (struct join_state *)data;
- int string_unchanged = 0;
+ int string_unchanged = FALSE;
entry_text = gtk_entry_get_text(GTK_ENTRY(widget));
debug("callback_enter_computer_description_and_unlock: %s\n",
@@ -865,8 +867,8 @@ static void callback_enter_computer_description_and_unlock(GtkWidget *widget,
return;
}
#endif
- if (entry_text && strcasecmp(state->comment, entry_text) == 0) {
- string_unchanged = 1;
+ if (entry_text && state->comment && strcasecmp(state->comment, entry_text) == 0) {
+ string_unchanged = TRUE;
gtk_widget_set_sensitive(GTK_WIDGET(state->button_apply),
FALSE);
return;