diff options
Diffstat (limited to 'source4/gtk/tools')
-rw-r--r-- | source4/gtk/tools/gregedit.c | 17 | ||||
-rw-r--r-- | source4/gtk/tools/gwcrontab.c | 28 | ||||
-rw-r--r-- | source4/gtk/tools/gwsam.c | 13 |
3 files changed, 32 insertions, 26 deletions
diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c index bdaf8ec4f0..f7f5b3528a 100644 --- a/source4/gtk/tools/gregedit.c +++ b/source4/gtk/tools/gregedit.c @@ -83,7 +83,7 @@ static void expand_key(GtkTreeView *treeview, GtkTreeIter *parent, GtkTreePath * if(!W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) gtk_show_werror(mainwin, error); } -static void registry_load_root() +static void registry_load_root(void) { struct registry_key *root; GtkTreeIter iter, tmpiter; @@ -316,6 +316,7 @@ static GtkWidget* create_mainwin (void) GtkWidget *menu_file; GtkWidget *menu_file_menu; GtkWidget *open_nt4; + GtkWidget *open_ldb; GtkWidget *open_w95; GtkWidget *open_gconf; GtkWidget *open_remote; @@ -367,7 +368,7 @@ static GtkWidget* create_mainwin (void) g_signal_connect ((gpointer) open_nt4, "activate", G_CALLBACK (on_open_file_activate), - "nt4"); + (gconstpointer)"nt4"); } if(reg_has_backend("w95")) { @@ -377,7 +378,7 @@ static GtkWidget* create_mainwin (void) g_signal_connect ((gpointer) open_w95, "activate", G_CALLBACK (on_open_file_activate), - "w95"); + (gconstpointer)"w95"); } if(reg_has_backend("gconf")) { @@ -400,6 +401,16 @@ static GtkWidget* create_mainwin (void) NULL); } + if(reg_has_backend("ldb")) { + open_ldb = gtk_image_menu_item_new_with_mnemonic("Open _LDB file"); + gtk_widget_show (open_ldb); + gtk_container_add (GTK_CONTAINER (menu_file_menu), open_ldb); + + g_signal_connect ((gpointer) open_ldb, "activate", + G_CALLBACK (on_open_file_activate), + (gconstpointer)"ldb"); + } + save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group); gtk_widget_show (save); gtk_widget_set_sensitive( save, False ); diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c index ed45ca7704..c742edf7e9 100644 --- a/source4/gtk/tools/gwcrontab.c +++ b/source4/gtk/tools/gwcrontab.c @@ -97,7 +97,7 @@ on_connect_activate (GtkMenuItem *menuitem, } /* If connected, get list of jobs */ - status = dcerpc_pipe_connect(&at_pipe, (char *)gtk_rpc_binding_dialog_get_binding(d, DCERPC_ATSVC_NAME), DCERPC_ATSVC_UUID, DCERPC_ATSVC_VERSION, lp_workgroup(), (char *)gtk_rpc_binding_dialog_get_username(d), (char *)gtk_rpc_binding_dialog_get_password(d)); + status = dcerpc_pipe_connect(&at_pipe, gtk_rpc_binding_dialog_get_binding(d, DCERPC_ATSVC_NAME), DCERPC_ATSVC_UUID, DCERPC_ATSVC_VERSION, lp_workgroup(), gtk_rpc_binding_dialog_get_username(d), gtk_rpc_binding_dialog_get_password(d)); if(!NT_STATUS_IS_OK(status)) { gtk_show_ntstatus(mainwin, status); at_pipe = NULL; @@ -213,7 +213,7 @@ create_mainwindow (void) GtkWidget *menubar; GtkWidget *menuitem4; GtkWidget *menuitem4_menu; - GtkWidget *connect; + GtkWidget *mnu_connect; GtkWidget *separatormenuitem1; GtkWidget *quit; GtkWidget *task; @@ -249,9 +249,11 @@ create_mainwindow (void) 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); + mnu_connect = gtk_menu_item_new_with_mnemonic ("_Connect"); + gtk_widget_show (mnu_connect); + gtk_container_add (GTK_CONTAINER (menuitem4_menu), mnu_connect); + g_signal_connect ((gpointer) mnu_connect, "activate", + G_CALLBACK (on_connect_activate), NULL); separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (separatormenuitem1); @@ -343,21 +345,15 @@ create_mainwindow (void) 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_CALLBACK (on_quit_activate), NULL); g_signal_connect ((gpointer) new, "activate", - G_CALLBACK (on_new_activate), - NULL); + G_CALLBACK (on_new_activate), NULL); g_signal_connect ((gpointer) delete, "activate", - G_CALLBACK (on_delete_activate), - NULL); + G_CALLBACK (on_delete_activate), NULL); g_signal_connect ((gpointer) about, "activate", - G_CALLBACK (on_about_activate), - NULL); + G_CALLBACK (on_about_activate), NULL); gtk_window_add_accel_group (GTK_WINDOW (mainwindow), accel_group); gtk_widget_set_sensitive(tasks, FALSE); diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c index 1b2d4413be..75ff04f9cc 100644 --- a/source4/gtk/tools/gwsam.c +++ b/source4/gtk/tools/gwsam.c @@ -118,7 +118,7 @@ void on_connect_activate (GtkMenuItem *menuitem, gpointer user_data) } /* If connected, get list of jobs */ - status = dcerpc_pipe_connect(&sam_pipe, (char *)gtk_rpc_binding_dialog_get_binding(d, DCERPC_SAMR_NAME), DCERPC_SAMR_UUID, DCERPC_SAMR_VERSION, lp_workgroup(), (char *)gtk_rpc_binding_dialog_get_username(d), (char *)gtk_rpc_binding_dialog_get_password(d)); + status = dcerpc_pipe_connect(&sam_pipe, gtk_rpc_binding_dialog_get_binding(d, DCERPC_SAMR_NAME), DCERPC_SAMR_UUID, DCERPC_SAMR_VERSION, lp_workgroup(), gtk_rpc_binding_dialog_get_username(d), gtk_rpc_binding_dialog_get_password(d)); if(!NT_STATUS_IS_OK(status)) { gtk_show_ntstatus(mainwin, status); sam_pipe = NULL; @@ -208,9 +208,8 @@ on_about_activate (GtkMenuItem *menuitem, GtkWidget* create_mainwindow (void) { - GtkWidget *mainwin; GtkWidget *vbox1; - GtkWidget *connect; + GtkWidget *mnu_connect; GtkWidget *menubar; GtkWidget *menuitem1; GtkWidget *menuitem1_menu; @@ -260,9 +259,9 @@ create_mainwindow (void) menuitem1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu); - connect = gtk_menu_item_new_with_mnemonic ("_Connect"); - gtk_widget_show (connect); - gtk_container_add (GTK_CONTAINER (menuitem1_menu), connect); + mnu_connect = gtk_menu_item_new_with_mnemonic ("_Connect"); + gtk_widget_show (mnu_connect); + gtk_container_add (GTK_CONTAINER (menuitem1_menu), mnu_connect); seldomain = gtk_menu_item_new_with_mnemonic("_Select Domain"); gtk_widget_show(seldomain); @@ -374,7 +373,7 @@ create_mainwindow (void) g_signal_connect ((gpointer) seldomain, "activate", G_CALLBACK (on_select_domain_activate), NULL); - g_signal_connect ((gpointer) connect, "activate", + g_signal_connect ((gpointer) mnu_connect, "activate", G_CALLBACK (on_connect_activate), NULL); g_signal_connect ((gpointer) quit, "activate", |