summaryrefslogtreecommitdiff
path: root/source4/gtk/tools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-24 17:34:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:28 -0500
commit36db6faff3d495f5906d8e34275493234c2399f8 (patch)
treed675bc809c46bb1a0a27240761f4252c5ef6c59e /source4/gtk/tools
parent026bae22de58fde67514a3a940d8f627edf8791a (diff)
downloadsamba-36db6faff3d495f5906d8e34275493234c2399f8.tar.gz
samba-36db6faff3d495f5906d8e34275493234c2399f8.tar.bz2
samba-36db6faff3d495f5906d8e34275493234c2399f8.zip
r3166: Bunch of small GUI updates. gwcrontab works again, as does selecting a
domain in gwsam (This used to be commit 575e380ab45787cbe0fa2bdda6e1164e3e36f2b8)
Diffstat (limited to 'source4/gtk/tools')
-rw-r--r--source4/gtk/tools/gwcrontab.c8
-rw-r--r--source4/gtk/tools/gwsam.c12
2 files changed, 17 insertions, 3 deletions
diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c
index b3137a9a19..97660c9225 100644
--- a/source4/gtk/tools/gwcrontab.c
+++ b/source4/gtk/tools/gwcrontab.c
@@ -85,6 +85,7 @@ on_connect_activate (GtkMenuItem *menuitem,
GtkRpcBindingDialog *d;
NTSTATUS status;
gint result;
+ TALLOC_CTX *mem_ctx;
d = GTK_RPC_BINDING_DIALOG(gtk_rpc_binding_dialog_new(FALSE, NULL));
result = gtk_dialog_run(GTK_DIALOG(d));
@@ -96,16 +97,21 @@ on_connect_activate (GtkMenuItem *menuitem,
return;
}
+ mem_ctx = talloc_init("gwcrontab_connect");
/* If connected, get list of jobs */
- status = dcerpc_pipe_connect(&at_pipe, gtk_rpc_binding_dialog_get_binding(d, DCERPC_ATSVC_NAME), DCERPC_ATSVC_UUID, DCERPC_ATSVC_VERSION, lp_workgroup(), gtk_rpc_binding_dialog_get_username(d), gtk_rpc_binding_dialog_get_password(d));
+
+ status = dcerpc_pipe_connect_b(&at_pipe, gtk_rpc_binding_dialog_get_binding(d, mem_ctx), DCERPC_ATSVC_UUID, DCERPC_ATSVC_VERSION, lp_workgroup(), gtk_rpc_binding_dialog_get_username(d), gtk_rpc_binding_dialog_get_password(d));
+
if(!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(mainwin, status);
at_pipe = NULL;
gtk_widget_destroy(GTK_WIDGET(d));
+ talloc_destroy(mem_ctx);
return;
}
gtk_widget_destroy(GTK_WIDGET(d));
+ talloc_destroy(mem_ctx);
update_joblist();
}
diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c
index c6b68c5e3c..e31f9344e8 100644
--- a/source4/gtk/tools/gwsam.c
+++ b/source4/gtk/tools/gwsam.c
@@ -91,7 +91,7 @@ on_select_domain_activate (GtkMenuItem *menuitem,
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:
+ case GTK_RESPONSE_OK:
break;
default:
gtk_widget_destroy(GTK_WIDGET(d));
@@ -105,7 +105,7 @@ on_select_domain_activate (GtkMenuItem *menuitem,
gtk_widget_destroy(GTK_WIDGET(d));
}
-void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
+static void connect_sam(void)
{
GtkRpcBindingDialog *d;
NTSTATUS status;
@@ -153,6 +153,12 @@ void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
gtk_window_set_title (GTK_WINDOW (mainwin), talloc_asprintf(mem_ctx, "User Manager - Connected to %s", gtk_rpc_binding_dialog_get_host(d)));
gtk_widget_destroy(GTK_WIDGET(d));
talloc_destroy(mem_ctx);
+
+}
+
+void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
+{
+ connect_sam();
}
void on_disconnect_activate (GtkMenuItem *menuitem, gpointer user_data)
@@ -431,9 +437,11 @@ create_mainwindow (void)
{
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
+ setup_logging("gwsam", True);
gtk_init(&argc, &argv);
mainwin = create_mainwindow();
+ connect_sam();
gtk_widget_show(mainwin);
gtk_main();