Mercurial > geeqie
comparison src/layout.c @ 327:049d6b00cc14
Rename color profile options.
author | zas_ |
---|---|
date | Sat, 12 Apr 2008 08:05:44 +0000 |
parents | c74af1cbd61a |
children | 767b53cd9ab7 |
comparison
equal
deleted
inserted
replaced
326:509b84801d66 | 327:049d6b00cc14 |
---|---|
409 | 409 |
410 front = g_strdup_printf(_("Input _%d:"), 0); | 410 front = g_strdup_printf(_("Input _%d:"), 0); |
411 buf = g_strdup_printf("%s %s", front, "sRGB"); | 411 buf = g_strdup_printf("%s %s", front, "sRGB"); |
412 g_free(front); | 412 g_free(front); |
413 item = menu_item_add_radio(menu, NULL, | 413 item = menu_item_add_radio(menu, NULL, |
414 buf, (options->color_profile_input_type == 0), | 414 buf, (options->color_profile.input_type == 0), |
415 G_CALLBACK(layout_color_menu_input_cb), lw); | 415 G_CALLBACK(layout_color_menu_input_cb), lw); |
416 g_free(buf); | 416 g_free(buf); |
417 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(0)); | 417 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(0)); |
418 gtk_widget_set_sensitive(item, active); | 418 gtk_widget_set_sensitive(item, active); |
419 | 419 |
420 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) | 420 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) |
421 { | 421 { |
422 const gchar *name; | 422 const gchar *name; |
423 | 423 |
424 name = options->color_profile_input_name[i]; | 424 name = options->color_profile.input_name[i]; |
425 if (!name) name = filename_from_path(options->color_profile_input_file[i]); | 425 if (!name) name = filename_from_path(options->color_profile.input_file[i]); |
426 | 426 |
427 front = g_strdup_printf(_("Input _%d:"), i + 1); | 427 front = g_strdup_printf(_("Input _%d:"), i + 1); |
428 end = layout_color_name_parse(name); | 428 end = layout_color_name_parse(name); |
429 buf = g_strdup_printf("%s %s", front, end); | 429 buf = g_strdup_printf("%s %s", front, end); |
430 g_free(front); | 430 g_free(front); |
433 item = menu_item_add_radio(menu, item, | 433 item = menu_item_add_radio(menu, item, |
434 buf, (i + 1 == input), | 434 buf, (i + 1 == input), |
435 G_CALLBACK(layout_color_menu_input_cb), lw); | 435 G_CALLBACK(layout_color_menu_input_cb), lw); |
436 g_free(buf); | 436 g_free(buf); |
437 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(i + 1)); | 437 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(i + 1)); |
438 gtk_widget_set_sensitive(item, active && options->color_profile_input_file[i]); | 438 gtk_widget_set_sensitive(item, active && options->color_profile.input_file[i]); |
439 } | 439 } |
440 | 440 |
441 menu_item_add_divider(menu); | 441 menu_item_add_divider(menu); |
442 | 442 |
443 buf = g_strdup_printf("%s sRGB", _("Screen")); | 443 buf = g_strdup_printf("%s sRGB", _("Screen")); |
450 | 450 |
451 item = menu_item_add_radio(menu, item, | 451 item = menu_item_add_radio(menu, item, |
452 _("_Screen profile"), (screen == 1), | 452 _("_Screen profile"), (screen == 1), |
453 G_CALLBACK(layout_color_menu_screen_cb), lw); | 453 G_CALLBACK(layout_color_menu_screen_cb), lw); |
454 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(1)); | 454 g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(1)); |
455 gtk_widget_set_sensitive(item, active && options->color_profile_screen_file); | 455 gtk_widget_set_sensitive(item, active && options->color_profile.screen_file); |
456 | 456 |
457 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); | 457 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); |
458 #endif /* HAVE_LCMS */ | 458 #endif /* HAVE_LCMS */ |
459 } | 459 } |
460 | 460 |
1702 while (work) | 1702 while (work) |
1703 { | 1703 { |
1704 LayoutWindow *lw = work->data; | 1704 LayoutWindow *lw = work->data; |
1705 work = work->next; | 1705 work = work->next; |
1706 | 1706 |
1707 layout_style_set(lw, options->layout_style, options->layout_order); | 1707 layout_style_set(lw, options->layout.style, options->layout.order); |
1708 } | 1708 } |
1709 } | 1709 } |
1710 | 1710 |
1711 void layout_colors_update(void) | 1711 void layout_colors_update(void) |
1712 { | 1712 { |
1898 | 1898 |
1899 lw->histogram_enabled = FALSE; | 1899 lw->histogram_enabled = FALSE; |
1900 | 1900 |
1901 /* default layout */ | 1901 /* default layout */ |
1902 | 1902 |
1903 layout_config_parse(options->layout_style, options->layout_order, | 1903 layout_config_parse(options->layout.style, options->layout.order, |
1904 &lw->dir_location, &lw->file_location, &lw->image_location); | 1904 &lw->dir_location, &lw->file_location, &lw->image_location); |
1905 lw->tree_view = options->layout_view_tree; | 1905 lw->tree_view = options->layout.view_as_tree; |
1906 lw->icon_view = options->layout_view_icons; | 1906 lw->icon_view = options->layout.view_as_icons; |
1907 | 1907 |
1908 /* divider positions */ | 1908 /* divider positions */ |
1909 | 1909 |
1910 if (options->save_window_positions) | 1910 if (options->save_window_positions) |
1911 { | 1911 { |