summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/gtk/common/select.c378
-rw-r--r--source4/gtk/tools/gregedit.c379
-rw-r--r--source4/gtk/tools/gwcrontab.c608
-rw-r--r--source4/gtk/tools/gwsam.c359
-rw-r--r--source4/gtk/tools/gwsam_user.c654
5 files changed, 1188 insertions, 1190 deletions
diff --git a/source4/gtk/common/select.c b/source4/gtk/common/select.c
index 4e4d14dbe2..fd8303241f 100644
--- a/source4/gtk/common/select.c
+++ b/source4/gtk/common/select.c
@@ -31,65 +31,65 @@ const char *gtk_select_domain_dialog_get_domain(GtkSelectDomainDialog *d)
void gtk_select_domain_dialog_init (GtkSelectDomainDialog *select_domain_dialog)
{
- GtkWidget *dialog_vbox1;
- GtkWidget *hbox1;
- GtkWidget *label1;
- GtkWidget *scrolledwindow1;
- GtkWidget *dialog_action_area1;
- GtkWidget *cancelbutton1;
- GtkWidget *okbutton1;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *curcol;
-
- 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 ();
- gtk_tree_view_column_set_title(curcol, "Name");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(select_domain_dialog->list_domains), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 0);
-
- select_domain_dialog->store_domains = gtk_list_store_new(1, G_TYPE_STRING);
- gtk_tree_view_set_model(GTK_TREE_VIEW(select_domain_dialog->list_domains), GTK_TREE_MODEL(select_domain_dialog->store_domains));
- 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_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
+ GtkWidget *dialog_vbox1;
+ GtkWidget *hbox1;
+ GtkWidget *label1;
+ GtkWidget *scrolledwindow1;
+ GtkWidget *dialog_action_area1;
+ GtkWidget *cancelbutton1;
+ GtkWidget *okbutton1;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *curcol;
+
+ 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 ();
+ gtk_tree_view_column_set_title(curcol, "Name");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(select_domain_dialog->list_domains), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 0);
+
+ select_domain_dialog->store_domains = gtk_list_store_new(1, G_TYPE_STRING);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(select_domain_dialog->list_domains), GTK_TREE_MODEL(select_domain_dialog->store_domains));
+ 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_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
}
struct policy_handle gtk_select_domain_dialog_get_handle(GtkSelectDomainDialog *d)
@@ -103,85 +103,85 @@ struct policy_handle gtk_select_domain_dialog_get_handle(GtkSelectDomainDialog *
GType gtk_select_domain_dialog_get_type ()
{
- static GType mytype = 0;
-
- if (!mytype)
- {
- static const GTypeInfo myinfo =
- {
- sizeof (GtkSelectDomainDialogClass),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- sizeof(GtkSelectDomainDialog),
- 0,
- (GInstanceInitFunc) gtk_select_domain_dialog_init,
- };
-
- mytype = g_type_register_static (GTK_TYPE_DIALOG,
- "GtkSelectDomainDialog", &myinfo, 0);
- }
-
- return mytype;
+ static GType mytype = 0;
+
+ if (!mytype)
+ {
+ static const GTypeInfo myinfo =
+ {
+ sizeof (GtkSelectDomainDialogClass),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ sizeof(GtkSelectDomainDialog),
+ 0,
+ (GInstanceInitFunc) gtk_select_domain_dialog_init,
+ };
+
+ mytype = g_type_register_static (GTK_TYPE_DIALOG,
+ "GtkSelectDomainDialog", &myinfo, 0);
+ }
+
+ return mytype;
}
GtkWidget *gtk_select_domain_dialog_new (struct dcerpc_pipe *sam_pipe)
{
GtkSelectDomainDialog *d = gtk_type_new (gtk_select_domain_dialog_get_type ());
- NTSTATUS status;
- struct samr_EnumDomains r;
+ NTSTATUS status;
+ struct samr_EnumDomains r;
struct samr_Connect cr;
struct samr_Close dr;
struct policy_handle handle;
- uint32_t resume_handle = 0;
- int i;
+ uint32_t resume_handle = 0;
+ int i;
TALLOC_CTX *mem_ctx = talloc_init("gtk_select_domain_dialog_new");
d->sam_pipe = sam_pipe;
- cr.in.system_name = 0;
- cr.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
- cr.out.handle = &handle;
-
- status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &cr);
- if (!NT_STATUS_IS_OK(status)) {
+ cr.in.system_name = 0;
+ cr.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
+ cr.out.handle = &handle;
+
+ status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &cr);
+ if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(NULL, status);
talloc_destroy(mem_ctx);
return GTK_WIDGET(d);
- }
-
- r.in.handle = &handle;
- r.in.resume_handle = &resume_handle;
- r.in.buf_size = (uint32_t)-1;
- r.out.resume_handle = &resume_handle;
-
- status = dcerpc_samr_EnumDomains(sam_pipe, mem_ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
- gtk_show_ntstatus(NULL, status);
- } else if (r.out.sam) {
- for (i=0;i<r.out.sam->count;i++) {
- GtkTreeIter iter;
+ }
+
+ r.in.handle = &handle;
+ r.in.resume_handle = &resume_handle;
+ r.in.buf_size = (uint32_t)-1;
+ r.out.resume_handle = &resume_handle;
+
+ status = dcerpc_samr_EnumDomains(sam_pipe, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ gtk_show_ntstatus(NULL, status);
+ } else if (r.out.sam) {
+ for (i=0;i<r.out.sam->count;i++) {
+ GtkTreeIter iter;
printf("- %s\n", r.out.sam->entries[i].name.name);
- gtk_list_store_append(d->store_domains, &iter);
- gtk_list_store_set (d->store_domains, &iter, 0, r.out.sam->entries[i].name.name, -1);
- }
+ gtk_list_store_append(d->store_domains, &iter);
+ gtk_list_store_set (d->store_domains, &iter, 0, r.out.sam->entries[i].name.name, -1);
+ }
}
- dr.in.handle = &handle;
- dr.out.handle = &handle;
-
- status = dcerpc_samr_Close(sam_pipe, mem_ctx, &dr);
- if (!NT_STATUS_IS_OK(status)) {
+ dr.in.handle = &handle;
+ dr.out.handle = &handle;
+
+ status = dcerpc_samr_Close(sam_pipe, mem_ctx, &dr);
+ if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(NULL, status);
talloc_destroy(mem_ctx);
- return GTK_WIDGET ( d );
- }
+ return GTK_WIDGET ( d );
+ }
talloc_destroy(mem_ctx);
- return GTK_WIDGET ( d );
+ return GTK_WIDGET ( d );
}
@@ -193,88 +193,86 @@ const char *gtk_select_host_dialog_get_host (GtkSelectHostDialog *d)
void gtk_select_host_dialog_init (GtkSelectHostDialog *select_host_dialog)
{
- GtkWidget *dialog_vbox2;
- GtkWidget *hbox2;
- GtkWidget *label2;
- GtkWidget *entry_host;
- GtkWidget *scrolledwindow2;
- GtkWidget *dialog_action_area2;
- GtkWidget *cancelbutton2;
- GtkWidget *okbutton2;
-
- 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);
- gtk_tree_view_set_model(GTK_TREE_VIEW(select_host_dialog->tree_host), GTK_TREE_MODEL(select_host_dialog->store_host));
- 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_dialog_add_action_widget (GTK_DIALOG (select_host_dialog), okbutton2, GTK_RESPONSE_OK);
- GTK_WIDGET_SET_FLAGS (okbutton2, GTK_CAN_DEFAULT);
+ GtkWidget *dialog_vbox2;
+ GtkWidget *hbox2;
+ GtkWidget *label2;
+ GtkWidget *entry_host;
+ GtkWidget *scrolledwindow2;
+ GtkWidget *dialog_action_area2;
+ GtkWidget *cancelbutton2;
+ GtkWidget *okbutton2;
+
+ 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);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(select_host_dialog->tree_host), GTK_TREE_MODEL(select_host_dialog->store_host));
+ 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_dialog_add_action_widget (GTK_DIALOG (select_host_dialog), okbutton2, GTK_RESPONSE_OK);
+ GTK_WIDGET_SET_FLAGS (okbutton2, GTK_CAN_DEFAULT);
}
GType gtk_select_host_dialog_get_type ()
{
- static GType mytype = 0;
-
- if (!mytype)
- {
- static const GTypeInfo myinfo =
- {
- sizeof (GtkSelectHostDialogClass),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- sizeof(GtkSelectHostDialog),
- 0,
- (GInstanceInitFunc) gtk_select_host_dialog_init,
- };
-
- mytype = g_type_register_static (GTK_TYPE_DIALOG,
- "GtkSelectHostDialog", &myinfo, 0);
- }
-
- return mytype;
+ static GType mytype = 0;
+
+ if (!mytype)
+ {
+ static const GTypeInfo myinfo =
+ {
+ sizeof (GtkSelectHostDialogClass),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ sizeof(GtkSelectHostDialog),
+ 0,
+ (GInstanceInitFunc) gtk_select_host_dialog_init,
+ };
+
+ mytype = g_type_register_static (GTK_TYPE_DIALOG,
+ "GtkSelectHostDialog", &myinfo, 0);
+ }
+
+ return mytype;
}
GtkWidget *gtk_select_host_dialog_new (BOOL nocredentials)
{
return GTK_WIDGET ( gtk_type_new (gtk_select_host_dialog_get_type ()));
}
-
-
diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c
index d26f393bb9..0ec5c8e45c 100644
--- a/source4/gtk/tools/gregedit.c
+++ b/source4/gtk/tools/gregedit.c
@@ -358,9 +358,9 @@ static GtkWidget* create_mainwin (void)
gtk_widget_show (open_nt4);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_nt4);
- g_signal_connect ((gpointer) open_nt4, "activate",
- G_CALLBACK (on_open_file_activate),
- "nt4");
+ g_signal_connect ((gpointer) open_nt4, "activate",
+ G_CALLBACK (on_open_file_activate),
+ "nt4");
}
if(reg_has_backend("w95")) {
@@ -368,9 +368,9 @@ static GtkWidget* create_mainwin (void)
gtk_widget_show (open_w95);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_w95);
- g_signal_connect ((gpointer) open_w95, "activate",
- G_CALLBACK (on_open_file_activate),
- "w95");
+ g_signal_connect ((gpointer) open_w95, "activate",
+ G_CALLBACK (on_open_file_activate),
+ "w95");
}
if(reg_has_backend("gconf")) {
@@ -378,9 +378,9 @@ static GtkWidget* create_mainwin (void)
gtk_widget_show (open_gconf);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_gconf);
- g_signal_connect ((gpointer) open_gconf, "activate",
- G_CALLBACK (on_open_gconf_activate),
- NULL);
+ g_signal_connect ((gpointer) open_gconf, "activate",
+ G_CALLBACK (on_open_gconf_activate),
+ NULL);
}
if(reg_has_backend("rpc")) {
@@ -388,9 +388,9 @@ static GtkWidget* create_mainwin (void)
gtk_widget_show (open_remote);
gtk_container_add (GTK_CONTAINER (menu_file_menu), open_remote);
- g_signal_connect ((gpointer) open_remote, "activate",
- G_CALLBACK (on_open_remote_activate),
- NULL);
+ g_signal_connect ((gpointer) open_remote, "activate",
+ G_CALLBACK (on_open_remote_activate),
+ NULL);
}
save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
@@ -416,201 +416,201 @@ static GtkWidget* create_mainwin (void)
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 ();
-
- /* Column names */
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Name");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
-
- 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));
- g_object_unref(store_keys);
-
- gtk_tree_selection_set_select_function (gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_keys)), on_key_activate, NULL, NULL);
-
- g_signal_connect ((gpointer) tree_keys, "row-expanded",
- G_CALLBACK (expand_key),
- NULL);
-
-
- 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 ();
- /* Column names */
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Name");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tree_vals), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 0);
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Type");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tree_vals), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 1);
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Value");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tree_vals), curcol);
- 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);
- gtk_tree_view_set_model(GTK_TREE_VIEW(tree_vals), GTK_TREE_MODEL(store_vals));
- 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);
-
- g_signal_connect ((gpointer) save, "activate",
- G_CALLBACK (on_save_activate),
- NULL);
- g_signal_connect ((gpointer) save_as, "activate",
- G_CALLBACK (on_save_as_activate),
- NULL);
- g_signal_connect ((gpointer) quit, "activate",
- G_CALLBACK (on_quit_activate),
- NULL);
- g_signal_connect ((gpointer) cut, "activate",
- G_CALLBACK (on_cut_activate),
- NULL);
- g_signal_connect ((gpointer) copy, "activate",
- G_CALLBACK (on_copy_activate),
- NULL);
- g_signal_connect ((gpointer) paste, "activate",
- G_CALLBACK (on_paste_activate),
- NULL);
- g_signal_connect ((gpointer) delete, "activate",
- G_CALLBACK (on_delete_activate),
- NULL);
- g_signal_connect ((gpointer) about, "activate",
- G_CALLBACK (on_about_activate),
- NULL);
-
- gtk_window_add_accel_group (GTK_WINDOW (mainwin), accel_group);
-
- return mainwin;
+ 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 ();
+
+ /* Column names */
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Name");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+
+ 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));
+ g_object_unref(store_keys);
+
+ gtk_tree_selection_set_select_function (gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_keys)), on_key_activate, NULL, NULL);
+
+ g_signal_connect ((gpointer) tree_keys, "row-expanded",
+ G_CALLBACK (expand_key),
+ NULL);
+
+
+ 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 ();
+ /* Column names */
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Name");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tree_vals), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 0);
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Type");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tree_vals), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 1);
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Value");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tree_vals), curcol);
+ 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);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(tree_vals), GTK_TREE_MODEL(store_vals));
+ 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);
+
+ g_signal_connect ((gpointer) save, "activate",
+ G_CALLBACK (on_save_activate),
+ NULL);
+ g_signal_connect ((gpointer) save_as, "activate",
+ G_CALLBACK (on_save_as_activate),
+ NULL);
+ g_signal_connect ((gpointer) quit, "activate",
+ G_CALLBACK (on_quit_activate),
+ NULL);
+ g_signal_connect ((gpointer) cut, "activate",
+ G_CALLBACK (on_cut_activate),
+ NULL);
+ g_signal_connect ((gpointer) copy, "activate",
+ G_CALLBACK (on_copy_activate),
+ NULL);
+ g_signal_connect ((gpointer) paste, "activate",
+ G_CALLBACK (on_paste_activate),
+ NULL);
+ g_signal_connect ((gpointer) delete, "activate",
+ G_CALLBACK (on_delete_activate),
+ NULL);
+ g_signal_connect ((gpointer) about, "activate",
+ G_CALLBACK (on_about_activate),
+ NULL);
+
+ gtk_window_add_accel_group (GTK_WINDOW (mainwin), accel_group);
+
+ return mainwin;
}
static GtkWidget* create_openfilewin (void)
{
- GtkWidget *ok_button;
- GtkWidget *cancel_button;
+ GtkWidget *ok_button;
+ GtkWidget *cancel_button;
- openfilewin = gtk_file_selection_new ("Select File");
- gtk_container_set_border_width (GTK_CONTAINER (openfilewin), 10);
+ openfilewin = gtk_file_selection_new ("Select File");
+ 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);
+ 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);
+ cancel_button = GTK_FILE_SELECTION (openfilewin)->cancel_button;
+ gtk_widget_show (cancel_button);
+ GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
- return openfilewin;
+ return openfilewin;
}
static GtkWidget* create_savefilewin (void)
{
- GtkWidget *ok_button;
- GtkWidget *cancel_button;
+ GtkWidget *ok_button;
+ GtkWidget *cancel_button;
- savefilewin = gtk_file_selection_new ("Select File");
- gtk_container_set_border_width (GTK_CONTAINER (savefilewin), 10);
+ savefilewin = gtk_file_selection_new ("Select File");
+ 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);
+ 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);
+ cancel_button = GTK_FILE_SELECTION (savefilewin)->cancel_button;
+ gtk_widget_show (cancel_button);
+ GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
- return savefilewin;
+ return savefilewin;
}
int main(int argc, char *argv[])
{
- poptContext pc;
- const char *backend = NULL;
- const char *credentials = NULL;
- const char *location;
- int opt;
- struct poptOption long_options[] = {
- POPT_AUTOHELP
- {"backend", 'b', POPT_ARG_STRING, &backend, 0, "backend to use", NULL},
- {"credentials", 'c', POPT_ARG_STRING, &credentials, 0, "credentials (user%%password)", NULL},
- POPT_TABLEEND
- };
-
- gtk_init (&argc, &argv);
-
- pc = poptGetContext(argv[0], argc, (const char **) argv, long_options,0);
-
- while((opt = poptGetNextOpt(pc)) != -1) {
- }
+ poptContext pc;
+ const char *backend = NULL;
+ const char *credentials = NULL;
+ const char *location;
+ int opt;
+ struct poptOption long_options[] = {
+ POPT_AUTOHELP
+ {"backend", 'b', POPT_ARG_STRING, &backend, 0, "backend to use", NULL},
+ {"credentials", 'c', POPT_ARG_STRING, &credentials, 0, "credentials (user%%password)", NULL},
+ POPT_TABLEEND
+ };
+
+ gtk_init (&argc, &argv);
+
+ pc = poptGetContext(argv[0], argc, (const char **) argv, long_options,0);
+
+ while((opt = poptGetNextOpt(pc)) != -1) {
+ }
location = poptGetArg(pc);
@@ -621,7 +621,7 @@ static GtkWidget* create_savefilewin (void)
if(credentials)backend = "rpc";
else backend = "nt4";
}
-
+
error = reg_open(backend, location, credentials, &registry);
if(!W_ERROR_IS_OK(error)) {
gtk_show_werror(mainwin, error);
@@ -629,8 +629,9 @@ static GtkWidget* create_savefilewin (void)
}
mainwin = create_mainwin ();
registry_load_root();
- } else
+ } else {
mainwin = create_mainwin ();
+ }
gtk_widget_show (mainwin);
diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c
index ba7d2bbcd4..aa5495bcc0 100644
--- a/source4/gtk/tools/gwcrontab.c
+++ b/source4/gtk/tools/gwcrontab.c
@@ -74,7 +74,7 @@ void update_joblist(void)
static void on_job_select(GtkTreeSelection *sel,
gpointer data)
{
- gtk_widget_set_sensitive(delete, gtk_tree_selection_get_selected(sel, NULL, NULL));
+ gtk_widget_set_sensitive(delete, gtk_tree_selection_get_selected(sel, NULL, NULL));
}
@@ -87,7 +87,7 @@ on_connect_activate (GtkMenuItem *menuitem,
gint result;
d = GTK_RPC_BINDING_DIALOG(gtk_rpc_binding_dialog_new(FALSE));
- result = gtk_dialog_run(GTK_DIALOG(d));
+ result = gtk_dialog_run(GTK_DIALOG(d));
switch(result) {
case GTK_RESPONSE_ACCEPT:
break;
@@ -101,17 +101,17 @@ on_connect_activate (GtkMenuItem *menuitem,
if(!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(mainwin, status);
at_pipe = NULL;
- gtk_widget_destroy(GTK_WIDGET(d));
+ gtk_widget_destroy(GTK_WIDGET(d));
return;
}
- gtk_widget_destroy(GTK_WIDGET(d));
+ gtk_widget_destroy(GTK_WIDGET(d));
update_joblist();
}
void
on_quit_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
if(at_pipe)dcerpc_pipe_close(at_pipe);
gtk_main_quit();
@@ -122,7 +122,7 @@ static GtkWidget* create_new_job_dialog (void);
void
on_new_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
GtkWidget *d = create_new_job_dialog();
gint result = gtk_dialog_run(GTK_DIALOG(d));
@@ -170,16 +170,16 @@ on_delete_activate (GtkMenuItem *menuitem,
{
GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tasks));
GtkTreeModel *model = GTK_TREE_MODEL(store_jobs);
- GtkTreeIter iter;
+ GtkTreeIter iter;
gint id;
- if (gtk_tree_selection_get_selected (sel, &model, &iter))
- {
+ if (gtk_tree_selection_get_selected (sel, &model, &iter))
+ {
struct atsvc_JobDel r;
TALLOC_CTX *mem_ctx;
NTSTATUS status;
- gtk_tree_model_get (model, &iter, 1, &id, -1);
-
+ gtk_tree_model_get (model, &iter, 1, &id, -1);
+
r.in.servername = dcerpc_server_name(at_pipe);
r.in.min_job_id = r.in.max_job_id = id;
@@ -190,184 +190,184 @@ on_delete_activate (GtkMenuItem *menuitem,
gtk_show_ntstatus(mainwin, status);
return;
}
-
+
update_joblist();
- }
+ }
}
void
on_about_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
GtkDialog *aboutwin = GTK_DIALOG(create_gtk_samba_about_dialog("gwcrontab"));
- gtk_dialog_run(aboutwin);
- gtk_widget_destroy(GTK_WIDGET(aboutwin));
+ gtk_dialog_run(aboutwin);
+ gtk_widget_destroy(GTK_WIDGET(aboutwin));
}
GtkWidget*
create_mainwindow (void)
{
- GtkWidget *mainwindow;
- GtkWidget *vbox;
- GtkWidget *menubar;
- GtkWidget *menuitem4;
- GtkWidget *menuitem4_menu;
- GtkWidget *connect;
- GtkWidget *separatormenuitem1;
- GtkWidget *quit;
- GtkWidget *task;
- GtkWidget *task_menu;
- GtkWidget *new;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *curcol;
- GtkWidget *menuitem7;
- GtkWidget *menuitem7_menu;
- GtkWidget *about;
- GtkWidget *scrolledwindow;
- GtkWidget *statusbar;
- GtkAccelGroup *accel_group;
-
- accel_group = gtk_accel_group_new ();
-
- mainwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_default_size (GTK_WINDOW (mainwindow), 642, 562);
- 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);
-
- connect = gtk_menu_item_new_with_mnemonic ("_Connect");
- gtk_widget_show (connect);
- gtk_container_add (GTK_CONTAINER (menuitem4_menu), connect);
-
- 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 ();
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Status");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 0);
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "ID");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 1);
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Day");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 2);
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Time");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 3);
-
- curcol = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title(curcol, "Command Line");
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(curcol, renderer, True);
- gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
- gtk_tree_view_column_add_attribute(curcol, renderer, "text", 4);
-
- store_jobs = gtk_list_store_new(5, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING);
- 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);
-
- g_signal_connect ((gpointer) connect, "activate",
- G_CALLBACK (on_connect_activate),
- NULL);
- g_signal_connect ((gpointer) quit, "activate",
- G_CALLBACK (on_quit_activate),
- NULL);
- g_signal_connect ((gpointer) new, "activate",
- G_CALLBACK (on_new_activate),
- NULL);
- g_signal_connect ((gpointer) delete, "activate",
- G_CALLBACK (on_delete_activate),
- NULL);
- g_signal_connect ((gpointer) about, "activate",
- G_CALLBACK (on_about_activate),
- NULL);
-
- gtk_window_add_accel_group (GTK_WINDOW (mainwindow), accel_group);
- gtk_widget_set_sensitive(tasks, FALSE);
-
- return mainwindow;
+ GtkWidget *mainwindow;
+ GtkWidget *vbox;
+ GtkWidget *menubar;
+ GtkWidget *menuitem4;
+ GtkWidget *menuitem4_menu;
+ GtkWidget *connect;
+ GtkWidget *separatormenuitem1;
+ GtkWidget *quit;
+ GtkWidget *task;
+ GtkWidget *task_menu;
+ GtkWidget *new;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *curcol;
+ GtkWidget *menuitem7;
+ GtkWidget *menuitem7_menu;
+ GtkWidget *about;
+ GtkWidget *scrolledwindow;
+ GtkWidget *statusbar;
+ GtkAccelGroup *accel_group;
+
+ accel_group = gtk_accel_group_new ();
+
+ mainwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (GTK_WINDOW (mainwindow), 642, 562);
+ 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);
+
+ connect = gtk_menu_item_new_with_mnemonic ("_Connect");
+ gtk_widget_show (connect);
+ gtk_container_add (GTK_CONTAINER (menuitem4_menu), connect);
+
+ 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 ();
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Status");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 0);
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "ID");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 1);
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Day");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 2);
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Time");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 3);
+
+ curcol = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title(curcol, "Command Line");
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(curcol, renderer, True);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(tasks), curcol);
+ gtk_tree_view_column_add_attribute(curcol, renderer, "text", 4);
+
+ store_jobs = gtk_list_store_new(5, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING);
+ 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);
+
+ g_signal_connect ((gpointer) connect, "activate",
+ G_CALLBACK (on_connect_activate),
+ NULL);
+ g_signal_connect ((gpointer) quit, "activate",
+ G_CALLBACK (on_quit_activate),
+ NULL);
+ g_signal_connect ((gpointer) new, "activate",
+ G_CALLBACK (on_new_activate),
+ NULL);
+ g_signal_connect ((gpointer) delete, "activate",
+ G_CALLBACK (on_delete_activate),
+ NULL);
+ g_signal_connect ((gpointer) about, "activate",
+ G_CALLBACK (on_about_activate),
+ NULL);
+
+ gtk_window_add_accel_group (GTK_WINDOW (mainwindow), accel_group);
+ gtk_widget_set_sensitive(tasks, FALSE);
+
+ return mainwindow;
}
void
on_chk_weekly_toggled (GtkToggleButton *togglebutton,
- gpointer user_data)
+ gpointer user_data)
{
gtk_widget_set_sensitive(entry_repeat_weekly, gtk_toggle_button_get_active(togglebutton));
}
@@ -383,138 +383,138 @@ on_chk_monthly_toggled (GtkToggleButton *togglebutton,
static GtkWidget*create_new_job_dialog (void)
{
- GtkWidget *new_job_dialog;
- GtkWidget *dialog_vbox1;
- GtkWidget *frame1;
- GtkWidget *table1;
- GtkWidget *label4;
- GtkWidget *cal_day;
- GtkWidget *label3;
- GtkWidget *entry_time;
- GtkWidget *chk_weekly;
- GtkWidget *chk_monthly;
- GtkWidget *label1;
- GtkWidget *frame2;
- GtkWidget *hbox1;
- GtkWidget *label5;
- GtkWidget *label2;
- GtkWidget *dialog_action_area1;
- GtkWidget *cancelbutton1;
- GtkWidget *okbutton1;
-
- new_job_dialog = gtk_dialog_new ();
- 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);
- gtk_calendar_display_options (GTK_CALENDAR (cal_day),
- GTK_CALENDAR_SHOW_HEADING
- | 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);
-
- g_signal_connect ((gpointer) chk_weekly, "toggled",
- G_CALLBACK (on_chk_weekly_toggled),
- NULL);
- g_signal_connect ((gpointer) chk_monthly, "toggled",
- G_CALLBACK (on_chk_monthly_toggled),
- NULL);
-
- return new_job_dialog;
+ GtkWidget *new_job_dialog;
+ GtkWidget *dialog_vbox1;
+ GtkWidget *frame1;
+ GtkWidget *table1;
+ GtkWidget *label4;
+ GtkWidget *cal_day;
+ GtkWidget *label3;
+ GtkWidget *entry_time;
+ GtkWidget *chk_weekly;
+ GtkWidget *chk_monthly;
+ GtkWidget *label1;
+ GtkWidget *frame2;
+ GtkWidget *hbox1;
+ GtkWidget *label5;
+ GtkWidget *label2;
+ GtkWidget *dialog_action_area1;
+ GtkWidget *cancelbutton1;
+ GtkWidget *okbutton1;
+
+ new_job_dialog = gtk_dialog_new ();
+ 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);
+ gtk_calendar_display_options (GTK_CALENDAR (cal_day),
+ GTK_CALENDAR_SHOW_HEADING
+ | 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);
+
+ g_signal_connect ((gpointer) chk_weekly, "toggled",
+ G_CALLBACK (on_chk_weekly_toggled),
+ NULL);
+ g_signal_connect ((gpointer) chk_monthly, "toggled",
+ G_CALLBACK (on_chk_monthly_toggled),
+ NULL);
+
+ return new_job_dialog;
}
diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c
index a8cf3f2a45..2ca6363a6d 100644
--- a/source4/gtk/tools/gwsam.c
+++ b/source4/gtk/tools/gwsam.c
@@ -41,7 +41,7 @@ void update_userlist(void)
int i;
BOOL ret = True;
TALLOC_CTX *mem_ctx;
-
+
if(!sam_pipe) return;
mem_ctx = talloc_init("update_userlist");
@@ -66,35 +66,35 @@ void update_userlist(void)
for (i=0;i<r.out.sam->count;i++) {
printf("Found: %s\n", r.out.sam->entries[i].name.name);
/* FIXME: Query user info */
-
-// if (!test_OpenUser(sam_pipe, mem_ctx, &sam_handle, r.out.sam->entries[i].idx)) {
-// ret = False;
-// }
+
+ // if (!test_OpenUser(sam_pipe, mem_ctx, &sam_handle, r.out.sam->entries[i].idx)) {
+ // ret = False;
+ // }
}
talloc_destroy(mem_ctx);
}
void
on_new1_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
}
void
on_select_domain_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
GtkSelectDomainDialog *d;
gint result;
d = gtk_select_domain_dialog_new(sam_pipe);
result = gtk_dialog_run(GTK_DIALOG(d));
switch(result) {
- case GTK_RESPONSE_ACCEPT:
+ case GTK_RESPONSE_ACCEPT:
break;
- default:
- gtk_widget_destroy(GTK_WIDGET(d));
- return;
+ default:
+ gtk_widget_destroy(GTK_WIDGET(d));
+ return;
}
domain_handle = gtk_select_domain_dialog_get_handle(d);
gtk_widget_destroy(GTK_WIDGET(d));
@@ -104,18 +104,18 @@ void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
{
GtkRpcBindingDialog *d;
NTSTATUS status;
- struct samr_Connect r;
+ struct samr_Connect r;
TALLOC_CTX *mem_ctx;
gint result;
d = GTK_RPC_BINDING_DIALOG(gtk_rpc_binding_dialog_new(FALSE));
result = gtk_dialog_run(GTK_DIALOG(d));
switch(result) {
- case GTK_RESPONSE_ACCEPT:
- break;
- default:
- gtk_widget_destroy(GTK_WIDGET(d));
- return;
+ case GTK_RESPONSE_ACCEPT:
+ break;
+ default:
+ gtk_widget_destroy(GTK_WIDGET(d));
+ return;
}
/* If connected, get list of jobs */
@@ -127,19 +127,19 @@ void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
return;
}
- r.in.system_name = 0;
- r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
- r.out.handle = &sam_handle;
-
+ r.in.system_name = 0;
+ r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
+ r.out.handle = &sam_handle;
+
mem_ctx = talloc_init("connect");
- status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &r);
+ status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &r);
talloc_destroy(mem_ctx);
- if (!NT_STATUS_IS_OK(status)) {
+ if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(mainwin, status);
sam_pipe = NULL;
gtk_widget_destroy(GTK_WIDGET(d));
return;
- }
+ }
gtk_widget_destroy(GTK_WIDGET(d));
@@ -149,7 +149,7 @@ void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data)
void
on_quit_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
if(sam_pipe)dcerpc_pipe_close(sam_pipe);
gtk_main_quit();
@@ -158,7 +158,7 @@ on_quit_activate (GtkMenuItem *menuitem,
void
on_account_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
//FIXME
}
@@ -166,7 +166,7 @@ on_account_activate (GtkMenuItem *menuitem,
void
on_user_rights_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
//FIXME
}
@@ -174,7 +174,7 @@ on_user_rights_activate (GtkMenuItem *menuitem,
void
on_audit_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
//FIXME
}
@@ -182,7 +182,7 @@ on_audit_activate (GtkMenuItem *menuitem,
void
on_trust_relations_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
//FIXME
}
@@ -190,7 +190,7 @@ on_trust_relations_activate (GtkMenuItem *menuitem,
void
on_refresh_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
update_userlist();
update_grouplist();
@@ -199,14 +199,14 @@ on_refresh_activate (GtkMenuItem *menuitem,
void
on_about_activate (GtkMenuItem *menuitem,
- gpointer user_data)
+ gpointer user_data)
{
GtkDialog *aboutwin = GTK_DIALOG(create_gtk_samba_about_dialog("gwsam"));
gtk_dialog_run(aboutwin);
gtk_widget_destroy(GTK_WIDGET(aboutwin));
}
- GtkWidget*
+GtkWidget*
create_mainwindow (void)
{
GtkWidget *mainwin;
@@ -243,168 +243,167 @@ create_mainwindow (void)
GtkWidget *user_list;
GtkWidget *scrolledwindow2;
GtkWidget *group_list;
- GtkWidget *statusbar;
- GtkAccelGroup *accel_group;
+ GtkWidget *statusbar;
+ GtkAccelGroup *accel_group;
- accel_group = gtk_accel_group_new ();
+ accel_group = gtk_accel_group_new ();
- mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_default_size (GTK_WINDOW (mainwin), 642, 562);
- gtk_window_set_title (GTK_WINDOW (mainwin), "User Manager");
+ mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (GTK_WINDOW (mainwin), 642, 562);
+ 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);
+ 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);
+ 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 ("_User");
- gtk_widget_show (menuitem1);
- gtk_container_add (GTK_CONTAINER (menubar), menuitem1);
+ menuitem1 = gtk_menu_item_new_with_mnemonic ("_User");
+ 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);
+ 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_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);
-
- policies = gtk_menu_item_new_with_mnemonic ("_Policies");
- gtk_widget_show (policies);
- gtk_container_add (GTK_CONTAINER (menubar), policies);
-
- policies_menu = gtk_menu_new ();
- 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);
-
- 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",
- G_CALLBACK (on_new1_activate),
- NULL);
- g_signal_connect ((gpointer) seldomain, "activate",
- G_CALLBACK (on_select_domain_activate),
- NULL);
- g_signal_connect ((gpointer) connect, "activate",
- G_CALLBACK (on_connect_activate),
- NULL);
- g_signal_connect ((gpointer) quit, "activate",
- G_CALLBACK (on_quit_activate),
- NULL);
- g_signal_connect ((gpointer) account, "activate",
- G_CALLBACK (on_account_activate),
- NULL);
- g_signal_connect ((gpointer) user_rights, "activate",
- G_CALLBACK (on_user_rights_activate),
- NULL);
- g_signal_connect ((gpointer) audit, "activate",
- G_CALLBACK (on_audit_activate),
- NULL);
- g_signal_connect ((gpointer) trust_relations, "activate",
- G_CALLBACK (on_trust_relations_activate),
- NULL);
- g_signal_connect ((gpointer) refresh, "activate",
- G_CALLBACK (on_refresh_activate),
- NULL);
- g_signal_connect ((gpointer) about, "activate",
- G_CALLBACK (on_about_activate),
- NULL);
-
- gtk_window_add_accel_group (GTK_WINDOW (mainwin), accel_group);
-
- return mainwin;
+ 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_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);
+
+ policies = gtk_menu_item_new_with_mnemonic ("_Policies");
+ gtk_widget_show (policies);
+ gtk_container_add (GTK_CONTAINER (menubar), policies);
+
+ policies_menu = gtk_menu_new ();
+ 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);
+
+ 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",
+ G_CALLBACK (on_new1_activate),
+ NULL);
+ g_signal_connect ((gpointer) seldomain, "activate",
+ G_CALLBACK (on_select_domain_activate),
+ NULL);
+ g_signal_connect ((gpointer) connect, "activate",
+ G_CALLBACK (on_connect_activate),
+ NULL);
+ g_signal_connect ((gpointer) quit, "activate",
+ G_CALLBACK (on_quit_activate),
+ NULL);
+ g_signal_connect ((gpointer) account, "activate",
+ G_CALLBACK (on_account_activate),
+ NULL);
+ g_signal_connect ((gpointer) user_rights, "activate",
+ G_CALLBACK (on_user_rights_activate),
+ NULL);
+ g_signal_connect ((gpointer) audit, "activate",
+ G_CALLBACK (on_audit_activate),
+ NULL);
+ g_signal_connect ((gpointer) trust_relations, "activate",
+ G_CALLBACK (on_trust_relations_activate),
+ NULL);
+ g_signal_connect ((gpointer) refresh, "activate",
+ G_CALLBACK (on_refresh_activate),
+ NULL);
+ g_signal_connect ((gpointer) about, "activate",
+ G_CALLBACK (on_about_activate),
+ NULL);
+
+ gtk_window_add_accel_group (GTK_WINDOW (mainwin), accel_group);
+
+ return mainwin;
}
- int main(int argc, char **argv)
+int main(int argc, char **argv)
{
gtk_init(&argc, &argv);
mainwin = create_mainwindow();
gtk_widget_show(mainwin);
gtk_main();
}
-
diff --git a/source4/gtk/tools/gwsam_user.c b/source4/gtk/tools/gwsam_user.c
index 9b764dc1d2..e7a322a46d 100644
--- a/source4/gtk/tools/gwsam_user.c
+++ b/source4/gtk/tools/gwsam_user.c
@@ -26,331 +26,331 @@
GtkWidget*
create_user_edit_dialog (void)
{
- GtkWidget *user_edit_dialog;
- GtkWidget *dialog_vbox1;
- GtkWidget *notebook;
- GtkWidget *table1;
- GtkWidget *label4;
- GtkWidget *label5;
- GtkWidget *label6;
- GtkWidget *label7;
- GtkWidget *label8;
- GtkWidget *chk_mustchange;
- GtkWidget *entry_fullname;
- GtkWidget *entry_description;
- GtkWidget *lbl_username;
- GtkWidget *entry_password;
- GtkWidget *entry_confirm_password;
- GtkWidget *chk_cannotchange;
- GtkWidget *chk_cannotexpire;
- GtkWidget *chk_disabled;
- GtkWidget *chk_lockedout;
- GtkWidget *label1;
- GtkWidget *hbox1;
- GtkWidget *scrolledwindow3;
- GtkWidget *treeview3;
- GtkWidget *vbox2;
- GtkWidget *btn_groupadd;
- GtkWidget *btn_groupdel;
- GtkWidget *scrolledwindow4;
- GtkWidget *treeview4;
- GtkWidget *label2;
- GtkWidget *vbox3;
- GtkWidget *frame1;
- GtkWidget *table2;
- GtkWidget *label12;
- GtkWidget *label13;
- GtkWidget *entry_profilepath;
- GtkWidget *entry_scriptname;
- GtkWidget *label10;
- GtkWidget *frame2;
- GtkWidget *table3;
- GtkWidget *label14;
- GtkWidget *entry_homedir;
- GtkWidget *chk_mapdrive;
- GtkWidget *combo_homedrive;
- GtkWidget *label11;
- GtkWidget *label3;
- GtkWidget *dialog_action_area1;
- GtkWidget *cancelbutton1;
- GtkWidget *applybutton1;
- GtkWidget *okbutton1;
-
- user_edit_dialog = gtk_dialog_new ();
- 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_box_entry_new_text ();
- 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);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "C:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "D:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "E:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "F:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "G:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "H:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "I:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "J:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "K");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "L:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "M:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "N:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "O:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "P:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "Q:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "R:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "S:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "T:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "U:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "V:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "W:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "X:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "Y:");
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "Z:");
-
- 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);
-
- return user_edit_dialog;
+ GtkWidget *user_edit_dialog;
+ GtkWidget *dialog_vbox1;
+ GtkWidget *notebook;
+ GtkWidget *table1;
+ GtkWidget *label4;
+ GtkWidget *label5;
+ GtkWidget *label6;
+ GtkWidget *label7;
+ GtkWidget *label8;
+ GtkWidget *chk_mustchange;
+ GtkWidget *entry_fullname;
+ GtkWidget *entry_description;
+ GtkWidget *lbl_username;
+ GtkWidget *entry_password;
+ GtkWidget *entry_confirm_password;
+ GtkWidget *chk_cannotchange;
+ GtkWidget *chk_cannotexpire;
+ GtkWidget *chk_disabled;
+ GtkWidget *chk_lockedout;
+ GtkWidget *label1;
+ GtkWidget *hbox1;
+ GtkWidget *scrolledwindow3;
+ GtkWidget *treeview3;
+ GtkWidget *vbox2;
+ GtkWidget *btn_groupadd;
+ GtkWidget *btn_groupdel;
+ GtkWidget *scrolledwindow4;
+ GtkWidget *treeview4;
+ GtkWidget *label2;
+ GtkWidget *vbox3;
+ GtkWidget *frame1;
+ GtkWidget *table2;
+ GtkWidget *label12;
+ GtkWidget *label13;
+ GtkWidget *entry_profilepath;
+ GtkWidget *entry_scriptname;
+ GtkWidget *label10;
+ GtkWidget *frame2;
+ GtkWidget *table3;
+ GtkWidget *label14;
+ GtkWidget *entry_homedir;
+ GtkWidget *chk_mapdrive;
+ GtkWidget *combo_homedrive;
+ GtkWidget *label11;
+ GtkWidget *label3;
+ GtkWidget *dialog_action_area1;
+ GtkWidget *cancelbutton1;
+ GtkWidget *applybutton1;
+ GtkWidget *okbutton1;
+
+ user_edit_dialog = gtk_dialog_new ();
+ 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_box_entry_new_text ();
+ 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);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "C:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "D:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "E:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "F:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "G:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "H:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "I:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "J:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "K");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "L:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "M:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "N:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "O:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "P:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "Q:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "R:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "S:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "T:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "U:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "V:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "W:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "X:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "Y:");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo_homedrive), "Z:");
+
+ 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);
+
+ return user_edit_dialog;
}