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.
This commit is contained in:
parent
3c6665af87
commit
65cb873430
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
2003-06-04 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* src/main.c: Add a "no-c-format" xgettext header to unbreak po files
|
||||
|
15
src/about.c
15
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,
|
||||
@ -368,13 +368,6 @@ zenity_about_update_translator_label (GtkWidget *label)
|
||||
g_string_free (string, TRUE);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
15
src/main.c
15
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:
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user