diff options
-rw-r--r-- | source4/build/smb_build/public.m4 | 11 | ||||
-rw-r--r-- | source4/gtk/common/gtk-smb.c | 4 | ||||
-rw-r--r-- | source4/gtk/config.m4 | 2 | ||||
-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 |
6 files changed, 41 insertions, 34 deletions
diff --git a/source4/build/smb_build/public.m4 b/source4/build/smb_build/public.m4 index 55d9aa62ba..65dd4ed8ca 100644 --- a/source4/build/smb_build/public.m4 +++ b/source4/build/smb_build/public.m4 @@ -357,13 +357,14 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG], SMB_EXT_LIB_ENABLE($1, YES) SMB_EXT_LIB($1, - [`$PKG_CONFIG --libs-only-l $2`], - [`$PKG_CONFIG --cflags-only-other $2`], - [`$PKG_CONFIG --cflags-only-I $2`], - [`$PKG_CONFIG --libs-only-other $2` `$PKG_CONFIG --libs-only-L $2`]) + [`$PKG_CONFIG --libs-only-l "$2"`], + [`$PKG_CONFIG --cflags-only-other "$2"`], + [`$PKG_CONFIG --cflags-only-I "$2"`], + [`$PKG_CONFIG --libs-only-other "$2"` `$PKG_CONFIG --libs-only-L "$2"`]) # FIXME: Dirty hack - CFLAGS="$CFLAGS `$PKG_CONFIG --cflags $2`" + $1_CFLAGS="`$PKG_CONFIG --cflags $2`" + CFLAGS="$CFLAGS $$1_CFLAGS" else AC_MSG_RESULT(no) $PKG_CONFIG --errors-to-stdout --print-errors $2 diff --git a/source4/gtk/common/gtk-smb.c b/source4/gtk/common/gtk-smb.c index 2348661cb7..cb7a804866 100644 --- a/source4/gtk/common/gtk-smb.c +++ b/source4/gtk/common/gtk-smb.c @@ -298,7 +298,7 @@ const char *gtk_rpc_binding_dialog_get_host(GtkRpcBindingDialog *d) return gtk_entry_get_text(GTK_ENTRY(d->entry_host)); } -const char *gtk_rpc_binding_dialog_get_binding(GtkRpcBindingDialog *d, char *pipe_name) +const char *gtk_rpc_binding_dialog_get_binding(GtkRpcBindingDialog *d, const char *pipe_name) { const char *transport; const char *host; @@ -331,7 +331,7 @@ const char *gtk_rpc_binding_dialog_get_binding(GtkRpcBindingDialog *d, char *pip } } -GtkWidget *create_gtk_samba_about_dialog (char *appname) +GtkWidget *create_gtk_samba_about_dialog (const char *appname) { GtkWidget *samba_about_dialog; GtkWidget *dialog_vbox1; diff --git a/source4/gtk/config.m4 b/source4/gtk/config.m4 index 757ce59c07..7757eae8be 100644 --- a/source4/gtk/config.m4 +++ b/source4/gtk/config.m4 @@ -1,6 +1,6 @@ dnl # LIB GTK SMB subsystem -SMB_EXT_LIB_FROM_PKGCONFIG(gtk, [glib-2.0 gtk+-2.0]) +SMB_EXT_LIB_FROM_PKGCONFIG(gtk, [glib-2.0 gtk+-2.0>=2.4]) SMB_SUBSYSTEM_ENABLE(GTKSMB, NO) SMB_BINARY_ENABLE(gregedit, NO) SMB_BINARY_ENABLE(gwcrontab, NO) 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", |