Revision: 1429
http://geeqie.svn.sourceforge.net/geeqie/?rev=1429&view=rev
Author: zas_
Date: 2009-02-27 23:25:31 +0000 (Fri, 27 Feb 2009)
Log Message:
-----------
Really fix up color profiles options tests. Add an indicator of the embedded
color profile when recognized (a * just after sRGB or AdobeRGB compatible).
Modified Paths:
--------------
trunk/src/image.c
trunk/src/layout.c
Modified: trunk/src/image.c
===================================================================
--- trunk/src/image.c 2009-02-27 22:28:17 UTC (rev 1428)
+++ trunk/src/image.c 2009-02-27 23:25:31 UTC (rev 1429)
@@ -207,7 +207,7 @@
gint n;
n = imd->color_profile_input - COLOR_PROFILE_FILE;
- if (!options->color_profile.input_file[n]) return FALSE;
+ if (!options->color_profile.input_file[n] ||
!options->color_profile.input_file[n][0]) return FALSE;
input_type = COLOR_PROFILE_FILE;
input_file = options->color_profile.input_file[n];
@@ -224,7 +224,8 @@
}
if (imd->color_profile_screen == 1 &&
- options->color_profile.screen_file)
+ options->color_profile.screen_file &&
+ options->color_profile.screen_file[0])
{
screen_type = COLOR_PROFILE_FILE;
screen_file = options->color_profile.screen_file;
Modified: trunk/src/layout.c
===================================================================
--- trunk/src/layout.c 2009-02-27 22:28:17 UTC (rev 1428)
+++ trunk/src/layout.c 2009-02-27 23:25:31 UTC (rev 1429)
@@ -402,7 +402,7 @@
static gchar *layout_color_name_parse(const gchar *name)
{
- if (!name) return g_strdup(_("Empty"));
+ if (!name || !*name) return g_strdup(_("Empty"));
return g_strdelimit(g_strdup(name), "_", '-');
}
@@ -427,11 +427,13 @@
gint screen = 0;
gint use_image = 0;
gint from_image = 0;
+ gint image_profile;
gint i;
if (!layout_image_color_profile_get(lw, &input, &screen, &use_image))
return;
- from_image = use_image &&
(layout_image_color_profile_get_from_image(lw) != COLOR_PROFILE_NONE);
+ image_profile = layout_image_color_profile_get_from_image(lw);
+ from_image = use_image && (image_profile != COLOR_PROFILE_NONE);
menu = popup_menu_short_lived();
active = layout_image_color_profile_get_use(lw);
@@ -454,7 +456,7 @@
case COLOR_PROFILE_ADOBERGB: label = _("AdobeRGB
compatible"); break;
default: label = "fixme"; break;
}
- buf = g_strdup_printf(_("Input _%d: %s"), i, label);
+ buf = g_strdup_printf(_("Input _%d: %s%s"), i, label, (i ==
image_profile) ? " *" : "");
item = menu_item_add_radio(menu, (i == COLOR_PROFILE_SRGB) ?
NULL : item,
buf, (input == i),
G_CALLBACK(layout_color_menu_input_cb), lw);
@@ -480,7 +482,7 @@
G_CALLBACK(layout_color_menu_input_cb), lw);
g_free(buf);
g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY,
GINT_TO_POINTER(i + COLOR_PROFILE_FILE));
- gtk_widget_set_sensitive(item, active && !from_image &&
options->color_profile.input_file[i][0]);
+ gtk_widget_set_sensitive(item, active && !from_image &&
options->color_profile.input_file[i] &&
options->color_profile.input_file[i][0]);
}
menu_item_add_divider(menu);
@@ -496,7 +498,7 @@
_("_Screen profile"), (screen == 1),
G_CALLBACK(layout_color_menu_screen_cb), lw);
g_object_set_data(G_OBJECT(item), COLOR_MENU_KEY, GINT_TO_POINTER(1));
- gtk_widget_set_sensitive(item, active &&
options->color_profile.screen_file[0]);
+ gtk_widget_set_sensitive(item, active &&
options->color_profile.screen_file && options->color_profile.screen_file[0]);
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0,
GDK_CURRENT_TIME);
#endif /* HAVE_LCMS */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn