Revision: 1428
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1428&view=rev
Author:   zas_
Date:     2009-02-27 22:28:17 +0000 (Fri, 27 Feb 2009)

Log Message:
-----------
Fix up color profiles menu: mark empty entries (but not NULL) as inactive.

Modified Paths:
--------------
    trunk/src/layout.c

Modified: trunk/src/layout.c
===================================================================
--- trunk/src/layout.c  2009-02-27 21:30:28 UTC (rev 1427)
+++ trunk/src/layout.c  2009-02-27 22:28:17 UTC (rev 1428)
@@ -469,7 +469,7 @@
                gchar *end;
 
                name = options->color_profile.input_name[i];
-               if (!name) name = 
filename_from_path(options->color_profile.input_file[i]);
+               if (!name || !name[0]) name = 
filename_from_path(options->color_profile.input_file[i]);
 
                end = layout_color_name_parse(name);
                buf = g_strdup_printf(_("Input _%d: %s"), i + 
COLOR_PROFILE_FILE, end);
@@ -480,7 +480,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 && 
options->color_profile.input_file[i] && !from_image);
+               gtk_widget_set_sensitive(item, active && !from_image && 
options->color_profile.input_file[i][0]);
                }
 
        menu_item_add_divider(menu);
@@ -496,7 +496,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);
+       gtk_widget_set_sensitive(item, active && 
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

Reply via email to