Author: post
Date: 2010-02-13 22:16:24 +0100 (Sat, 13 Feb 2010)
New Revision: 3219
Modified:
trunk/librawstudio/rs-profile-factory-model.h
trunk/librawstudio/rs-profile-factory.c
trunk/librawstudio/rs-profile-factory.h
trunk/librawstudio/rs-profile-selector.c
trunk/src/rs-toolbox.c
Log:
Added information on where to select profiles. At some point in time this help
text should propably be removed when a profile is selected, though it shouldn't
do any harm at present. Also removed an unused parameter and fixed a spelling
error.
Modified: trunk/librawstudio/rs-profile-factory-model.h
===================================================================
--- trunk/librawstudio/rs-profile-factory-model.h 2010-02-13 17:24:20 UTC
(rev 3218)
+++ trunk/librawstudio/rs-profile-factory-model.h 2010-02-13 21:16:24 UTC
(rev 3219)
@@ -8,6 +8,7 @@
/* We use these for sorting */
enum {
+ FACTORY_MODEL_TYPE_INFO,
FACTORY_MODEL_TYPE_DCP,
FACTORY_MODEL_TYPE_ICC,
FACTORY_MODEL_TYPE_SEP,
Modified: trunk/librawstudio/rs-profile-factory.c
===================================================================
--- trunk/librawstudio/rs-profile-factory.c 2010-02-13 17:24:20 UTC (rev
3218)
+++ trunk/librawstudio/rs-profile-factory.c 2010-02-13 21:16:24 UTC (rev
3219)
@@ -115,13 +115,16 @@
rs_profile_factory_new(const gchar *search_path)
{
RSProfileFactory *factory = g_object_new(RS_TYPE_PROFILE_FACTORY, NULL);
-
+
load_profiles(factory, search_path, TRUE, FALSE);
GtkTreeIter iter;
-
gtk_list_store_prepend(factory->profiles, &iter);
gtk_list_store_set(factory->profiles, &iter,
+ FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_TYPE_INFO,
+ -1);
+ gtk_list_store_prepend(factory->profiles, &iter);
+ gtk_list_store_set(factory->profiles, &iter,
FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_TYPE_SEP,
-1);
gtk_list_store_prepend(factory->profiles, &iter);
@@ -209,13 +212,13 @@
}
GtkTreeModelFilter *
-rs_dcp_factory_get_compatible_as_model(RSProfileFactory *factory, const gchar
*make, const gchar *model)
+rs_dcp_factory_get_compatible_as_model(RSProfileFactory *factory, const gchar
*unique_id)
{
g_assert(RS_IS_PROFILE_FACTORY(factory));
GtkTreeModelFilter *filter =
GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(GTK_TREE_MODEL(factory->profiles),
NULL));
- gtk_tree_model_filter_set_visible_func(filter, visible_func,
g_strdup(model), g_free);
+ gtk_tree_model_filter_set_visible_func(filter, visible_func,
g_strdup(unique_id), g_free);
return filter;
}
@@ -244,7 +247,7 @@
/* FIXME: Deal with ICC */
g_assert(RS_IS_DCP_FILE(dcp));
if (ret)
- g_warning("WARNING: Duplicate profiles
detected in file: %s, for %s, named:%s.\nUnsing last found profile.",
rs_tiff_get_filename_nopath(RS_TIFF(dcp)), rs_dcp_file_get_model(dcp),
rs_dcp_file_get_name(dcp));
+ g_warning("WARNING: Duplicate profiles
detected in file: %s, for %s, named:%s.\nUsing last found profile.",
rs_tiff_get_filename_nopath(RS_TIFF(dcp)), rs_dcp_file_get_model(dcp),
rs_dcp_file_get_name(dcp));
ret = dcp;
}
Modified: trunk/librawstudio/rs-profile-factory.h
===================================================================
--- trunk/librawstudio/rs-profile-factory.h 2010-02-13 17:24:20 UTC (rev
3218)
+++ trunk/librawstudio/rs-profile-factory.h 2010-02-13 21:16:24 UTC (rev
3219)
@@ -35,7 +35,7 @@
gboolean rs_profile_factory_add_profile(RSProfileFactory *factory, const gchar
*path);
-GtkTreeModelFilter *rs_dcp_factory_get_compatible_as_model(RSProfileFactory
*factory, const gchar *make, const gchar *model);
+GtkTreeModelFilter *rs_dcp_factory_get_compatible_as_model(RSProfileFactory
*factory, const gchar *unique_id);
RSDcpFile *rs_profile_factory_find_from_id(RSProfileFactory *factory, const
gchar *path);
Modified: trunk/librawstudio/rs-profile-selector.c
===================================================================
--- trunk/librawstudio/rs-profile-selector.c 2010-02-13 17:24:20 UTC (rev
3218)
+++ trunk/librawstudio/rs-profile-selector.c 2010-02-13 21:16:24 UTC (rev
3219)
@@ -209,6 +209,9 @@
case FACTORY_MODEL_TYPE_ADD:
g_value_set_string(value, _("Add profile ..."));
break;
+ case FACTORY_MODEL_TYPE_INFO:
+ g_value_set_string(value, _("(Select
Profile)"));
+ break;
}
}
}
@@ -265,7 +268,7 @@
GType types[NUM_COLUMNS] = {G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_INT};
gtk_tree_model_filter_set_modify_func(filter, NUM_COLUMNS, types,
modify_func, NULL, NULL);
- /* ort the damn thing, we do it this late to avoid sorting the complete
list */
+ /* Sort the damn thing, we do it this late to avoid sorting the
complete list */
GtkTreeSortable *sortable =
GTK_TREE_SORTABLE(gtk_tree_model_sort_new_with_model(GTK_TREE_MODEL(filter)));
gtk_tree_sortable_set_default_sort_func(sortable, sort_func, NULL,
NULL);
gtk_tree_sortable_set_sort_column_id(sortable,
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING);
Modified: trunk/src/rs-toolbox.c
===================================================================
--- trunk/src/rs-toolbox.c 2010-02-13 17:24:20 UTC (rev 3218)
+++ trunk/src/rs-toolbox.c 2010-02-13 21:16:24 UTC (rev 3219)
@@ -989,9 +989,9 @@
}
if (toolbox->last_camera.unique_id)
- filter =
rs_dcp_factory_get_compatible_as_model(factory, photo->metadata->make_ascii,
toolbox->last_camera.unique_id);
+ filter =
rs_dcp_factory_get_compatible_as_model(factory, toolbox->last_camera.unique_id);
else
- filter =
rs_dcp_factory_get_compatible_as_model(factory, photo->metadata->make_ascii,
photo->metadata->model_ascii);
+ filter =
rs_dcp_factory_get_compatible_as_model(factory, photo->metadata->model_ascii);
rs_profile_selector_set_model_filter(toolbox->selector, filter);
}
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit