summaryrefslogtreecommitdiff
path: root/source4/gtk/tools/gwsam.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-09-22 12:32:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:01 -0500
commit369a5d64e462e084e6c5fe4984d56da18b2c92d9 (patch)
tree815e7a10696ef40205c1e16c4e01b660a7a8f0b7 /source4/gtk/tools/gwsam.c
parentbc8ef3d1b6bfdf279d65783869b9a247c1da38aa (diff)
downloadsamba-369a5d64e462e084e6c5fe4984d56da18b2c92d9.tar.gz
samba-369a5d64e462e084e6c5fe4984d56da18b2c92d9.tar.bz2
samba-369a5d64e462e084e6c5fe4984d56da18b2c92d9.zip
r2518: Some long overdue changes:
- Samba4-style code in lib/registry (struct registry_key instead of REG_KEY, etc) - Use hives (like Windows has drives) instead of one root key (like a Unix FS) - usability fixes in the GTK utilities (autodetect the username, enable/disable options, etc) - fix gwsam compile - several bugfixes in the registry rpc code - do charset conversion in nt4 registry backend (This used to be commit 2762ed3b9bf1d67dd54d63e02cddbfd71ea89892)
Diffstat (limited to 'source4/gtk/tools/gwsam.c')
-rw-r--r--source4/gtk/tools/gwsam.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c
index 31bbf002de..2f0a8e300c 100644
--- a/source4/gtk/tools/gwsam.c
+++ b/source4/gtk/tools/gwsam.c
@@ -39,13 +39,12 @@ void update_userlist(void)
struct samr_EnumDomainUsers r;
uint32_t resume_handle=0;
int i;
- BOOL ret = True;
TALLOC_CTX *mem_ctx;
if(!sam_pipe) return;
mem_ctx = talloc_init("update_userlist");
- r.in.handle = &domain_handle;
+ r.in.domain_handle = &domain_handle;
r.in.resume_handle = &resume_handle;
r.in.acct_flags = 0;
r.in.max_size = (uint32_t)-1;
@@ -87,7 +86,7 @@ on_select_domain_activate (GtkMenuItem *menuitem,
{
GtkSelectDomainDialog *d;
gint result;
- d = gtk_select_domain_dialog_new(sam_pipe);
+ d = GTK_SELECT_DOMAIN_DIALOG(gtk_select_domain_dialog_new(sam_pipe));
result = gtk_dialog_run(GTK_DIALOG(d));
switch(result) {
case GTK_RESPONSE_ACCEPT:
@@ -129,7 +128,7 @@ void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
r.in.system_name = 0;
r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
- r.out.handle = &sam_handle;
+ r.out.connect_handle = &sam_handle;
mem_ctx = talloc_init("connect");
status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &r);
@@ -218,13 +217,7 @@ create_mainwindow (void)
GtkWidget *new1;
GtkWidget *separatormenuitem1;
GtkWidget *quit;
- GtkWidget *menuitem2;
GtkWidget *seldomain;
- GtkWidget *menuitem2_menu;
- GtkWidget *cut1;
- GtkWidget *copy1;
- GtkWidget *paste1;
- GtkWidget *delete1;
GtkWidget *policies;
GtkWidget *policies_menu;
GtkWidget *account;
@@ -260,23 +253,20 @@ create_mainwindow (void)
gtk_widget_show (menubar);
gtk_box_pack_start (GTK_BOX (vbox1), menubar, FALSE, FALSE, 0);
- menuitem1 = gtk_menu_item_new_with_mnemonic ("_User");
+ menuitem1 = gtk_menu_item_new_with_mnemonic ("_File");
gtk_widget_show (menuitem1);
gtk_container_add (GTK_CONTAINER (menubar), menuitem1);
menuitem1_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
- new1 = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
- gtk_widget_show (new1);
- gtk_container_add (GTK_CONTAINER (menuitem1_menu), new1);
-
connect = gtk_menu_item_new_with_mnemonic ("_Connect");
gtk_widget_show (connect);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), connect);
seldomain = gtk_menu_item_new_with_mnemonic("_Select Domain");
gtk_widget_show(seldomain);
+ gtk_widget_set_sensitive (seldomain, FALSE);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), seldomain);
separatormenuitem1 = gtk_separator_menu_item_new ();
@@ -288,9 +278,24 @@ create_mainwindow (void)
gtk_widget_show (quit);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), quit);
+ menuitem1 = gtk_menu_item_new_with_mnemonic ("_User");
+ gtk_widget_show (menuitem1);
+ gtk_container_add (GTK_CONTAINER (menubar), menuitem1);
+ gtk_widget_set_sensitive (menuitem1, FALSE);
+
+ menuitem1_menu = gtk_menu_new ();
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
+
+ new1 = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
+ gtk_widget_show (new1);
+ gtk_container_add (GTK_CONTAINER (menuitem1_menu), new1);
+
+
+
policies = gtk_menu_item_new_with_mnemonic ("_Policies");
gtk_widget_show (policies);
gtk_container_add (GTK_CONTAINER (menubar), policies);
+ gtk_widget_set_sensitive (policies, FALSE);
policies_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (policies), policies_menu);
@@ -326,6 +331,7 @@ create_mainwindow (void)
refresh = gtk_image_menu_item_new_from_stock ("gtk-refresh", accel_group);
gtk_widget_show (refresh);
gtk_container_add (GTK_CONTAINER (menuitem3_menu), refresh);
+ gtk_widget_set_sensitive (refresh, FALSE);
menuitem4 = gtk_menu_item_new_with_mnemonic ("_Help");
gtk_widget_show (menuitem4);