summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-15 17:06:54 +0200
committerGünther Deschner <gd@samba.org>2009-05-15 19:51:02 +0200
commit473bf41d20b25bd7d98ea6647e6295b3fb6f34e1 (patch)
tree020122e0d3492b498db05323ce33273bbbdea983 /source3/lib/netapi
parentc085c8311dfadcb05594714149632e9523a27c14 (diff)
downloadsamba-473bf41d20b25bd7d98ea6647e6295b3fb6f34e1.tar.gz
samba-473bf41d20b25bd7d98ea6647e6295b3fb6f34e1.tar.bz2
samba-473bf41d20b25bd7d98ea6647e6295b3fb6f34e1.zip
s3-netdomjoin-gui: only gray out labels when not root and not connecting to
remote machines. Guenther
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 66e95720cd..032d65c304 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -1490,7 +1490,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 +1579,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 +1589,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");
}