Silence more compiler warnings

This commit is contained in:
Matthias Clasen 2011-02-12 07:59:25 -05:00
parent bfd66fe3a3
commit d05d924516
6 changed files with 13 additions and 32 deletions

View File

@ -35,7 +35,6 @@ create_color_pixbuf (const char *color)
int x; int x;
int num; int num;
int rowstride;
guchar *pixels, *p; guchar *pixels, *p;
if (!gdk_color_parse (color, &col)) if (!gdk_color_parse (color, &col))
@ -45,7 +44,6 @@ create_color_pixbuf (const char *color)
FALSE, 8, FALSE, 8,
16, 16); 16, 16);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
p = pixels = gdk_pixbuf_get_pixels (pixbuf); p = pixels = gdk_pixbuf_get_pixels (pixbuf);
num = gdk_pixbuf_get_width (pixbuf) * num = gdk_pixbuf_get_width (pixbuf) *

View File

@ -26,11 +26,6 @@ static void
on_toggle_hexpand (GtkToggleButton *toggle, on_toggle_hexpand (GtkToggleButton *toggle,
void *data) void *data)
{ {
GtkWidget *parent;
/* get the event box with color set on it */
parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
g_object_set (toggle, g_object_set (toggle,
"hexpand", gtk_toggle_button_get_active (toggle), "hexpand", gtk_toggle_button_get_active (toggle),
NULL); NULL);
@ -40,11 +35,6 @@ static void
on_toggle_vexpand (GtkToggleButton *toggle, on_toggle_vexpand (GtkToggleButton *toggle,
void *data) void *data)
{ {
GtkWidget *parent;
/* get the event box with color set on it */
parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
g_object_set (toggle, g_object_set (toggle,
"vexpand", gtk_toggle_button_get_active (toggle), "vexpand", gtk_toggle_button_get_active (toggle),
NULL); NULL);

View File

@ -481,7 +481,6 @@ main (int argc, char **argv)
GtkWidget *vbbox; GtkWidget *vbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *dialog; GtkWidget *dialog;
GtkWidget *prop_editor;
GtkWidget *extra; GtkWidget *extra;
GtkFileFilter *filter; GtkFileFilter *filter;
GtkWidget *preview_vbox; GtkWidget *preview_vbox;
@ -640,7 +639,7 @@ main (int argc, char **argv)
/* Extra controls for manipulating the test environment /* Extra controls for manipulating the test environment
*/ */
prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER); create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER);
control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

View File

@ -8841,7 +8841,6 @@ snapshot_widget (GtkButton *button,
{ {
GtkWidget *widget = GTK_WIDGET (button); GtkWidget *widget = GTK_WIDGET (button);
GdkDevice *device; GdkDevice *device;
gint failure;
device = gtk_get_current_event_device (); device = gtk_get_current_event_device ();
if (device == NULL) if (device == NULL)
@ -8856,13 +8855,13 @@ snapshot_widget (GtkButton *button,
data->cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), data->cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
GDK_TARGET); GDK_TARGET);
failure = gdk_device_grab (device, gdk_device_grab (device,
gtk_widget_get_window (widget), gtk_widget_get_window (widget),
GDK_OWNERSHIP_APPLICATION, GDK_OWNERSHIP_APPLICATION,
TRUE, TRUE,
GDK_BUTTON_RELEASE_MASK, GDK_BUTTON_RELEASE_MASK,
data->cursor, data->cursor,
GDK_CURRENT_TIME); GDK_CURRENT_TIME);
g_signal_connect (button, "event", g_signal_connect (button, "event",
G_CALLBACK (snapshot_widget_event), data); G_CALLBACK (snapshot_widget_event), data);

View File

@ -71,7 +71,7 @@ draw_page (GtkPrintOperation *operation,
/* Font Fill */ /* Font Fill */
cairo_set_source_rgb (cr, 0, 0.0, 1.0); cairo_set_source_rgb (cr, 0, 0.0, 1.0);
cairo_fill (cr); cairo_fill (cr);
g_object_unref (layout); g_object_unref (layout);
} }
@ -79,24 +79,20 @@ draw_page (GtkPrintOperation *operation,
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
GMainLoop *loop;
GtkPrintOperation *print; GtkPrintOperation *print;
GtkPrintOperationResult res;
GtkPrintSettings *settings; GtkPrintSettings *settings;
g_type_init (); g_type_init ();
loop = g_main_loop_new (NULL, TRUE);
settings = gtk_print_settings_new (); settings = gtk_print_settings_new ();
/* gtk_print_settings_set_printer (settings, "printer"); */ /* gtk_print_settings_set_printer (settings, "printer"); */
print = gtk_print_operation_new (); print = gtk_print_operation_new ();
gtk_print_operation_set_print_settings (print, settings); gtk_print_operation_set_print_settings (print, settings);
gtk_print_operation_set_n_pages (print, 1); gtk_print_operation_set_n_pages (print, 1);
gtk_print_operation_set_unit (print, GTK_UNIT_MM); gtk_print_operation_set_unit (print, GTK_UNIT_MM);
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL); g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL); gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
return 0; return 0;
} }

View File

@ -111,7 +111,6 @@ main (int argc,
GtkWidget *vbbox; GtkWidget *vbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *dialog; GtkWidget *dialog;
GtkWidget *prop_editor;
GtkRecentFilter *filter; GtkRecentFilter *filter;
gint i; gint i;
gboolean multiple = FALSE; gboolean multiple = FALSE;
@ -172,7 +171,7 @@ main (int argc,
gtk_widget_show_all (dialog); gtk_widget_show_all (dialog);
prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER); create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER);
control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);