[gimp/alxsa-simulation-profile-new-image] Remove simulation profile from Preferences
- From: Alx Sa <sawyeralex src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/alxsa-simulation-profile-new-image] Remove simulation profile from Preferences
- Date: Mon, 8 Aug 2022 21:38:47 +0000 (UTC)
commit 8cacb306871ca95bef71c31e7e24ee21b23b8dbd
Author: Alx Sa <cmyk student gmail com>
Date: Mon Aug 8 21:38:46 2022 +0000
Remove simulation profile from Preferences
app/dialogs/preferences-dialog.c | 8 --------
app/widgets/gimptemplateeditor.c | 25 +++++++++++++++++++++++--
2 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index 35a6f7e552..0e06218ddb 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -1423,14 +1423,6 @@ prefs_dialog_new (Gimp *gimp,
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
row = 0;
- prefs_profile_combo_box_add (color_config,
- "simulation-profile",
- store,
- _("Select Soft-Proofing Color Profile"),
- _("_Soft-proofing profile:"),
- GTK_GRID (grid), row++, size_group,
- object, "color-profile-path");
-
prefs_enum_combo_box_add (color_config,
"simulation-rendering-intent", 0, 0,
_("Re_ndering intent:"),
diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c
index 4e47a4cf0d..010f3dad49 100644
--- a/app/widgets/gimptemplateeditor.c
+++ b/app/widgets/gimptemplateeditor.c
@@ -24,6 +24,7 @@
#include "libgimpmath/gimpmath.h"
#include "libgimpbase/gimpbase.h"
+#include "libgimpcolor/gimpcolor.h"
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
@@ -810,8 +811,10 @@ gimp_template_editor_template_notify (GimpTemplate *template,
! strcmp (param_spec->name, "image-type") ||
! strcmp (param_spec->name, "precision"))
{
- GtkListStore *profile_store;
- GFile *file;
+ GimpColorProfile *profile;
+ GtkListStore *profile_store;
+ GFile *file;
+ gchar *path;
file = gimp_directory_file ("profilerc", NULL);
profile_store = gimp_color_profile_store_new (file);
@@ -833,6 +836,24 @@ gimp_template_editor_template_notify (GimpTemplate *template,
gimp_color_profile_store_add_file (GIMP_COLOR_PROFILE_STORE (profile_store),
NULL, NULL);
+ /* Add Preferred CMYK profile if it exists */
+ profile =
+ gimp_color_config_get_cmyk_color_profile (GIMP_COLOR_CONFIG
(private->gimp->config->color_management),
+ NULL);
+ if (profile)
+ {
+ g_object_get (G_OBJECT (private->gimp->config->color_management),
+ "cmyk-profile", &path, NULL);
+ file = gimp_file_new_for_config_path (path, NULL);
+ g_free (path);
+ text = g_strdup_printf (_("Preferred CMYK (%s)"),
+ gimp_color_profile_get_label (profile));
+ g_object_unref (profile);
+ gimp_color_profile_store_add_file (GIMP_COLOR_PROFILE_STORE (profile_store),
+ file, text);
+ g_object_unref (file);
+ g_free (text);
+ }
gtk_combo_box_set_model (GTK_COMBO_BOX (private->simulation_profile_combo),
GTK_TREE_MODEL (profile_store));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]