mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
Silence more compiler warnings
This commit is contained in:
parent
bfd66fe3a3
commit
d05d924516
@ -35,7 +35,6 @@ create_color_pixbuf (const char *color)
|
||||
|
||||
int x;
|
||||
int num;
|
||||
int rowstride;
|
||||
guchar *pixels, *p;
|
||||
|
||||
if (!gdk_color_parse (color, &col))
|
||||
@ -45,7 +44,6 @@ create_color_pixbuf (const char *color)
|
||||
FALSE, 8,
|
||||
16, 16);
|
||||
|
||||
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
p = pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
|
||||
num = gdk_pixbuf_get_width (pixbuf) *
|
||||
|
@ -26,11 +26,6 @@ static void
|
||||
on_toggle_hexpand (GtkToggleButton *toggle,
|
||||
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,
|
||||
"hexpand", gtk_toggle_button_get_active (toggle),
|
||||
NULL);
|
||||
@ -40,11 +35,6 @@ static void
|
||||
on_toggle_vexpand (GtkToggleButton *toggle,
|
||||
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,
|
||||
"vexpand", gtk_toggle_button_get_active (toggle),
|
||||
NULL);
|
||||
|
@ -481,7 +481,6 @@ main (int argc, char **argv)
|
||||
GtkWidget *vbbox;
|
||||
GtkWidget *button;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *prop_editor;
|
||||
GtkWidget *extra;
|
||||
GtkFileFilter *filter;
|
||||
GtkWidget *preview_vbox;
|
||||
@ -640,7 +639,7 @@ main (int argc, char **argv)
|
||||
|
||||
/* 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);
|
||||
|
||||
|
@ -8841,7 +8841,6 @@ snapshot_widget (GtkButton *button,
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (button);
|
||||
GdkDevice *device;
|
||||
gint failure;
|
||||
|
||||
device = gtk_get_current_event_device ();
|
||||
if (device == NULL)
|
||||
@ -8856,13 +8855,13 @@ snapshot_widget (GtkButton *button,
|
||||
data->cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
|
||||
GDK_TARGET);
|
||||
|
||||
failure = gdk_device_grab (device,
|
||||
gtk_widget_get_window (widget),
|
||||
GDK_OWNERSHIP_APPLICATION,
|
||||
TRUE,
|
||||
GDK_BUTTON_RELEASE_MASK,
|
||||
data->cursor,
|
||||
GDK_CURRENT_TIME);
|
||||
gdk_device_grab (device,
|
||||
gtk_widget_get_window (widget),
|
||||
GDK_OWNERSHIP_APPLICATION,
|
||||
TRUE,
|
||||
GDK_BUTTON_RELEASE_MASK,
|
||||
data->cursor,
|
||||
GDK_CURRENT_TIME);
|
||||
|
||||
g_signal_connect (button, "event",
|
||||
G_CALLBACK (snapshot_widget_event), data);
|
||||
|
@ -71,7 +71,7 @@ draw_page (GtkPrintOperation *operation,
|
||||
/* Font Fill */
|
||||
cairo_set_source_rgb (cr, 0, 0.0, 1.0);
|
||||
cairo_fill (cr);
|
||||
|
||||
|
||||
g_object_unref (layout);
|
||||
}
|
||||
|
||||
@ -79,24 +79,20 @@ draw_page (GtkPrintOperation *operation,
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GMainLoop *loop;
|
||||
GtkPrintOperation *print;
|
||||
GtkPrintOperationResult res;
|
||||
GtkPrintSettings *settings;
|
||||
|
||||
g_type_init ();
|
||||
|
||||
loop = g_main_loop_new (NULL, TRUE);
|
||||
g_type_init ();
|
||||
|
||||
settings = gtk_print_settings_new ();
|
||||
/* gtk_print_settings_set_printer (settings, "printer"); */
|
||||
|
||||
|
||||
print = gtk_print_operation_new ();
|
||||
gtk_print_operation_set_print_settings (print, settings);
|
||||
gtk_print_operation_set_n_pages (print, 1);
|
||||
gtk_print_operation_set_unit (print, GTK_UNIT_MM);
|
||||
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;
|
||||
}
|
||||
|
@ -111,7 +111,6 @@ main (int argc,
|
||||
GtkWidget *vbbox;
|
||||
GtkWidget *button;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *prop_editor;
|
||||
GtkRecentFilter *filter;
|
||||
gint i;
|
||||
gboolean multiple = FALSE;
|
||||
@ -172,7 +171,7 @@ main (int argc,
|
||||
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user