r2683: Fix a couple of compile warnings, depend on gtk+-2.4
authorJelmer Vernooij <jelmer@samba.org>
Mon, 27 Sep 2004 09:26:37 +0000 (09:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:21 +0000 (12:59 -0500)
source/build/smb_build/public.m4
source/gtk/common/gtk-smb.c
source/gtk/config.m4
source/gtk/tools/gregedit.c
source/gtk/tools/gwcrontab.c
source/gtk/tools/gwsam.c

index 55d9aa62ba9f6d9fcb1c75e90ce1b8d5e0fb216b..65dd4ed8ca2609181c4dd87ab3dbfa099dbb32de 100644 (file)
@@ -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
index 2348661cb752e6b6c6a5e83bc416b772e0009bbe..cb7a80486657aa160061aa735e6a8e2b34145bbd 100644 (file)
@@ -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;
index 757ce59c0719b279471c9adf8118274a5722b46f..7757eae8be5fc6c0067ce511d9f1456887b5123e 100644 (file)
@@ -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)
index bdaf8ec4f02791506781db72c55042e5e353b5da..f7f5b3528aa3e1b753a4de0cb738559a20f86aa9 100644 (file)
@@ -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 );
index ed45ca770492785a4ff7a7b31cf8ac294ab6fc52..c742edf7e998a5d0a354e7d78c8f98142250e66e 100644 (file)
@@ -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);
index 1b2d4413be66f0d423eb46c392b0764d243f30a2..75ff04f9cc372a08d0b267605edecfbcf96ef61a 100644 (file)
@@ -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",