Changeset 224 for branches/samba-3.3.x/source/lib/netapi/examples
- Timestamp:
- May 24, 2009, 7:55:48 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
r206 r224 79 79 uint32_t stored_num_ous; 80 80 char *target_hostname; 81 uid_t uid; 81 82 } join_state; 82 83 … … 1441 1442 entry = gtk_entry_new(); 1442 1443 gtk_entry_set_max_length(GTK_ENTRY(entry), 256); 1444 1445 if (state->uid != 0) { 1446 gtk_widget_set_sensitive(GTK_WIDGET(entry), FALSE); 1447 } 1443 1448 g_signal_connect(G_OBJECT(entry), "changed", 1444 1449 G_CALLBACK(callback_enter_computer_description_and_unlock), … … 1527 1532 (gpointer)state); 1528 1533 gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0); 1534 if (state->uid != 0) { 1535 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); 1536 } 1529 1537 gtk_widget_show(button); 1530 1538 … … 1534 1542 gtk_misc_set_alignment(GTK_MISC(state->label_reboot), 0, 0); 1535 1543 gtk_box_pack_start(GTK_BOX(vbox), state->label_reboot, TRUE, TRUE, 0); 1544 if (state->uid != 0) { 1545 gtk_label_set_text(GTK_LABEL(state->label_reboot), 1546 "You cannot change computer description as you're not running with root permissions"); 1547 } 1548 1536 1549 gtk_widget_show(state->label_reboot); 1537 1550 … … 1764 1777 } 1765 1778 1779 state->uid = geteuid(); 1780 1766 1781 state->ctx = ctx; 1767 1782
Note:
See TracChangeset
for help on using the changeset viewer.