summaryrefslogtreecommitdiff
path: root/source4/gtk
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-27 22:41:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:51 -0500
commit4eda9e51b3759a40b1c39d36185b5db9b8b8017e (patch)
tree1b851e6886bbb43bd9a13644740dd7af5b0b4181 /source4/gtk
parent93c32f81e2613c111d69ae6bcc37eb9e58788e28 (diff)
downloadsamba-4eda9e51b3759a40b1c39d36185b5db9b8b8017e.tar.gz
samba-4eda9e51b3759a40b1c39d36185b5db9b8b8017e.tar.bz2
samba-4eda9e51b3759a40b1c39d36185b5db9b8b8017e.zip
r3301: Simplify code
(This used to be commit dcdc6666d55c1ad006a5a4e58b337874478a66a4)
Diffstat (limited to 'source4/gtk')
-rw-r--r--source4/gtk/common/gtk-smb.c106
-rw-r--r--source4/gtk/common/select.c20
-rw-r--r--source4/gtk/tools/gepdump.c44
-rw-r--r--source4/gtk/tools/gregedit.c33
-rw-r--r--source4/gtk/tools/gwcrontab.c36
-rw-r--r--source4/gtk/tools/gwsam.c28
-rw-r--r--source4/gtk/tools/gwsam_user.c50
7 files changed, 72 insertions, 245 deletions
diff --git a/source4/gtk/common/gtk-smb.c b/source4/gtk/common/gtk-smb.c
index 016b162aa8..9553827cd0 100644
--- a/source4/gtk/common/gtk-smb.c
+++ b/source4/gtk/common/gtk-smb.c
@@ -94,36 +94,29 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di
gtk_window_set_title (GTK_WINDOW (gtk_rpc_binding_dialog), "Connect");
dialog_vbox1 = GTK_DIALOG (gtk_rpc_binding_dialog)->vbox;
- gtk_widget_show (dialog_vbox1);
vbox1 = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);
frame_transport = gtk_frame_new (NULL);
- gtk_widget_show (frame_transport);
gtk_box_pack_start (GTK_BOX (vbox1), frame_transport, TRUE, TRUE, 0);
vbox6 = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox6);
gtk_container_add (GTK_CONTAINER (frame_transport), vbox6);
gtk_rpc_binding_dialog->transport_ncalrpc = gtk_radio_button_new_with_mnemonic (NULL, "Local Host");
- gtk_widget_show (gtk_rpc_binding_dialog->transport_ncalrpc);
gtk_box_pack_start (GTK_BOX (vbox6), gtk_rpc_binding_dialog->transport_ncalrpc, FALSE, FALSE, 0);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (gtk_rpc_binding_dialog->transport_ncalrpc), transport_smb_group);
transport_smb_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gtk_rpc_binding_dialog->transport_ncalrpc));
gtk_rpc_binding_dialog->transport_smb = gtk_radio_button_new_with_mnemonic (NULL, "RPC over SMB over TCP/IP");
- gtk_widget_show (gtk_rpc_binding_dialog->transport_smb);
gtk_box_pack_start (GTK_BOX (vbox6), gtk_rpc_binding_dialog->transport_smb, FALSE, FALSE, 0);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (gtk_rpc_binding_dialog->transport_smb), transport_smb_group);
transport_smb_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gtk_rpc_binding_dialog->transport_smb));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_rpc_binding_dialog->transport_smb), TRUE);
gtk_rpc_binding_dialog->transport_tcp_ip = gtk_radio_button_new_with_mnemonic (NULL, "RPC over TCP/IP");
- gtk_widget_show (gtk_rpc_binding_dialog->transport_tcp_ip);
gtk_box_pack_start (GTK_BOX (vbox6), gtk_rpc_binding_dialog->transport_tcp_ip, FALSE, FALSE, 0);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (gtk_rpc_binding_dialog->transport_tcp_ip), transport_smb_group);
transport_smb_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gtk_rpc_binding_dialog->transport_tcp_ip));
@@ -131,29 +124,23 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di
label1 = gtk_label_new ("Transport");
- gtk_widget_show (label1);
gtk_frame_set_label_widget (GTK_FRAME (frame_transport), label1);
gtk_rpc_binding_dialog->frame_host = gtk_frame_new (NULL);
- gtk_widget_show (gtk_rpc_binding_dialog->frame_host);
gtk_box_pack_start (GTK_BOX (vbox1), gtk_rpc_binding_dialog->frame_host, TRUE, TRUE, 0);
hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
gtk_container_add (GTK_CONTAINER (gtk_rpc_binding_dialog->frame_host), hbox1);
lbl_name = gtk_label_new ("Name");
- gtk_widget_show (lbl_name);
gtk_box_pack_start (GTK_BOX (hbox1), lbl_name, TRUE, TRUE, 0);
gtk_rpc_binding_dialog->entry_host = gtk_entry_new ();
- gtk_widget_show (gtk_rpc_binding_dialog->entry_host);
gtk_box_pack_start (GTK_BOX (hbox1), gtk_rpc_binding_dialog->entry_host, TRUE, TRUE, 0);
if(gtk_rpc_binding_dialog->sam_pipe)
{
btn_browse = gtk_button_new_with_label ("Browse");
- gtk_widget_show (btn_browse);
gtk_box_pack_start (GTK_BOX (hbox1), btn_browse, TRUE, TRUE, 0);
g_signal_connect ((gpointer) btn_browse, "pressed",
@@ -162,53 +149,42 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di
}
label2 = gtk_label_new ("Host");
- gtk_widget_show (label2);
gtk_frame_set_label_widget (GTK_FRAME (gtk_rpc_binding_dialog->frame_host), label2);
frame_security = gtk_frame_new (NULL);
- gtk_widget_show (frame_security);
gtk_box_pack_start (GTK_BOX (vbox1), frame_security, TRUE, TRUE, 0);
vbox2 = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox2);
gtk_container_add (GTK_CONTAINER (frame_security), vbox2);
gtk_rpc_binding_dialog->chk_sign = gtk_check_button_new_with_mnemonic ("S_ign");
- gtk_widget_show (gtk_rpc_binding_dialog->chk_sign);
gtk_box_pack_start (GTK_BOX (vbox2), gtk_rpc_binding_dialog->chk_sign, FALSE, FALSE, 0);
gtk_rpc_binding_dialog->chk_seal = gtk_check_button_new_with_mnemonic ("_Seal");
- gtk_widget_show (gtk_rpc_binding_dialog->chk_seal);
gtk_box_pack_start (GTK_BOX (vbox2), gtk_rpc_binding_dialog->chk_seal, FALSE, FALSE, 0);
label3 = gtk_label_new ("Security");
- gtk_widget_show (label3);
gtk_frame_set_label_widget (GTK_FRAME (frame_security), label3);
gtk_rpc_binding_dialog->frame_credentials = gtk_frame_new (NULL);
- gtk_widget_show (gtk_rpc_binding_dialog->frame_credentials);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), gtk_rpc_binding_dialog->frame_credentials, TRUE, TRUE, 0);
table1 = gtk_table_new (3, 2, FALSE);
- gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (gtk_rpc_binding_dialog->frame_credentials), table1);
lbl_username = gtk_label_new ("Username:");
- gtk_widget_show (lbl_username);
gtk_table_attach (GTK_TABLE (table1), lbl_username, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (lbl_username), 0, 0.5);
lbl_password = gtk_label_new ("Password:");
- gtk_widget_show (lbl_password);
gtk_table_attach (GTK_TABLE (table1), lbl_password, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (lbl_password), 0, 0.5);
label9 = gtk_label_new ("");
- gtk_widget_show (label9);
gtk_table_attach (GTK_TABLE (table1), label9, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -216,13 +192,11 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di
gtk_rpc_binding_dialog->entry_password = gtk_entry_new ();
gtk_entry_set_visibility (GTK_ENTRY (gtk_rpc_binding_dialog->entry_password), FALSE);
- gtk_widget_show (gtk_rpc_binding_dialog->entry_password);
gtk_table_attach (GTK_TABLE (table1), gtk_rpc_binding_dialog->entry_password, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_rpc_binding_dialog->entry_username = gtk_entry_new ();
- gtk_widget_show (gtk_rpc_binding_dialog->entry_username);
gtk_table_attach (GTK_TABLE (table1), gtk_rpc_binding_dialog->entry_username, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -230,7 +204,6 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di
gtk_entry_set_text(GTK_ENTRY(gtk_rpc_binding_dialog->entry_username), getenv("LOGNAME"));
gtk_rpc_binding_dialog->krb5_chk_button = gtk_check_button_new_with_mnemonic ("_Use kerberos");
- gtk_widget_show (gtk_rpc_binding_dialog->krb5_chk_button);
gtk_table_attach (GTK_TABLE (table1), gtk_rpc_binding_dialog->krb5_chk_button, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -245,20 +218,16 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di
}
lbl_credentials = gtk_label_new ("Credentials");
- gtk_widget_show (lbl_credentials);
gtk_frame_set_label_widget (GTK_FRAME (gtk_rpc_binding_dialog->frame_credentials), lbl_credentials);
dialog_action_area1 = GTK_DIALOG (gtk_rpc_binding_dialog)->action_area;
- gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
btn_cancel = gtk_button_new_from_stock ("gtk-cancel");
- gtk_widget_show (btn_cancel);
gtk_dialog_add_action_widget (GTK_DIALOG (gtk_rpc_binding_dialog), btn_cancel, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (btn_cancel, GTK_CAN_DEFAULT);
btn_connect = gtk_button_new_with_mnemonic ("_Connect");
- gtk_widget_show (btn_connect);
gtk_dialog_add_action_widget (GTK_DIALOG (gtk_rpc_binding_dialog), btn_connect, GTK_RESPONSE_ACCEPT);
gtk_container_set_border_width (GTK_CONTAINER (btn_connect), 1);
GTK_WIDGET_SET_FLAGS (btn_connect, GTK_CAN_DEFAULT);
@@ -269,6 +238,7 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(gtk_rpc_binding_dialog->transport_ncalrpc), TRUE);
+ gtk_widget_show_all(dialog_vbox1);
gtk_widget_grab_focus (btn_connect);
gtk_widget_grab_default (btn_connect);
@@ -365,44 +335,38 @@ const char *gtk_rpc_binding_dialog_get_binding_string(GtkRpcBindingDialog *d, TA
GtkWidget *create_gtk_samba_about_dialog (const char *appname)
{
- GtkWidget *samba_about_dialog;
- GtkWidget *dialog_vbox1;
- GtkWidget *label1;
- GtkWidget *label3;
- GtkWidget *label2;
- GtkWidget *dialog_action_area1;
- GtkWidget *okbutton1;
-
- samba_about_dialog = gtk_dialog_new ();
- gtk_window_set_title (GTK_WINDOW (samba_about_dialog), "About");
-
- dialog_vbox1 = GTK_DIALOG (samba_about_dialog)->vbox;
- gtk_widget_show (dialog_vbox1);
-
-/* FIXME image1 = create_pixmap (samba_about_dialog, "slmed.png");
- gtk_widget_show (image1);
- gtk_box_pack_start (GTK_BOX (dialog_vbox1), image1, TRUE, TRUE, 0);*/
-
- label1 = gtk_label_new (appname);
- gtk_widget_show (label1);
- gtk_box_pack_start (GTK_BOX (dialog_vbox1), label1, FALSE, FALSE, 0);
-
- label3 = gtk_label_new_with_mnemonic ("Part of Samba <http://www.samba.org/>");
- gtk_widget_show (label3);
- gtk_box_pack_start (GTK_BOX (dialog_vbox1), label3, FALSE, FALSE, 0);
-
- label2 = gtk_label_new ("\302\251 1992-2004 The Samba Team");
- gtk_widget_show (label2);
- gtk_box_pack_start (GTK_BOX (dialog_vbox1), label2, FALSE, FALSE, 0);
-
- dialog_action_area1 = GTK_DIALOG (samba_about_dialog)->action_area;
- gtk_widget_show (dialog_action_area1);
- gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
-
- okbutton1 = gtk_button_new_from_stock ("gtk-ok");
- gtk_widget_show (okbutton1);
- gtk_dialog_add_action_widget (GTK_DIALOG (samba_about_dialog), okbutton1, GTK_RESPONSE_OK);
- GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
-
- return samba_about_dialog;
+ GtkWidget *samba_about_dialog;
+ GtkWidget *dialog_vbox1;
+ GtkWidget *label1;
+ GtkWidget *label3;
+ GtkWidget *label2;
+ GtkWidget *dialog_action_area1;
+ GtkWidget *okbutton1;
+
+ samba_about_dialog = gtk_dialog_new ();
+ gtk_window_set_title (GTK_WINDOW (samba_about_dialog), "About");
+
+ dialog_vbox1 = GTK_DIALOG (samba_about_dialog)->vbox;
+
+ /* FIXME image1 = create_pixmap (samba_about_dialog, "slmed.png");
+ gtk_box_pack_start (GTK_BOX (dialog_vbox1), image1, TRUE, TRUE, 0);*/
+
+ label1 = gtk_label_new (appname);
+ gtk_box_pack_start (GTK_BOX (dialog_vbox1), label1, FALSE, FALSE, 0);
+
+ label3 = gtk_label_new_with_mnemonic ("Part of Samba <http://www.samba.org/>");
+ gtk_box_pack_start (GTK_BOX (dialog_vbox1), label3, FALSE, FALSE, 0);
+
+ label2 = gtk_label_new ("\302\251 1992-2004 The Samba Team");
+ gtk_box_pack_start (GTK_BOX (dialog_vbox1), label2, FALSE, FALSE, 0);
+
+ dialog_action_area1 = GTK_DIALOG (samba_about_dialog)->action_area;
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
+
+ okbutton1 = gtk_button_new_from_stock ("gtk-ok");
+ gtk_dialog_add_action_widget (GTK_DIALOG (samba_about_dialog), okbutton1, GTK_RESPONSE_OK);
+ GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
+ gtk_widget_show_all(dialog_vbox1);
+
+ return samba_about_dialog;
}
diff --git a/source4/gtk/common/select.c b/source4/gtk/common/select.c
index 3b29d0ed31..ba17092cb9 100644
--- a/source4/gtk/common/select.c
+++ b/source4/gtk/common/select.c
@@ -44,26 +44,20 @@ void gtk_select_domain_dialog_init (GtkSelectDomainDialog *select_domain_dialog)
gtk_window_set_title (GTK_WINDOW (select_domain_dialog), "Select Domain");
dialog_vbox1 = GTK_DIALOG (select_domain_dialog)->vbox;
- gtk_widget_show (dialog_vbox1);
hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 0);
label1 = gtk_label_new ("Domain:");
- gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 0);
select_domain_dialog->entry_domain = gtk_entry_new ();
- gtk_widget_show (select_domain_dialog->entry_domain);
gtk_box_pack_start (GTK_BOX (hbox1), select_domain_dialog->entry_domain, TRUE, TRUE, 0);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), scrolledwindow1, TRUE, TRUE, 0);
select_domain_dialog->list_domains = gtk_tree_view_new ();
- gtk_widget_show (select_domain_dialog->list_domains);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), select_domain_dialog->list_domains);
curcol = gtk_tree_view_column_new ();
@@ -78,17 +72,15 @@ void gtk_select_domain_dialog_init (GtkSelectDomainDialog *select_domain_dialog)
g_object_unref(select_domain_dialog->store_domains);
dialog_action_area1 = GTK_DIALOG (select_domain_dialog)->action_area;
- gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
- gtk_widget_show (cancelbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (select_domain_dialog), cancelbutton1, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
okbutton1 = gtk_button_new_from_stock ("gtk-ok");
- gtk_widget_show (okbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (select_domain_dialog), okbutton1, GTK_RESPONSE_OK);
+ gtk_widget_show_all(dialog_vbox1);
GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
}
@@ -203,26 +195,20 @@ void gtk_select_host_dialog_init (GtkSelectHostDialog *select_host_dialog)
gtk_window_set_title (GTK_WINDOW (select_host_dialog), "Select Host");
dialog_vbox2 = GTK_DIALOG (select_host_dialog)->vbox;
- gtk_widget_show (dialog_vbox2);
hbox2 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox2, TRUE, TRUE, 0);
label2 = gtk_label_new ("Host");
- gtk_widget_show (label2);
gtk_box_pack_start (GTK_BOX (hbox2), label2, FALSE, FALSE, 0);
select_host_dialog->entry_host = gtk_entry_new ();
- gtk_widget_show (select_host_dialog->entry_host);
gtk_box_pack_start (GTK_BOX (hbox2), select_host_dialog->entry_host, TRUE, TRUE, 0);
scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow2);
gtk_box_pack_start (GTK_BOX (dialog_vbox2), scrolledwindow2, TRUE, TRUE, 0);
select_host_dialog->tree_host = gtk_tree_view_new ();
- gtk_widget_show (select_host_dialog->tree_host);
gtk_container_add (GTK_CONTAINER (scrolledwindow2), select_host_dialog->tree_host);
select_host_dialog->store_host = gtk_tree_store_new(1, G_TYPE_STRING);
@@ -230,16 +216,14 @@ void gtk_select_host_dialog_init (GtkSelectHostDialog *select_host_dialog)
g_object_unref(select_host_dialog->store_host);
dialog_action_area2 = GTK_DIALOG (select_host_dialog)->action_area;
- gtk_widget_show (dialog_action_area2);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);
cancelbutton2 = gtk_button_new_from_stock ("gtk-cancel");
- gtk_widget_show (cancelbutton2);
gtk_dialog_add_action_widget (GTK_DIALOG (select_host_dialog), cancelbutton2, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton2, GTK_CAN_DEFAULT);
okbutton2 = gtk_button_new_from_stock ("gtk-ok");
- gtk_widget_show (okbutton2);
+ gtk_widget_show_all (dialog_vbox2);
gtk_dialog_add_action_widget (GTK_DIALOG (select_host_dialog), okbutton2, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (okbutton2, GTK_CAN_DEFAULT);
}
diff --git a/source4/gtk/tools/gepdump.c b/source4/gtk/tools/gepdump.c
index 12018277fd..5232187644 100644
--- a/source4/gtk/tools/gepdump.c
+++ b/source4/gtk/tools/gepdump.c
@@ -22,6 +22,14 @@
#include "includes.h"
#include "gtk/common/gtk-smb.h"
+/*
+ * Show:
+ * - RPC statistics
+ * - Available interfaces
+ * - Per interface: available endpoints
+ * - Per interface auth details
+ */
+
static GtkWidget *mainwin;
static GtkWidget *entry_binding;
static GtkTreeStore *store_eps;
@@ -171,6 +179,7 @@ static GtkWidget* create_mainwindow (void)
{
GtkWidget *mainwindow;
GtkWidget *vbox1;
+ GtkWidget *vbox2;
GtkWidget *menubar1;
GtkWidget *menuitem1;
GtkWidget *menuitem1_menu;
@@ -180,10 +189,12 @@ static GtkWidget* create_mainwindow (void)
GtkWidget *about1;
GtkWidget *handlebox1;
GtkWidget *hbox1;
+ GtkWidget *hbox2;
GtkWidget *label1;
GtkWidget *btn_select_target;
GtkWidget *btn_dump;
GtkWidget *scrolledwindow1;
+ GtkWidget *frame1;
GtkWidget *tree_eps;
GtkTreeViewColumn *curcol;
GtkCellRenderer *renderer;
@@ -211,49 +222,42 @@ static GtkWidget* create_mainwindow (void)
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
quit1 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
- gtk_widget_show (quit1);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), quit1);
menuitem4 = gtk_menu_item_new_with_mnemonic ("_Help");
- gtk_widget_show (menuitem4);
gtk_container_add (GTK_CONTAINER (menubar1), menuitem4);
menuitem4_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);
about1 = gtk_menu_item_new_with_mnemonic ("_About");
- gtk_widget_show (about1);
gtk_container_add (GTK_CONTAINER (menuitem4_menu), about1);
handlebox1 = gtk_handle_box_new ();
- gtk_widget_show (handlebox1);
gtk_box_pack_start (GTK_BOX (vbox1), handlebox1, FALSE, TRUE, 0);
hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
gtk_container_add (GTK_CONTAINER (handlebox1), hbox1);
label1 = gtk_label_new ("Location:");
- gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 0);
entry_binding = gtk_entry_new ();
gtk_entry_set_text(GTK_ENTRY(entry_binding), "ncalrpc:");
- gtk_widget_show (entry_binding);
gtk_box_pack_start (GTK_BOX (hbox1), entry_binding, FALSE, FALSE, 0);
btn_select_target = gtk_button_new_with_mnemonic ("_Select Target");
- gtk_widget_show (btn_select_target);
gtk_box_pack_start (GTK_BOX (hbox1), btn_select_target, FALSE, FALSE, 0);
btn_dump = gtk_button_new_with_mnemonic ("_Dump");
- gtk_widget_show (btn_dump);
gtk_box_pack_start (GTK_BOX (hbox1), btn_dump, FALSE, FALSE, 0);
- scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow1);
- gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow1, TRUE, TRUE, 0);
+ hbox2 = gtk_hbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (vbox1), hbox2);
+ scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
+ gtk_box_pack_start (GTK_BOX(hbox2), scrolledwindow1, TRUE, TRUE, 0);
+
tree_eps = gtk_tree_view_new ();
curcol = gtk_tree_view_column_new ();
@@ -277,11 +281,21 @@ static GtkWidget* create_mainwindow (void)
gtk_tree_view_set_model(GTK_TREE_VIEW(tree_eps), GTK_TREE_MODEL(store_eps));
g_object_unref(store_eps);
- gtk_widget_show (tree_eps);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), tree_eps);
+ vbox2 = gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (hbox2), vbox2);
+
+ frame1 = gtk_frame_new("Interface");
+ gtk_container_add (GTK_CONTAINER(vbox2), frame1);
+
+ frame1 = gtk_frame_new("Statistics");
+ gtk_container_add (GTK_CONTAINER(vbox2), frame1);
+
+ frame1 = gtk_frame_new("Authentication");
+ gtk_container_add (GTK_CONTAINER(vbox2), frame1);
+
statusbar = gtk_statusbar_new ();
- gtk_widget_show (statusbar);
gtk_box_pack_start (GTK_BOX (vbox1), statusbar, FALSE, FALSE, 0);
g_signal_connect ((gpointer) quit1, "activate",
@@ -310,7 +324,7 @@ static GtkWidget* create_mainwindow (void)
load_interfaces();
setup_logging("gepdump", True);
mainwin = create_mainwindow();
- gtk_widget_show(mainwin);
+ gtk_widget_show_all(mainwin);
gtk_main();
return 0;
}
diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c
index 37645be848..dfca6cef19 100644
--- a/source4/gtk/tools/gregedit.c
+++ b/source4/gtk/tools/gregedit.c
@@ -158,7 +158,7 @@ static void on_open_remote_activate(GtkMenuItem *menuitem, gpointer user_data)
char *credentials;
const char *location;
char *tmp;
- GtkWidget *rpcwin = GTK_WIDGET(gtk_rpc_binding_dialog_new(TRUE, NULL));
+ GtkWidget *rpcwin = GTK_WIDGET(gtk_rpc_binding_dialog_new(FALSE, NULL));
gint result = gtk_dialog_run(GTK_DIALOG(rpcwin));
WERROR error;
@@ -347,15 +347,12 @@ static GtkWidget* create_mainwin (void)
gtk_window_set_default_size (GTK_WINDOW (mainwin), 642, 562);
vbox1 = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (mainwin), vbox1);
menubar = gtk_menu_bar_new ();
- gtk_widget_show (menubar);
gtk_box_pack_start (GTK_BOX (vbox1), menubar, FALSE, FALSE, 0);
menu_file = gtk_menu_item_new_with_mnemonic ("_File");
- gtk_widget_show (menu_file);
gtk_container_add (GTK_CONTAINER (menubar), menu_file);
menu_file_menu = gtk_menu_new ();
@@ -363,7 +360,6 @@ static GtkWidget* create_mainwin (void)
if(reg_has_backend("nt4")) {
open_nt4 = gtk_image_menu_item_new_with_mnemonic("Open _NT4 file");
- gtk_widget_show (open_nt4);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_nt4);
g_signal_connect ((gpointer) open_nt4, "activate",
@@ -373,7 +369,6 @@ static GtkWidget* create_mainwin (void)
if(reg_has_backend("w95")) {
open_w95 = gtk_image_menu_item_new_with_mnemonic("Open Win_9x file");
- gtk_widget_show (open_w95);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_w95);
g_signal_connect ((gpointer) open_w95, "activate",
@@ -383,7 +378,6 @@ static GtkWidget* create_mainwin (void)
if(reg_has_backend("gconf")) {
open_gconf = gtk_image_menu_item_new_with_mnemonic ("Open _GConf");
- gtk_widget_show (open_gconf);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_gconf);
g_signal_connect ((gpointer) open_gconf, "activate",
@@ -393,7 +387,6 @@ static GtkWidget* create_mainwin (void)
if(reg_has_backend("rpc")) {
open_remote = gtk_menu_item_new_with_mnemonic ("Open _Remote");
- gtk_widget_show (open_remote);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_remote);
g_signal_connect ((gpointer) open_remote, "activate",
@@ -403,7 +396,6 @@ static GtkWidget* create_mainwin (void)
if(reg_has_backend("ldb")) {
open_ldb = gtk_image_menu_item_new_with_mnemonic("Open _LDB file");
- gtk_widget_show (open_ldb);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_ldb);
g_signal_connect ((gpointer) open_ldb, "activate",
@@ -412,68 +404,55 @@ static GtkWidget* create_mainwin (void)
}
save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
- gtk_widget_show (save);
gtk_widget_set_sensitive( save, False );
gtk_container_add (GTK_CONTAINER (menu_file_menu), save);
save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
- gtk_widget_show (save_as);
gtk_widget_set_sensitive( save_as, False );
gtk_container_add (GTK_CONTAINER (menu_file_menu), save_as);
separatormenuitem1 = gtk_menu_item_new ();
- gtk_widget_show (separatormenuitem1);
gtk_container_add (GTK_CONTAINER (menu_file_menu), separatormenuitem1);
gtk_widget_set_sensitive (separatormenuitem1, FALSE);
quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
- gtk_widget_show (quit);
gtk_container_add (GTK_CONTAINER (menu_file_menu), quit);
men_edit = gtk_menu_item_new_with_mnemonic ("_Edit");
- gtk_widget_show (men_edit);
gtk_container_add (GTK_CONTAINER (menubar), men_edit);
men_edit_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (men_edit), men_edit_menu);
cut = gtk_image_menu_item_new_from_stock ("gtk-cut", accel_group);
- gtk_widget_show (cut);
gtk_widget_set_sensitive(cut, False);
gtk_container_add (GTK_CONTAINER (men_edit_menu), cut);
copy = gtk_image_menu_item_new_from_stock ("gtk-copy", accel_group);
- gtk_widget_show (copy);
gtk_widget_set_sensitive(copy, False);
gtk_container_add (GTK_CONTAINER (men_edit_menu), copy);
paste = gtk_image_menu_item_new_from_stock ("gtk-paste", accel_group);
- gtk_widget_show (paste);
gtk_widget_set_sensitive(paste, False);
gtk_container_add (GTK_CONTAINER (men_edit_menu), paste);
delete = gtk_image_menu_item_new_from_stock ("gtk-delete", accel_group);
- gtk_widget_show (delete);
gtk_widget_set_sensitive(delete, False);
gtk_container_add (GTK_CONTAINER (men_edit_menu), delete);
help = gtk_menu_item_new_with_mnemonic ("_Help");
- gtk_widget_show (help);
gtk_container_add (GTK_CONTAINER (menubar), help);
help_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (help), help_menu);
about = gtk_menu_item_new_with_mnemonic ("_About");
- gtk_widget_show (about);
gtk_container_add (GTK_CONTAINER (help_menu), about);
hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow1);
gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow1, TRUE, TRUE, 0);
tree_keys = gtk_tree_view_new ();
@@ -487,7 +466,6 @@ static GtkWidget* create_mainwin (void)
gtk_tree_view_append_column(GTK_TREE_VIEW(tree_keys), curcol);
gtk_tree_view_column_add_attribute(curcol, renderer, "text", 0);
- gtk_widget_show (tree_keys);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), tree_keys);
store_keys = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
gtk_tree_view_set_model(GTK_TREE_VIEW(tree_keys), GTK_TREE_MODEL(store_keys));
@@ -501,7 +479,6 @@ static GtkWidget* create_mainwin (void)
scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow2);
gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow2, TRUE, TRUE, 0);
tree_vals = gtk_tree_view_new ();
@@ -529,7 +506,6 @@ static GtkWidget* create_mainwin (void)
gtk_tree_view_column_add_attribute(curcol, renderer, "text", 2);
- gtk_widget_show (tree_vals);
gtk_container_add (GTK_CONTAINER (scrolledwindow2), tree_vals);
store_vals = gtk_list_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
@@ -537,7 +513,6 @@ static GtkWidget* create_mainwin (void)
g_object_unref(store_vals);
statusbar = gtk_statusbar_new ();
- gtk_widget_show (statusbar);
gtk_box_pack_start (GTK_BOX (vbox1), statusbar, FALSE, FALSE, 0);
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE);
@@ -580,11 +555,9 @@ static GtkWidget* create_openfilewin (void)
gtk_container_set_border_width (GTK_CONTAINER (openfilewin), 10);
ok_button = GTK_FILE_SELECTION (openfilewin)->ok_button;
- gtk_widget_show (ok_button);
GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
cancel_button = GTK_FILE_SELECTION (openfilewin)->cancel_button;
- gtk_widget_show (cancel_button);
GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
return openfilewin;
@@ -599,11 +572,9 @@ static GtkWidget* create_savefilewin (void)
gtk_container_set_border_width (GTK_CONTAINER (savefilewin), 10);
ok_button = GTK_FILE_SELECTION (savefilewin)->ok_button;
- gtk_widget_show (ok_button);
GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
cancel_button = GTK_FILE_SELECTION (savefilewin)->cancel_button;
- gtk_widget_show (cancel_button);
GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
return savefilewin;
@@ -655,7 +626,7 @@ static GtkWidget* create_savefilewin (void)
mainwin = create_mainwin ();
}
- gtk_widget_show (mainwin);
+ gtk_widget_show_all (mainwin);
gtk_main ();
diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c
index 97660c9225..e651b78219 100644
--- a/source4/gtk/tools/gwcrontab.c
+++ b/source4/gtk/tools/gwcrontab.c
@@ -241,64 +241,52 @@ create_mainwindow (void)
gtk_window_set_title (GTK_WINDOW (mainwindow), "Task Scheduler");
vbox = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (mainwindow), vbox);
menubar = gtk_menu_bar_new ();
- gtk_widget_show (menubar);
gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0);
menuitem4 = gtk_menu_item_new_with_mnemonic ("_File");
- gtk_widget_show (menuitem4);
gtk_container_add (GTK_CONTAINER (menubar), menuitem4);
menuitem4_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);
mnu_connect = gtk_menu_item_new_with_mnemonic ("_Connect");
- gtk_widget_show (mnu_connect);
gtk_container_add (GTK_CONTAINER (menuitem4_menu), mnu_connect);
g_signal_connect ((gpointer) mnu_connect, "activate",
G_CALLBACK (on_connect_activate), NULL);
separatormenuitem1 = gtk_separator_menu_item_new ();
- gtk_widget_show (separatormenuitem1);
gtk_container_add (GTK_CONTAINER (menuitem4_menu), separatormenuitem1);
gtk_widget_set_sensitive (separatormenuitem1, FALSE);
quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
- gtk_widget_show (quit);
gtk_container_add (GTK_CONTAINER (menuitem4_menu), quit);
task = gtk_menu_item_new_with_mnemonic ("_Task");
- gtk_widget_show (task);
gtk_container_add (GTK_CONTAINER (menubar), task);
task_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (task), task_menu);
new = gtk_menu_item_new_with_mnemonic ("_New");
- gtk_widget_show (new);
gtk_container_add (GTK_CONTAINER (task_menu), new);
delete = gtk_menu_item_new_with_mnemonic ("_Delete");
gtk_widget_set_sensitive(delete, FALSE);
- gtk_widget_show (delete);
gtk_container_add (GTK_CONTAINER (task_menu), delete);
menuitem7 = gtk_menu_item_new_with_mnemonic ("_Help");
- gtk_widget_show (menuitem7);
gtk_container_add (GTK_CONTAINER (menubar), menuitem7);
menuitem7_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem7), menuitem7_menu);
about = gtk_menu_item_new_with_mnemonic ("_About");
- gtk_widget_show (about);
gtk_container_add (GTK_CONTAINER (menuitem7_menu), about);
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow);
gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0);
tasks = gtk_tree_view_new ();
@@ -342,13 +330,11 @@ create_mainwindow (void)
gtk_tree_view_set_model(GTK_TREE_VIEW(tasks), GTK_TREE_MODEL(store_jobs));
g_object_unref(store_jobs);
- gtk_widget_show (tasks);
gtk_container_add (GTK_CONTAINER (scrolledwindow), tasks);
g_signal_connect (gtk_tree_view_get_selection(GTK_TREE_VIEW(tasks)) , "changed", G_CALLBACK (on_job_select), NULL);
statusbar = gtk_statusbar_new ();
- gtk_widget_show (statusbar);
gtk_box_pack_start (GTK_BOX (vbox), statusbar, FALSE, FALSE, 0);
@@ -408,25 +394,20 @@ static GtkWidget*create_new_job_dialog (void)
gtk_window_set_title (GTK_WINDOW (new_job_dialog), "New job");
dialog_vbox1 = GTK_DIALOG (new_job_dialog)->vbox;
- gtk_widget_show (dialog_vbox1);
frame1 = gtk_frame_new (NULL);
- gtk_widget_show (frame1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), frame1, TRUE, TRUE, 0);
table1 = gtk_table_new (4, 2, FALSE);
- gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (frame1), table1);
label4 = gtk_label_new ("Time:");
- gtk_widget_show (label4);
gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
cal_day = gtk_calendar_new ();
- gtk_widget_show (cal_day);
gtk_table_attach (GTK_TABLE (table1), cal_day, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
@@ -435,77 +416,62 @@ static GtkWidget*create_new_job_dialog (void)
| GTK_CALENDAR_SHOW_DAY_NAMES);
label3 = gtk_label_new ("Date");
- gtk_widget_show (label3);
gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5);
entry_time = gtk_entry_new ();
- gtk_widget_show (entry_time);
gtk_table_attach (GTK_TABLE (table1), entry_time, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
chk_weekly = gtk_check_button_new_with_mnemonic ("Repeat weekly");
- gtk_widget_show (chk_weekly);
gtk_table_attach (GTK_TABLE (table1), chk_weekly, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entry_repeat_weekly = gtk_entry_new ();
- gtk_widget_show (entry_repeat_weekly);
gtk_table_attach (GTK_TABLE (table1), entry_repeat_weekly, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
chk_monthly = gtk_check_button_new_with_mnemonic ("Repeat monthly");
- gtk_widget_show (chk_monthly);
gtk_table_attach (GTK_TABLE (table1), chk_monthly, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entry_repeat_monthly = gtk_entry_new ();
- gtk_widget_show (entry_repeat_monthly);
gtk_table_attach (GTK_TABLE (table1), entry_repeat_monthly, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
label1 = gtk_label_new ("Moment");
- gtk_widget_show (label1);
gtk_frame_set_label_widget (GTK_FRAME (frame1), label1);
frame2 = gtk_frame_new (NULL);
- gtk_widget_show (frame2);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), frame2, TRUE, TRUE, 0);
hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
gtk_container_add (GTK_CONTAINER (frame2), hbox1);
label5 = gtk_label_new ("Command to execute");
- gtk_widget_show (label5);
gtk_box_pack_start (GTK_BOX (hbox1), label5, TRUE, TRUE, 0);
entry_cmd = gtk_entry_new ();
- gtk_widget_show (entry_cmd);
gtk_box_pack_start (GTK_BOX (hbox1), entry_cmd, TRUE, TRUE, 0);
label2 = gtk_label_new ("Command");
- gtk_widget_show (label2);
gtk_frame_set_label_widget (GTK_FRAME (frame2), label2);
dialog_action_area1 = GTK_DIALOG (new_job_dialog)->action_area;
- gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
- gtk_widget_show (cancelbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (new_job_dialog), cancelbutton1, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
okbutton1 = gtk_button_new_from_stock ("gtk-ok");
- gtk_widget_show (okbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (new_job_dialog), okbutton1, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
@@ -528,7 +494,7 @@ static GtkWidget*create_new_job_dialog (void)
gtk_init(&argc, &argv);
mainwin = create_mainwindow();
- gtk_widget_show(mainwin);
+ gtk_widget_show_all(mainwin);
gtk_main();
return 0;
diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c
index e31f9344e8..be9c5d1257 100644
--- a/source4/gtk/tools/gwsam.c
+++ b/source4/gtk/tools/gwsam.c
@@ -265,45 +265,36 @@ create_mainwindow (void)
gtk_window_set_title (GTK_WINDOW (mainwin), "User Manager");
vbox1 = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (mainwin), vbox1);
menubar = gtk_menu_bar_new ();
- gtk_widget_show (menubar);
gtk_box_pack_start (GTK_BOX (vbox1), menubar, FALSE, FALSE, 0);
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);
mnu_connect = gtk_menu_item_new_with_mnemonic ("_Connect");
- gtk_widget_show (mnu_connect);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), mnu_connect);
mnu_disconnect = gtk_menu_item_new_with_mnemonic ("_Disconnect");
- gtk_widget_show (mnu_disconnect);
gtk_widget_set_sensitive (mnu_disconnect, FALSE);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), mnu_disconnect);
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 ();
- gtk_widget_show (separatormenuitem1);
gtk_container_add (GTK_CONTAINER (menuitem1_menu), separatormenuitem1);
gtk_widget_set_sensitive (separatormenuitem1, FALSE);
quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
- 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);
@@ -311,13 +302,11 @@ create_mainwindow (void)
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);
@@ -325,71 +314,56 @@ create_mainwindow (void)
gtk_menu_item_set_submenu (GTK_MENU_ITEM (policies), policies_menu);
account = gtk_menu_item_new_with_mnemonic ("_Account...");
- gtk_widget_show (account);
gtk_container_add (GTK_CONTAINER (policies_menu), account);
user_rights = gtk_menu_item_new_with_mnemonic ("_User Rights...");
- gtk_widget_show (user_rights);
gtk_container_add (GTK_CONTAINER (policies_menu), user_rights);
audit = gtk_menu_item_new_with_mnemonic ("A_udit...");
- gtk_widget_show (audit);
gtk_container_add (GTK_CONTAINER (policies_menu), audit);
separator1 = gtk_separator_menu_item_new ();
- gtk_widget_show (separator1);
gtk_container_add (GTK_CONTAINER (policies_menu), separator1);
gtk_widget_set_sensitive (separator1, FALSE);
trust_relations = gtk_menu_item_new_with_mnemonic ("_Trust relations");
- gtk_widget_show (trust_relations);
gtk_container_add (GTK_CONTAINER (policies_menu), trust_relations);
menuitem3 = gtk_menu_item_new_with_mnemonic ("_View");
- gtk_widget_show (menuitem3);
gtk_container_add (GTK_CONTAINER (menubar), menuitem3);
menuitem3_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem3), menuitem3_menu);
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);
gtk_container_add (GTK_CONTAINER (menubar), menuitem4);
menuitem4_menu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);
about = gtk_menu_item_new_with_mnemonic ("_About");
- gtk_widget_show (about);
gtk_container_add (GTK_CONTAINER (menuitem4_menu), about);
vpaned = gtk_vpaned_new ();
- gtk_widget_show (vpaned);
gtk_box_pack_start (GTK_BOX (vbox1), vpaned, TRUE, TRUE, 0);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow1);
gtk_paned_pack1 (GTK_PANED (vpaned), scrolledwindow1, FALSE, TRUE);
user_list = gtk_tree_view_new ();
- gtk_widget_show (user_list);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), user_list);
scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow2);
gtk_paned_pack2 (GTK_PANED (vpaned), scrolledwindow2, TRUE, TRUE);
group_list = gtk_tree_view_new ();
- gtk_widget_show (group_list);
gtk_container_add (GTK_CONTAINER (scrolledwindow2), group_list);
statusbar = gtk_statusbar_new ();
- gtk_widget_show (statusbar);
gtk_box_pack_start (GTK_BOX (vbox1), statusbar, FALSE, FALSE, 0);
g_signal_connect ((gpointer) new1, "activate",
@@ -442,7 +416,7 @@ create_mainwindow (void)
gtk_init(&argc, &argv);
mainwin = create_mainwindow();
connect_sam();
- gtk_widget_show(mainwin);
+ gtk_widget_show_all(mainwin);
gtk_main();
return 0;
diff --git a/source4/gtk/tools/gwsam_user.c b/source4/gtk/tools/gwsam_user.c
index 9434bc540c..0c5c355b10 100644
--- a/source4/gtk/tools/gwsam_user.c
+++ b/source4/gtk/tools/gwsam_user.c
@@ -81,223 +81,181 @@ create_user_edit_dialog (void)
gtk_window_set_title (GTK_WINDOW (user_edit_dialog), "Edit User");
dialog_vbox1 = GTK_DIALOG (user_edit_dialog)->vbox;
- gtk_widget_show (dialog_vbox1);
notebook = gtk_notebook_new ();
- gtk_widget_show (notebook);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), notebook, TRUE, TRUE, 0);
table1 = gtk_table_new (10, 2, FALSE);
- gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (notebook), table1);
label4 = gtk_label_new ("Username");
- gtk_widget_show (label4);
gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
label5 = gtk_label_new ("Full name");
- gtk_widget_show (label5);
gtk_table_attach (GTK_TABLE (table1), label5, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);
label6 = gtk_label_new ("Description");
- gtk_widget_show (label6);
gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
label7 = gtk_label_new ("Password");
- gtk_widget_show (label7);
gtk_table_attach (GTK_TABLE (table1), label7, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
label8 = gtk_label_new ("Confirm password");
- gtk_widget_show (label8);
gtk_table_attach (GTK_TABLE (table1), label8, 0, 1, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);
chk_mustchange = gtk_check_button_new_with_mnemonic ("_User Must Change Password at Next Logon");
- gtk_widget_show (chk_mustchange);
gtk_table_attach (GTK_TABLE (table1), chk_mustchange, 1, 2, 5, 6,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entry_fullname = gtk_entry_new ();
- gtk_widget_show (entry_fullname);
gtk_table_attach (GTK_TABLE (table1), entry_fullname, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entry_description = gtk_entry_new ();
- gtk_widget_show (entry_description);
gtk_table_attach (GTK_TABLE (table1), entry_description, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
lbl_username = gtk_label_new ("");
- gtk_widget_show (lbl_username);
gtk_table_attach (GTK_TABLE (table1), lbl_username, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (lbl_username), 0, 0.5);
entry_password = gtk_entry_new ();
- gtk_widget_show (entry_password);
gtk_table_attach (GTK_TABLE (table1), entry_password, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entry_confirm_password = gtk_entry_new ();
- gtk_widget_show (entry_confirm_password);
gtk_table_attach (GTK_TABLE (table1), entry_confirm_password, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
chk_cannotchange = gtk_check_button_new_with_mnemonic ("User Cannot Change Password");
- gtk_widget_show (chk_cannotchange);
gtk_table_attach (GTK_TABLE (table1), chk_cannotchange, 1, 2, 6, 7,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
chk_cannotexpire = gtk_check_button_new_with_mnemonic ("Password Never Expires");
- gtk_widget_show (chk_cannotexpire);
gtk_table_attach (GTK_TABLE (table1), chk_cannotexpire, 1, 2, 7, 8,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
chk_disabled = gtk_check_button_new_with_mnemonic ("Account Disabled");
- gtk_widget_show (chk_disabled);
gtk_table_attach (GTK_TABLE (table1), chk_disabled, 1, 2, 8, 9,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
chk_lockedout = gtk_check_button_new_with_mnemonic ("Account Locked Out");
- gtk_widget_show (chk_lockedout);
gtk_table_attach (GTK_TABLE (table1), chk_lockedout, 1, 2, 9, 10,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
label1 = gtk_label_new ("Main");
- gtk_widget_show (label1);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0), label1);
hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
gtk_container_add (GTK_CONTAINER (notebook), hbox1);
scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow3);
gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow3, TRUE, TRUE, 0);
treeview3 = gtk_tree_view_new ();
- gtk_widget_show (treeview3);
gtk_container_add (GTK_CONTAINER (scrolledwindow3), treeview3);
vbox2 = gtk_vbox_new (TRUE, 0);
- gtk_widget_show (vbox2);
gtk_box_pack_start (GTK_BOX (hbox1), vbox2, TRUE, TRUE, 0);
btn_groupadd = gtk_button_new_from_stock ("gtk-add");
- gtk_widget_show (btn_groupadd);
gtk_box_pack_start (GTK_BOX (vbox2), btn_groupadd, FALSE, FALSE, 0);
btn_groupdel = gtk_button_new_from_stock ("gtk-remove");
- gtk_widget_show (btn_groupdel);
gtk_box_pack_start (GTK_BOX (vbox2), btn_groupdel, FALSE, FALSE, 0);
scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow4);
gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow4, TRUE, TRUE, 0);
treeview4 = gtk_tree_view_new ();
- gtk_widget_show (treeview4);
gtk_container_add (GTK_CONTAINER (scrolledwindow4), treeview4);
label2 = gtk_label_new ("Groups");
- gtk_widget_show (label2);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 1), label2);
vbox3 = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox3);
gtk_container_add (GTK_CONTAINER (notebook), vbox3);
frame1 = gtk_frame_new (NULL);
- gtk_widget_show (frame1);
gtk_box_pack_start (GTK_BOX (vbox3), frame1, TRUE, TRUE, 0);
table2 = gtk_table_new (2, 2, FALSE);
- gtk_widget_show (table2);
gtk_container_add (GTK_CONTAINER (frame1), table2);
label12 = gtk_label_new ("User Profile Path:");
- gtk_widget_show (label12);
gtk_table_attach (GTK_TABLE (table2), label12, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);
label13 = gtk_label_new ("Logon Script Name:");
- gtk_widget_show (label13);
gtk_table_attach (GTK_TABLE (table2), label13, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);
entry_profilepath = gtk_entry_new ();
- gtk_widget_show (entry_profilepath);
gtk_table_attach (GTK_TABLE (table2), entry_profilepath, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entry_scriptname = gtk_entry_new ();
- gtk_widget_show (entry_scriptname);
gtk_table_attach (GTK_TABLE (table2), entry_scriptname, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
label10 = gtk_label_new ("User Profiles");
- gtk_widget_show (label10);
gtk_frame_set_label_widget (GTK_FRAME (frame1), label10);
frame2 = gtk_frame_new (NULL);
- gtk_widget_show (frame2);
gtk_box_pack_start (GTK_BOX (vbox3), frame2, TRUE, TRUE, 0);
table3 = gtk_table_new (2, 2, FALSE);
- gtk_widget_show (table3);
gtk_container_add (GTK_CONTAINER (frame2), table3);
label14 = gtk_label_new ("Path");
- gtk_widget_show (label14);
gtk_table_attach (GTK_TABLE (table3), label14, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);
entry_homedir = gtk_entry_new ();
- gtk_widget_show (entry_homedir);
gtk_table_attach (GTK_TABLE (table3), entry_homedir, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
chk_mapdrive = gtk_check_button_new_with_mnemonic ("Map homedir to drive");
- gtk_widget_show (chk_mapdrive);
gtk_table_attach (GTK_TABLE (table3), chk_mapdrive, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
combo_homedrive = gtk_combo_new();
- gtk_widget_show (combo_homedrive);
gtk_table_attach (GTK_TABLE (table3), combo_homedrive, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
@@ -309,31 +267,27 @@ create_user_edit_dialog (void)
}
label11 = gtk_label_new ("Home Directory");
- gtk_widget_show (label11);
gtk_frame_set_label_widget (GTK_FRAME (frame2), label11);
label3 = gtk_label_new ("Profile");
- gtk_widget_show (label3);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), label3);
dialog_action_area1 = GTK_DIALOG (user_edit_dialog)->action_area;
- gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
- gtk_widget_show (cancelbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (user_edit_dialog), cancelbutton1, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT);
applybutton1 = gtk_button_new_from_stock ("gtk-apply");
- gtk_widget_show (applybutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (user_edit_dialog), applybutton1, GTK_RESPONSE_APPLY);
GTK_WIDGET_SET_FLAGS (applybutton1, GTK_CAN_DEFAULT);
okbutton1 = gtk_button_new_from_stock ("gtk-ok");
- gtk_widget_show (okbutton1);
gtk_dialog_add_action_widget (GTK_DIALOG (user_edit_dialog), okbutton1, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
+ gtk_widget_show_all(dialog_vbox1);
+
return user_edit_dialog;
}