Commit e81ac44d authored by Richard Hughes's avatar Richard Hughes

Add support for 100% gray colorspaces

parent 23b22fe9
......@@ -8,6 +8,7 @@
<widget name="combobox_rendering_display"/>
<widget name="combobox_space_cmyk"/>
<widget name="combobox_space_rgb"/>
<widget name="combobox_space_gray"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup_devices">
......@@ -22,6 +23,7 @@
<widgets>
<widget name="hbox43"/>
<widget name="hbox46"/>
<widget name="hbox6"/>
<widget name="hbox15"/>
<widget name="hbox17"/>
</widgets>
......@@ -1357,6 +1359,45 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="label_space_gray">
<property name="visible">True</property>
<property name="label" translatable="yes" comments="Technical color word for softproof rendering intent">Gray:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_space_gray">
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">This is the default gray working space to use in applications</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
......
......@@ -70,6 +70,11 @@
<summary>The default CMYK profile</summary>
<description>The CMYK profile filename to be used by applications by default.</description>
</key>
<key name="colorspace-gray" type="s">
<default>'/usr/share/color/icc/Argyll/Gray.icc'</default>
<summary>The default gray profile</summary>
<description>The gray profile filename to be used by applications by default.</description>
</key>
<key name="calibration-length" enum="org.gnome.color-manager.CalibrationLength">
<default>'ask'</default>
<summary>The default calibration length</summary>
......
......@@ -2314,6 +2314,7 @@ cc_color_panel_startup_idle_cb (CcColorPanel *panel)
GError *error = NULL;
gchar *colorspace_rgb;
gchar *colorspace_cmyk;
gchar *colorspace_gray;
gint intent_display = -1;
gint intent_softproof = -1;
GcmProfileSearchFlags search_flags = GCM_PROFILE_STORE_SEARCH_ALL;
......@@ -2345,6 +2346,15 @@ cc_color_panel_startup_idle_cb (CcColorPanel *panel)
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (cc_color_panel_space_combo_changed_cb), panel);
/* setup gray combobox */
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "combobox_space_gray"));
colorspace_gray = g_settings_get_string (panel->priv->settings, GCM_SETTINGS_COLORSPACE_GRAY);
cc_color_panel_set_combo_simple_text (widget);
cc_color_panel_setup_space_combobox (panel, widget, GCM_COLORSPACE_GRAY, colorspace_gray);
g_object_set_data (G_OBJECT(widget), "GCM:GSettingsKey", (gpointer) GCM_SETTINGS_COLORSPACE_GRAY);
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (cc_color_panel_space_combo_changed_cb), panel);
/* setup rendering lists */
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "combobox_rendering_display"));
cc_color_panel_set_combo_simple_text (widget);
......
......@@ -589,6 +589,8 @@ gcm_session_handle_get_property (GDBusConnection *connection_, const gchar *send
retval = g_settings_get_value (settings, GCM_SETTINGS_COLORSPACE_RGB);
} else if (g_strcmp0 (property_name, "ColorspaceCmyk") == 0) {
retval = g_settings_get_value (settings, GCM_SETTINGS_COLORSPACE_CMYK);
} else if (g_strcmp0 (property_name, "ColorspaceGray") == 0) {
retval = g_settings_get_value (settings, GCM_SETTINGS_COLORSPACE_GRAY);
}
/* reset time */
......
......@@ -42,6 +42,7 @@
#define GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF "rendering-intent-softproof"
#define GCM_SETTINGS_COLORSPACE_RGB "colorspace-rgb"
#define GCM_SETTINGS_COLORSPACE_CMYK "colorspace-cmyk"
#define GCM_SETTINGS_COLORSPACE_GRAY "colorspace-gray"
#define GCM_SETTINGS_USE_PROFILES_FROM_VOLUMES "use-profiles-from-volumes"
#define GCM_SETTINGS_CALIBRATION_LENGTH "calibration-length"
#define GCM_SETTINGS_SHOW_FINE_TUNING "show-fine-tuning"
......
......@@ -69,6 +69,17 @@
</doc:doc>
</property>
<!--*****************************************************************************************-->
<property name='ColorspaceGray' type='s' access='read'>
<doc:doc>
<doc:description>
<doc:para>
The default colorspace filename for gray files.
</doc:para>
</doc:description>
</doc:doc>
</property>
<!--*****************************************************************************************-->
<method name='GetProfilesForDevice'>
<annotation name='org.freedesktop.DBus.GLib.Async' value=''/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment