[gnome-db] Warnings cleanup (gnome-db)
- From: Gonzalo Paniagua Javier <gonzalo gnome-db org>
- To: Gnome-db list <gnome-db-list gnome org>
- Subject: [gnome-db] Warnings cleanup (gnome-db)
- Date: Sat, 30 Mar 2002 03:37:25 +0100
Hi!
Here is a patch the removes almost all the warnings from
gnome-db. There are a few more around in unfinished code.
Apply?
Index: components/components-connection.c
===================================================================
RCS file: /cvs/gnome/gnome-db/components/components-connection.c,v
retrieving revision 1.15
diff -u -r1.15 components-connection.c
--- components/components-connection.c 21 Mar 2002 03:03:51 -0000 1.15
+++ components/components-connection.c 30 Mar 2002 02:32:26 -0000
@@ -29,6 +29,7 @@
#include <libgnomedb/gnome-db-error-dialog.h>
#include <libgnomedb/gnome-db-login.h>
#include <libgnomedb/gnome-db-login-dialog.h>
+#include <libgnomedb/gnome-db-util.h>
#include "gnome-db-intl.h"
#include "components-connection.h"
@@ -114,7 +115,8 @@
/* create the dialog */
dialog = gnome_db_login_dialog_new (_("Open Connection"));
if (parent)
- gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
+ gtk_window_set_transient_for (GTK_WINDOW (dialog),
+ GTK_WINDOW (parent));
/* run the dialog */
if (gnome_db_login_dialog_run (GNOME_DB_LOGIN_DIALOG (dialog))) {
Index: components/database/command-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-db/components/database/command-dialog.c,v
retrieving revision 1.2
diff -u -r1.2 command-dialog.c
--- components/database/command-dialog.c 28 Mar 2002 22:21:52 -0000 1.2
+++ components/database/command-dialog.c 30 Mar 2002 02:32:26 -0000
@@ -31,6 +31,7 @@
#include <libgnomedb/gnome-db-gray-bar.h>
#include <libgnomedb/gnome-db-grid.h>
#include <libgnomedb/gnome-db-list.h>
+#include <libgnomedb/gnome-db-util.h>
#include "command-dialog.h"
/*
Index: components/manager/components-manager-view.c
===================================================================
RCS file: /cvs/gnome/gnome-db/components/manager/components-manager-view.c,v
retrieving revision 1.13
diff -u -r1.13 components-manager-view.c
--- components/manager/components-manager-view.c 28 Mar 2002 22:21:54 -0000 1.13
+++ components/manager/components-manager-view.c 30 Mar 2002 02:32:27 -0000
@@ -23,13 +23,17 @@
#include <config.h>
#endif
+#include <string.h>
#include <bonobo/bonobo-i18n.h>
#include <libgda/gda-config.h>
#include <gtk/gtkdialog.h>
+#include <gtk/gtklabel.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtkstock.h>
#include <libgnomedb/gnome-db-dsn-config.h>
#include <libgnomedb/gnome-db-grid.h>
+#include <libgnomedb/gnome-db-util.h>
+#include <libgnomeui/gnome-window-icon.h>
#include "components-manager-view.h"
#define PARENT_TYPE GTK_TYPE_VBOX
@@ -138,7 +142,7 @@
gtk_box_pack_start (GTK_BOX (view), view->priv->notebook, TRUE, TRUE, 0);
/* dsn tab */
- view->priv->dsn_tab = gnome_db_new_hbox_widget ();
+ view->priv->dsn_tab = gnome_db_new_hbox_widget (FALSE, 0);
gtk_notebook_append_page (GTK_NOTEBOOK (view->priv->notebook),
view->priv->dsn_tab, gtk_label_new (_("Data Sources")));
@@ -152,7 +156,7 @@
gtk_box_pack_start (GTK_BOX (view->priv->dsn_tab), view->priv->dsn_list, TRUE, TRUE, 0);
/* providers tab */
- view->priv->providers_tab = gnome_db_new_hbox_widget ();
+ view->priv->providers_tab = gnome_db_new_hbox_widget (FALSE, 0);
gtk_notebook_append_page (GTK_NOTEBOOK (view->priv->notebook),
view->priv->providers_tab,
gtk_label_new (_("Providers")));
@@ -233,7 +237,7 @@
for (l = selection; l != NULL; l = l->next) {
str = gda_value_stringify (
- gda_data_model_get_value_at (model, 0,
+ (GdaValue *) gda_data_model_get_value_at (model, 0,
GPOINTER_TO_INT (l->data)));
if (gnome_db_yes_no_dialog (
gtk_widget_get_toplevel (GTK_WIDGET (view)),
@@ -271,7 +275,8 @@
model = gnome_db_grid_get_model (GNOME_DB_GRID (view->priv->dsn_list));
str = gda_value_stringify (
- gda_data_model_get_value_at (model, 0, GPOINTER_TO_INT (selection->data)));
+ (GdaValue *) gda_data_model_get_value_at (model, 0,
+ GPOINTER_TO_INT (selection->data)));
dsn_info = gda_config_find_data_source (str);
g_free (str);
@@ -281,7 +286,7 @@
/* show the properties */
dialog = gtk_dialog_new_with_buttons (
_("Properties"),
- GTK_WINDOW (gtk_widget_get_toplevel (view)), 0,
+ GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))), 0,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_OK,
NULL);
Index: components/manager/components-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-db/components/manager/components-manager.c,v
retrieving revision 1.12
diff -u -r1.12 components-manager.c
--- components/manager/components-manager.c 28 Mar 2002 22:21:54 -0000 1.12
+++ components/manager/components-manager.c 30 Mar 2002 02:32:27 -0000
@@ -25,6 +25,8 @@
#include <bonobo/bonobo-i18n.h>
#include <libgnomedb/gnome-db-dsn-config-druid.h>
+#include <libgnomedb/gnome-db-util.h>
+#include <libgnomeui/gnome-window-icon.h>
#include "components-manager.h"
#include "components-manager-view.h"
@@ -63,7 +65,9 @@
g_return_if_fail (COMPONENTS_IS_MANAGER (comp));
- control = gnome_db_shell_component_get_control (comp);
+ control = gnome_db_shell_component_get_control (
+ GNOME_DB_SHELL_COMPONENT (comp));
+
g_return_if_fail (GNOME_DB_IS_CONTROL (control));
components_manager_view_delete_selected (
@@ -79,7 +83,9 @@
g_return_if_fail (COMPONENTS_IS_MANAGER (comp));
- control = gnome_db_shell_component_get_control (comp);
+ control = gnome_db_shell_component_get_control (
+ GNOME_DB_SHELL_COMPONENT (comp));
+
g_return_if_fail (GNOME_DB_IS_CONTROL (control));
components_manager_view_show_properties (
@@ -95,7 +101,9 @@
g_return_if_fail (COMPONENTS_IS_MANAGER (comp));
- control = gnome_db_shell_component_get_control (comp);
+ control = gnome_db_shell_component_get_control (
+ GNOME_DB_SHELL_COMPONENT (comp));
+
g_return_if_fail (GNOME_DB_IS_CONTROL (control));
components_manager_view_select_all (
@@ -111,7 +119,9 @@
g_return_if_fail (COMPONENTS_IS_MANAGER (comp));
- control = gnome_db_shell_component_get_control (comp);
+ control = gnome_db_shell_component_get_control (
+ GNOME_DB_SHELL_COMPONENT (comp));
+
g_return_if_fail (GNOME_DB_IS_CONTROL (control));
components_manager_view_unselect_all (
@@ -154,13 +164,16 @@
g_return_if_fail (COMPONENTS_IS_MANAGER (comp));
- control = gnome_db_shell_component_get_control (comp);
+ control = gnome_db_shell_component_get_control (
+ GNOME_DB_SHELL_COMPONENT (comp));
+
g_return_if_fail (GNOME_DB_IS_CONTROL (control));
/* create the window to contain the druid */
dialog = gtk_dialog_new_with_buttons (
_("New data source"),
- GTK_WINDOW (gtk_widget_get_toplevel (bonobo_control_get_widget (control))),
+ GTK_WINDOW (gtk_widget_get_toplevel (
+ bonobo_control_get_widget (BONOBO_CONTROL (control)))),
0, NULL);
gnome_window_icon_set_from_file (GTK_WINDOW (dialog),
GNOME_DB_PIXMAPDIR "/gnome-db.png");
Index: frontend/main.c
===================================================================
RCS file: /cvs/gnome/gnome-db/frontend/main.c,v
retrieving revision 1.12
diff -u -r1.12 main.c
--- frontend/main.c 4 Mar 2002 02:41:00 -0000 1.12
+++ frontend/main.c 30 Mar 2002 02:32:27 -0000
@@ -29,6 +29,7 @@
#include <libgda/libgda.h>
#include <libgnomedb/gnome-db-util.h>
#include <libgnomedb/gnome-db-window.h>
+#include <libgnomeui/gnome-window-icon.h>
static GtkWidget *
create_progress_dialog (void)
Index: frontend/window.c
===================================================================
RCS file: /cvs/gnome/gnome-db/frontend/window.c,v
retrieving revision 1.7
diff -u -r1.7 window.c
--- frontend/window.c 23 Feb 2002 00:40:46 -0000 1.7
+++ frontend/window.c 30 Mar 2002 02:32:27 -0000
@@ -40,7 +40,7 @@
for (l = g_list_first (open_windows); l != NULL; l = l->next) {
GnomeDbShell *shell = GNOME_DB_SHELL (l->data);
- if (gnome_db_shell_get_window (shell) == window) {
+ if (GNOME_DB_WINDOW (gnome_db_shell_get_window (shell)) == window) {
open_windows = g_list_remove (open_windows, shell);
if (open_windows == NULL) {
gnome_db_main_quit ();
Index: lib/gnome-db-shell-settings.c
===================================================================
RCS file: /cvs/gnome/gnome-db/lib/gnome-db-shell-settings.c,v
retrieving revision 1.9
diff -u -r1.9 gnome-db-shell-settings.c
--- lib/gnome-db-shell-settings.c 28 Mar 2002 22:21:56 -0000 1.9
+++ lib/gnome-db-shell-settings.c 30 Mar 2002 02:32:27 -0000
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#include <stdlib.h>
#include <bonobo/bonobo-i18n.h>
#include <libgda/gda-config.h>
#include <gtk/gtklabel.h>
@@ -450,7 +451,7 @@
/* create the default configuration tab */
table = gnome_db_new_table_widget (3, 2, FALSE);
- create_main_window_frame (settings, table);
+ create_main_window_frame (settings, GTK_TABLE (table));
gtk_notebook_append_page (GTK_NOTEBOOK (settings->priv->notebook),
table, gtk_label_new (_("General")));
Index: lib/gnome-db-shell.c
===================================================================
RCS file: /cvs/gnome/gnome-db/lib/gnome-db-shell.c,v
retrieving revision 1.41
diff -u -r1.41 gnome-db-shell.c
--- lib/gnome-db-shell.c 24 Mar 2002 00:25:31 -0000 1.41
+++ lib/gnome-db-shell.c 30 Mar 2002 02:32:27 -0000
@@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include <stdlib.h>
#include <config.h>
#include <bonobo/bonobo-i18n.h>
#include <libgda/gda-config.h>
@@ -34,6 +35,8 @@
#include <gtk/gtkvpaned.h>
#include <libgnomedb/gnome-db-util.h>
#include <libgnomedb/gnome-db-window.h>
+#include <libgnomeui/gnome-about.h>
+#include <libgnomeui/gnome-window-icon.h>
#include "gnome-db-defs.h"
#include "gnome-db-shell.h"
#include "gnome-db-shell-settings.h"
@@ -130,8 +133,8 @@
comp_info->description,
comp_info->id,
shell_icon,
- GTK_SIGNAL_FUNC (shortcut_button_clicked_cb),
- shell);
+ shortcut_button_clicked_cb,
+ (gpointer) shell);
g_free (shell_icon);
}
@@ -198,7 +201,7 @@
add_components_to_shortcut (shell);
/* load state of window from configuration */
- uic = gnome_db_window_get_ui_component (shell->priv->window);
+ uic = gnome_db_window_get_ui_component (GNOME_DB_WINDOW (shell->priv->window));
if (gda_config_get_boolean (GNOME_DB_SHELL_CONFIG_SHOW_SHORTCUT) ||
!gda_config_has_key (GNOME_DB_SHELL_CONFIG_SHOW_SHORTCUT)) {
@@ -247,7 +250,7 @@
g_return_if_fail (path != NULL);
g_return_if_fail (GNOME_DB_IS_SHELL (shell));
- uic = gnome_db_window_get_ui_component (shell->priv->window);
+ uic = gnome_db_window_get_ui_component (GNOME_DB_WINDOW (shell->priv->window));
if (!strcmp (path, GNOME_DB_SHELL_CONFIG_SHOW_SHORTCUT)) {
/* hide/show shortcut bar */
@@ -313,7 +316,7 @@
/* load it */
wid = gnome_db_shell_component_client_new (shell, tooltip);
if (GNOME_DB_IS_SHELL_COMPONENT_CLIENT (wid)) {
- gchar *title;
+ const gchar *title;
g_object_set_data_full (G_OBJECT (wid),
"GNOME_DB_Manager_ComponentDescription",
@@ -384,7 +387,8 @@
_("Copyright 2001, The GNOME Foundation"),
_("GNOME Database front-end"),
authors, NULL, NULL, logo);
- gtk_window_set_transient_for (GTK_WINDOW (dialog), shell->priv->window);
+ gtk_window_set_transient_for (GTK_WINDOW (dialog),
+ GTK_WINDOW (shell->priv->window));
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (gtk_widget_destroyed), &dialog);
@@ -481,7 +485,8 @@
impl_UIShell_notifyConnectionOpened (PortableServer_Servant servant,
const CORBA_char *name,
const CORBA_char *username,
- const CORBA_char *password)
+ const CORBA_char *password,
+ CORBA_Environment *ev)
{
GnomeDbShell *shell = (GnomeDbShell *) bonobo_object (servant);
@@ -492,7 +497,8 @@
impl_UIShell_notifyConnectionClosed (PortableServer_Servant servant,
const CORBA_char *name,
const CORBA_char *username,
- const CORBA_char *password)
+ const CORBA_char *password,
+ CORBA_Environment *ev)
{
GnomeDbShell *shell = (GnomeDbShell *) bonobo_object (servant);
Index: lib/gnome-db-shortcut.c
===================================================================
RCS file: /cvs/gnome/gnome-db/lib/gnome-db-shortcut.c,v
retrieving revision 1.19
diff -u -r1.19 gnome-db-shortcut.c
--- lib/gnome-db-shortcut.c 28 Mar 2002 22:21:56 -0000 1.19
+++ lib/gnome-db-shortcut.c 30 Mar 2002 02:32:27 -0000
@@ -29,6 +29,7 @@
#include <bonobo/bonobo-i18n.h>
#include <gtk/gtkbutton.h>
#include <gtk/gtkframe.h>
+#include <gtk/gtkimage.h>
#define PARENT_TYPE GTK_TYPE_EVENT_BOX
Index: monikers/factory.c
===================================================================
RCS file: /cvs/gnome/gnome-db/monikers/factory.c,v
retrieving revision 1.3
diff -u -r1.3 factory.c
--- monikers/factory.c 28 Mar 2002 22:21:57 -0000 1.3
+++ monikers/factory.c 30 Mar 2002 02:32:27 -0000
@@ -25,6 +25,7 @@
#include <bonobo/bonobo-i18n.h>
#include <bonobo/bonobo-shlib-factory.h>
+#include <libgda/gda-log.h>
#include "gnome-db-monikers.h"
static BonoboObject *
Index: monikers/gnome-db-monikers.h
===================================================================
RCS file: /cvs/gnome/gnome-db/monikers/gnome-db-monikers.h,v
retrieving revision 1.2
diff -u -r1.2 gnome-db-monikers.h
--- monikers/gnome-db-monikers.h 13 Jan 2002 22:43:47 -0000 1.2
+++ monikers/gnome-db-monikers.h 30 Mar 2002 02:32:27 -0000
@@ -24,6 +24,7 @@
#include <bonobo/bonobo-moniker-simple.h>
#include <bonobo/bonobo-moniker-extender.h>
+#include <bonobo/bonobo-moniker-util.h>
G_BEGIN_DECLS
Index: monikers/moniker-database.c
===================================================================
RCS file: /cvs/gnome/gnome-db/monikers/moniker-database.c,v
retrieving revision 1.4
diff -u -r1.4 moniker-database.c
--- monikers/moniker-database.c 28 Mar 2002 22:21:57 -0000 1.4
+++ monikers/moniker-database.c 30 Mar 2002 02:32:28 -0000
@@ -25,6 +25,8 @@
#include <libgda/gda-error.h>
#include <libgnomevfs/gnome-vfs-uri.h>
+#include <bonobo/bonobo-exception.h>
+#include <bonobo/bonobo-i18n.h>
#include "gnome-db-defs.h"
#include "gnome-db-monikers.h"
@@ -47,7 +49,7 @@
const CORBA_char *requested_interface,
CORBA_Environment *ev)
{
- gchar *moniker_name;
+ const gchar *moniker_name;
GnomeVFSURI *uri;
Bonobo_Unknown unknown = CORBA_OBJECT_NIL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]