[gnome-color-manager] Add two elements in the UI, for RGB and CMYK working spaces



commit e55d7ad258cca77163781ab87cf6b1dd4da73f0e
Author: Richard Hughes <richard hughsie com>
Date:   Tue Dec 8 18:18:27 2009 +0000

    Add two elements in the UI, for RGB and CMYK working spaces

 data/gcm-prefs.ui |  124 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 src/gcm-prefs.c   |   43 ++++++++++++++++++
 2 files changed, 164 insertions(+), 3 deletions(-)
---
diff --git a/data/gcm-prefs.ui b/data/gcm-prefs.ui
index 04c48ba..734d020 100644
--- a/data/gcm-prefs.ui
+++ b/data/gcm-prefs.ui
@@ -1296,6 +1296,124 @@
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkHBox" id="hbox41">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel" id="label5">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Working spaces:</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment8">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox12">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <property name="spacing">3</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox42">
+                            <property name="visible">True</property>
+                            <property name="spacing">9</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox43">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkLabel" id="label_space_rgb">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes" comments="What mode to use for display rendering intent">RGB:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="combobox_space_rgb">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox44">
+                            <property name="visible">True</property>
+                            <property name="spacing">9</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox46">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkLabel" id="label_space_cmyk">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes" comments="Technical color word for softproof rendering intent">CMYK:</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="combobox_space_cmyk">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkHBox" id="hbox13">
                     <property name="visible">True</property>
                     <child>
@@ -1314,7 +1432,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="position">2</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
                 <child>
@@ -1325,7 +1443,7 @@
                       <object class="GtkVBox" id="vbox9">
                         <property name="visible">True</property>
                         <property name="orientation">vertical</property>
-                        <property name="spacing">6</property>
+                        <property name="spacing">3</property>
                         <child>
                           <object class="GtkHBox" id="hbox14">
                             <property name="visible">True</property>
@@ -1410,7 +1528,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">3</property>
+                    <property name="position">5</property>
                   </packing>
                 </child>
               </object>
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index bc1f6ae..0d95ec5 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -2172,6 +2172,21 @@ gcm_prefs_renderer_combo_changed_cb (GtkWidget *widget, gpointer data)
 }
 
 /**
+ * gcm_prefs_space_combo_changed_cb:
+ **/
+static void
+gcm_prefs_space_combo_changed_cb (GtkWidget *widget, gpointer data)
+{
+	gint active;
+	/* no selection */
+	active = gtk_combo_box_get_active (GTK_COMBO_BOX(widget));
+	if (active == -1)
+		return;
+	//TODO: need to save to GConf
+	egg_debug ("changed working space %i", active);
+}
+
+/**
  * gcm_prefs_setup_rendering_combobox:
  **/
 static void
@@ -2194,6 +2209,16 @@ gcm_prefs_setup_rendering_combobox (GtkWidget *widget)
 }
 
 /**
+ * gcm_prefs_setup_space_combobox:
+ **/
+static void
+gcm_prefs_setup_space_combobox (GtkWidget *widget)
+{
+	/* TODO: get from profiles */
+	gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "sRGB");
+}
+
+/**
  * main:
  **/
 int
@@ -2370,6 +2395,24 @@ main (int argc, char **argv)
 	//TODO: need to get from GConf
 	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
 
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_space_rgb"));
+	gcm_prefs_set_combo_simple_text (widget);
+	gtk_widget_set_sensitive (widget, FALSE);
+	gcm_prefs_setup_space_combobox (widget);
+	g_signal_connect (G_OBJECT (widget), "changed",
+			  G_CALLBACK (gcm_prefs_space_combo_changed_cb), NULL);
+	//TODO: need to get from GConf
+	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
+
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_space_cmyk"));
+	gcm_prefs_set_combo_simple_text (widget);
+	gtk_widget_set_sensitive (widget, FALSE);
+	gcm_prefs_setup_space_combobox (widget);
+	g_signal_connect (G_OBJECT (widget), "changed",
+			  G_CALLBACK (gcm_prefs_space_combo_changed_cb), NULL);
+	//TODO: need to get from GConf
+	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
+
 	/* set ranges */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hscale_gamma"));
 	gtk_range_set_range (GTK_RANGE (widget), 0.1f, 5.0f);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]