summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlynn Foster <glynn.foster@sun.com>2003-06-04 12:53:46 +0000
committerGlynn Foster <gman@src.gnome.org>2003-06-04 12:53:46 +0000
commit65cb873430d7bfcdf0452c76bf07f2ebbb4a21af (patch)
treeb5b12ffc2dda25da0678d04bff7ecafb8326e640 /src
parentUpdated Catalan translation. (diff)
downloadzenity-65cb873430d7bfcdf0452c76bf07f2ebbb4a21af.tar.gz
zenity-65cb873430d7bfcdf0452c76bf07f2ebbb4a21af.tar.bz2
zenity-65cb873430d7bfcdf0452c76bf07f2ebbb4a21af.zip
Fix up some build warnings as reported by Ross Burton and his amazing gcc
2003-06-04 Glynn Foster <glynn.foster@sun.com> * src/about.c, src/main.c, src/msg.c, src/progress.c, src/tree.c, src/util.c: Fix up some build warnings as reported by Ross Burton and his amazing gcc 3.3 techno machine.
Diffstat (limited to 'src')
-rw-r--r--src/about.c15
-rw-r--r--src/main.c15
-rw-r--r--src/msg.c5
-rw-r--r--src/progress.c5
-rw-r--r--src/tree.c9
-rw-r--r--src/util.c1
6 files changed, 24 insertions, 26 deletions
diff --git a/src/about.c b/src/about.c
index 182a8165..ddc3325f 100644
--- a/src/about.c
+++ b/src/about.c
@@ -27,8 +27,9 @@
#include "config.h"
#include "zenity.h"
#include "util.h"
+#include <string.h>
#include <gdk/gdkkeysyms.h>
-#include <libgnomecanvas/gnome-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
#include <glade/glade.h>
#define GTK_RESPONSE_CREDITS 0
@@ -142,7 +143,7 @@ zenity_create_clothes (GtkWidget *canvas_board)
pixbuf = gdk_pixbuf_new_from_file (pixbuf_path, NULL);
canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas_board)->root),
- gnome_canvas_pixbuf_get_type (),
+ GNOME_TYPE_CANVAS_PIXBUF,
"x", monk_clothes[i].x,
"y", monk_clothes[i].y,
"pixbuf", pixbuf,
@@ -158,7 +159,6 @@ zenity_create_monk (void)
{
GtkWidget *canvas_board;
GnomeCanvasItem *canvas_item;
- GnomeCanvasGroup *root;
GdkPixbuf *pixbuf;
GdkColor color = { 0, 0xffff, 0xffff, 0xffff };
@@ -177,7 +177,7 @@ zenity_create_monk (void)
pixbuf = gdk_pixbuf_new_from_file (ZENITY_CLOTHES_PATH "monk.png", NULL);
canvas_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas_board)->root),
- gnome_canvas_pixbuf_get_type (),
+ GNOME_TYPE_CANVAS_PIXBUF,
"x", (ZENITY_CANVAS_X / 2.0)/2.0 + 10.0,
"y", (ZENITY_CANVAS_Y / 2.0)/2.0 - 50.0,
"pixbuf", pixbuf,
@@ -369,13 +369,6 @@ zenity_about_update_translator_label (GtkWidget *label)
}
static void
-zenity_about_dialog_credits_response (GtkWidget *widget, int response, gpointer data)
-{
- gtk_widget_destroy (widget);
- widget = NULL;
-}
-
-static void
zenity_about_display_credits_dialog (void)
{
GtkWidget *credits_dialog;
diff --git a/src/main.c b/src/main.c
index 2792d539..23c4721b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,6 +23,7 @@
#include "config.h"
#include "zenity.h"
+#include <stdlib.h>
#include <popt.h>
#include <langinfo.h>
@@ -986,10 +987,7 @@ zenity_free_parsing_options (void) {
gint
main (gint argc, gchar **argv) {
- ZenityData *general;
- ZenityCalendarData *cal_data;
poptContext ctx;
- gchar **args;
gint nextopt, retval;
bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -1020,11 +1018,12 @@ main (gint argc, gchar **argv) {
gtk_init (&argc, &argv);
/*
- if (argc < 2) {
- g_printerr (_("You must specify more arguments. See zenity --help for more details\n"));
- zenity_free_parsing_options ();
- exit (-1);
- } */
+ * if (argc < 2) {
+ * g_printerr (_("You must specify more arguments. See zenity --help for more details\n"));
+ * zenity_free_parsing_options ();
+ * exit (-1);
+ * }
+ */
switch (results->mode) {
case MODE_CALENDAR:
diff --git a/src/msg.c b/src/msg.c
index 85b533e3..22f50187 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -60,6 +60,9 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
break;
default:
+ glade_dialog = NULL;
+ dialog = NULL;
+ text = NULL;
g_assert_not_reached ();
break;
}
@@ -83,8 +86,6 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
if (data->window_icon)
zenity_util_set_window_icon (dialog, data->window_icon);
else {
- GdkPixbuf *pixbuf = NULL;
-
switch (msg_data->mode) {
case ZENITY_MSG_WARNING:
zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_WARNING);
diff --git a/src/progress.c b/src/progress.c
index dc0d74b3..0fa80882 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -22,6 +22,10 @@
*/
#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <signal.h>
#include <glade/glade.h>
#include "zenity.h"
#include "util.h"
@@ -168,7 +172,6 @@ zenity_progress (ZenityData *data, ZenityProgressData *progress_data)
GtkWidget *dialog;
GtkWidget *text;
GtkWidget *progress_bar;
- guint input;
zen_data = data;
glade_dialog = zenity_util_load_glade_file ("zenity_progress_dialog");
diff --git a/src/tree.c b/src/tree.c
index b94f6344..f3e63779 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -45,6 +45,7 @@ zenity_tree_dialog_untoggle (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter
if (g_value_get_boolean (&toggle_value))
gtk_list_store_set (GTK_LIST_STORE (model), iter, 0, FALSE, -1);
+ return FALSE;
}
static void
@@ -479,14 +480,14 @@ zenity_tree_dialog_output (void)
if (tmp->next != NULL) {
/* FIXME: There must be a nicer way to do this. This is just arse */
if (strstr ((const gchar *) separator, (const gchar *) "\\n") != NULL)
- g_printerr ("%s\n", tmp->data);
+ g_printerr ("%s\n", (gchar *) tmp->data);
else if (strstr ((const gchar *) separator, (const gchar *) "\\t") != NULL)
- g_printerr ("%s\t", tmp->data);
+ g_printerr ("%s\t", (gchar *) tmp->data);
else
- g_printerr ("%s%s", tmp->data, separator);
+ g_printerr ("%s%s", (gchar *) tmp->data, separator);
}
else
- g_printerr ("%s\n", tmp->data);
+ g_printerr ("%s\n", (gchar *) tmp->data);
}
g_free (separator);
diff --git a/src/util.c b/src/util.c
index 2b3e8dc1..7c8805a1 100644
--- a/src/util.c
+++ b/src/util.c
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <locale.h>
#include <errno.h>
+#include <string.h>
#include "config.h"
#include "util.h"
#include "zenity.h"
bgstack15