comparison src/layout.c @ 1431:7e180091e0b7

More gboolean and tidy up.
author zas_
date Sat, 14 Mar 2009 11:26:43 +0000
parents 9fe2fede7ae5
children b4ad1d201279
comparison
equal deleted inserted replaced
1430:7718e351bc45 1431:7e180091e0b7
346 } 346 }
347 347
348 static void layout_color_menu_use_image_cb(GtkWidget *widget, gpointer data) 348 static void layout_color_menu_use_image_cb(GtkWidget *widget, gpointer data)
349 { 349 {
350 LayoutWindow *lw = data; 350 LayoutWindow *lw = data;
351 gint input, screen, use_image; 351 gint input, screen;
352 gboolean use_image;
352 353
353 if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return; 354 if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return;
354 layout_image_color_profile_set(lw, input, screen, !use_image); 355 layout_image_color_profile_set(lw, input, screen, !use_image);
355 layout_image_refresh(lw); 356 layout_image_refresh(lw);
356 } 357 }
359 360
360 static void layout_color_menu_input_cb(GtkWidget *widget, gpointer data) 361 static void layout_color_menu_input_cb(GtkWidget *widget, gpointer data)
361 { 362 {
362 LayoutWindow *lw = data; 363 LayoutWindow *lw = data;
363 gint type; 364 gint type;
364 gint input, screen, use_image; 365 gint input, screen;
366 gboolean use_image;
365 367
366 if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return; 368 if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return;
367 369
368 type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), COLOR_MENU_KEY)); 370 type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), COLOR_MENU_KEY));
369 if (type < 0 || type >= COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS) return; 371 if (type < 0 || type >= COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS) return;
377 379
378 static void layout_color_menu_screen_cb(GtkWidget *widget, gpointer data) 380 static void layout_color_menu_screen_cb(GtkWidget *widget, gpointer data)
379 { 381 {
380 LayoutWindow *lw = data; 382 LayoutWindow *lw = data;
381 gint type; 383 gint type;
382 gint input, screen, use_image; 384 gint input, screen;
385 gboolean use_image;
383 386
384 if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return; 387 if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return;
385 388
386 type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), COLOR_MENU_KEY)); 389 type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), COLOR_MENU_KEY));
387 if (type < 0 || type > 1) return; 390 if (type < 0 || type > 1) return;
416 GtkWidget *item; 419 GtkWidget *item;
417 gchar *buf; 420 gchar *buf;
418 gboolean active; 421 gboolean active;
419 gint input = 0; 422 gint input = 0;
420 gint screen = 0; 423 gint screen = 0;
421 gint use_image = 0; 424 gboolean use_image = FALSE;
422 gboolean from_image = FALSE; 425 gboolean from_image;
423 gint image_profile; 426 gint image_profile;
424 gint i; 427 gint i;
425 428
426 if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return; 429 if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return;
427 430