[gnome-color-manager] Reorganize the first pane to stack the devices above the profiles



commit 9e07ea14c3ab91bb03660c51f77a31004d503965
Author: Richard Hughes <richard hughsie com>
Date:   Sat Oct 9 20:43:31 2010 +0100

    Reorganize the first pane to stack the devices above the profiles

 data/gcm-prefs.ui    |  480 +++++++++++++++++++++++++-------------------------
 src/cc-color-panel.c |   27 +---
 2 files changed, 247 insertions(+), 260 deletions(-)
---
diff --git a/data/gcm-prefs.ui b/data/gcm-prefs.ui
index ad4ece0..be6a7f3 100644
--- a/data/gcm-prefs.ui
+++ b/data/gcm-prefs.ui
@@ -2,6 +2,16 @@
 <interface>
   <requires lib="gtk+" version="2.20"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkSizeGroup" id="sizegroup_buttons">
+    <widgets>
+      <widget name="button_device_add"/>
+      <widget name="button_delete"/>
+      <widget name="button_calibrate"/>
+      <widget name="button_assign_add"/>
+      <widget name="button_assign_remove"/>
+      <widget name="button_assign_make_default"/>
+    </widgets>
+  </object>
   <object class="GtkSizeGroup" id="sizegroup_combos">
     <widgets>
       <widget name="combobox_rendering_softproof"/>
@@ -475,40 +485,63 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkVBox" id="vbox_devices">
                 <property name="visible">True</property>
                 <property name="border_width">15</property>
-                <property name="spacing">9</property>
+                <property name="spacing">12</property>
                 <child>
-                  <object class="GtkHBox" id="hbox20">
+                  <object class="GtkHBox" id="hbox1">
                     <property name="visible">True</property>
+                    <property name="spacing">9</property>
                     <child>
-                      <object class="GtkVBox" id="vbox_devices">
+                      <object class="GtkLabel" id="label2">
                         <property name="visible">True</property>
-                        <property name="spacing">6</property>
+                        <property name="label" translatable="yes">For a color managed workflow, each connected device should have one or more color profiles associated with it.</property>
+                        <property name="wrap">True</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="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox7">
+                    <property name="visible">True</property>
+                    <property name="spacing">9</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolledwindow1">
+                          <object class="GtkTreeView" id="treeview_devices">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
-                            <property name="shadow_type">in</property>
-                            <child>
-                              <object class="GtkTreeView" id="treeview_devices">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="headers_visible">False</property>
-                              </object>
-                            </child>
+                            <property name="headers_visible">False</property>
                           </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
                         </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" id="vbox6">
+                        <property name="visible">True</property>
                         <child>
-                          <object class="GtkHBox" id="hbox4">
+                          <object class="GtkVButtonBox" id="vbuttonbox1">
                             <property name="visible">True</property>
                             <property name="spacing">6</property>
                             <child>
@@ -517,12 +550,11 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
-                                <property name="tooltip_text" translatable="yes">Adds a virtual device that is not connected.</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -532,67 +564,79 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
-                                <property name="tooltip_text" translatable="yes">Delete the disconnected device - if you reconnect the device it will reappear in the list</property>
                                 <property name="use_underline">True</property>
                               </object>
                               <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
+                            <child>
+                              <object class="GtkButton" id="button_calibrate">
+                                <property name="label" translatable="yes" comments="This is a button to calibrate the device by creating an ICC profile file using a hardware device or a reference image">Create _Profile</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">1</property>
+                            <property name="position">0</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
+                    <property name="expand">True</property>
                     <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox_sections">
+                  <object class="GtkHBox" id="hbox10">
                     <property name="visible">True</property>
-                    <property name="spacing">15</property>
+                    <property name="spacing">9</property>
                     <child>
-                      <object class="GtkHBox" id="hbox_assign">
+                      <object class="GtkScrolledWindow" id="scrolledwindow_assign">
                         <property name="visible">True</property>
-                        <property name="spacing">6</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolledwindow_assign">
+                          <object class="GtkTreeView" id="treeview_assign">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
-                            <property name="shadow_type">in</property>
-                            <child>
-                              <object class="GtkTreeView" id="treeview_assign">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="headers_visible">False</property>
-                              </object>
-                            </child>
+                            <property name="headers_visible">False</property>
                           </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
                         </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" id="vbox10">
+                        <property name="visible">True</property>
                         <child>
-                          <object class="GtkVBox" id="vbox55">
+                          <object class="GtkVButtonBox" id="vbuttonbox3">
                             <property name="visible">True</property>
                             <property name="spacing">6</property>
                             <child>
@@ -604,7 +648,7 @@
                                 <property name="use_stock">True</property>
                               </object>
                               <packing>
-                                <property name="expand">False</property>
+                                <property name="expand">True</property>
                                 <property name="fill">True</property>
                                 <property name="position">0</property>
                               </packing>
@@ -613,268 +657,230 @@
                               <object class="GtkButton" id="button_assign_remove">
                                 <property name="label">gtk-remove</property>
                                 <property name="visible">True</property>
-                                <property name="sensitive">False</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="use_stock">True</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
-                                <property name="fill">True</property>
+                                <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkButton" id="button_calibrate">
-                                <property name="label" translatable="yes" comments="This is a button to calibrate the device by creating an ICC profile file using a hardware device or a reference image">Create _Profile</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="use_underline">True</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkHSeparator" id="hseparator1">
-                                <property name="visible">True</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">3</property>
-                              </packing>
-                            </child>
-                            <child>
                               <object class="GtkButton" id="button_assign_make_default">
-                                <property name="label" translatable="yes" comments="Makes the profile the default for the device">_Make Default</property>
+                                <property name="label" translatable="yes">Make default</property>
                                 <property name="visible">True</property>
-                                <property name="sensitive">False</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
-                                <property name="use_underline">True</property>
+                                <property name="use_action_appearance">False</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">4</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
                               </packing>
                             </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox_problems">
                     <child>
-                      <object class="GtkHBox" id="hbox3">
-                        <property name="visible">True</property>
-                        <child>
-                          <object class="GtkLabel" id="label_problems">
-                            <property name="label">Problems</property>
-                            <property name="selectable">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
+                      <object class="GtkLabel" id="label_problems">
+                        <property name="label">Problems</property>
+                        <property name="selectable">True</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
-                        <property name="position">1</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkExpander" id="expander_fine_tuning">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="expanded">True</property>
                     <child>
-                      <object class="GtkExpander" id="expander_fine_tuning">
+                      <object class="GtkAlignment" id="alignment4">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="expanded">True</property>
+                        <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkAlignment" id="alignment4">
+                          <object class="GtkHBox" id="hbox4">
                             <property name="visible">True</property>
-                            <property name="left_padding">12</property>
                             <child>
-                              <object class="GtkVBox" id="vbox10">
+                              <object class="GtkTable" id="table1">
                                 <property name="visible">True</property>
-                                <property name="spacing">3</property>
+                                <property name="n_rows">3</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">3</property>
+                                <property name="row_spacing">6</property>
                                 <child>
-                                  <object class="GtkTable" id="table1">
+                                  <object class="GtkHScale" id="hscale_gamma">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="restrict_to_fill_level">False</property>
+                                    <property name="fill_level">1</property>
+                                    <property name="value_pos">right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHBox" id="hbox8">
                                     <property name="visible">True</property>
-                                    <property name="n_rows">3</property>
-                                    <property name="n_columns">2</property>
-                                    <property name="column_spacing">3</property>
-                                    <property name="row_spacing">6</property>
-                                    <child>
-                                      <object class="GtkHScale" id="hscale_gamma">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="restrict_to_fill_level">False</property>
-                                        <property name="fill_level">1</property>
-                                        <property name="value_pos">right</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkHBox" id="hbox8">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <object class="GtkLabel" id="label_gamma">
-                                            <property name="visible">True</property>
-                                            <property name="label" translatable="yes">Gamma:</property>
-                                          </object>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkHScale" id="hscale_brightness">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="restrict_to_fill_level">False</property>
-                                        <property name="fill_level">1</property>
-                                        <property name="value_pos">right</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkHScale" id="hscale_contrast">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="restrict_to_fill_level">False</property>
-                                        <property name="fill_level">1</property>
-                                        <property name="value_pos">right</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                      </packing>
-                                    </child>
                                     <child>
-                                      <object class="GtkHBox" id="hbox9">
+                                      <object class="GtkLabel" id="label_gamma">
                                         <property name="visible">True</property>
-                                        <child>
-                                          <object class="GtkLabel" id="label_brightness">
-                                            <property name="visible">True</property>
-                                            <property name="label" translatable="yes">Brightness:</property>
-                                          </object>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
+                                        <property name="label" translatable="yes">Gamma:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
                                       </packing>
                                     </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkHScale" id="hscale_brightness">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="restrict_to_fill_level">False</property>
+                                    <property name="fill_level">1</property>
+                                    <property name="value_pos">right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHScale" id="hscale_contrast">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="restrict_to_fill_level">False</property>
+                                    <property name="fill_level">1</property>
+                                    <property name="value_pos">right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHBox" id="hbox9">
+                                    <property name="visible">True</property>
                                     <child>
-                                      <object class="GtkHBox" id="hbox28">
+                                      <object class="GtkLabel" id="label_brightness">
                                         <property name="visible">True</property>
-                                        <child>
-                                          <object class="GtkLabel" id="label_contrast">
-                                            <property name="visible">True</property>
-                                            <property name="label" translatable="yes">Contrast:</property>
-                                          </object>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">True</property>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
+                                        <property name="label" translatable="yes">Brightness:</property>
                                       </object>
                                       <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
                                       </packing>
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="padding">6</property>
-                                    <property name="position">0</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkHBox" id="hbox7">
+                                  <object class="GtkHBox" id="hbox28">
                                     <property name="visible">True</property>
                                     <child>
-                                      <object class="GtkButton" id="button_reset">
-                                        <property name="label" translatable="yes" comments="This resets the device to it's defaults, and removes any user tweaked settings.">Rese_t</property>
+                                      <object class="GtkLabel" id="label_contrast">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="tooltip_text" translatable="yes">Reset the sliders to the default values</property>
-                                        <property name="use_underline">True</property>
+                                        <property name="label" translatable="yes">Contrast:</property>
                                       </object>
                                       <packing>
                                         <property name="expand">False</property>
-                                        <property name="fill">False</property>
+                                        <property name="fill">True</property>
                                         <property name="position">0</property>
                                       </packing>
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="expand">True</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
                                   </packing>
                                 </child>
                               </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="padding">6</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="button_reset">
+                                <property name="label" translatable="yes" comments="This resets the device to it's defaults, and removes any user tweaked settings.">Rese_t</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
                             </child>
-                          </object>
-                        </child>
-                        <child type="label">
-                          <object class="GtkLabel" id="label4">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes" comments="Settings that users don't normally have to touch">Fine tuning</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
                           </object>
                         </child>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="Settings that users don't normally have to touch">Fine tuning</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">True</property>
+                    <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
               </object>
@@ -889,7 +895,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkVBox" id="vbox4">
                 <property name="visible">True</property>
                 <property name="border_width">15</property>
                 <property name="spacing">12</property>
@@ -921,7 +927,7 @@
                     <property name="visible">True</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkVBox" id="vbox4">
+                      <object class="GtkVBox" id="vbox7">
                         <property name="visible">True</property>
                         <property name="spacing">3</property>
                         <child>
diff --git a/src/cc-color-panel.c b/src/cc-color-panel.c
index b76a59c..0989450 100644
--- a/src/cc-color-panel.c
+++ b/src/cc-color-panel.c
@@ -105,9 +105,6 @@ typedef enum {
 static void cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColorPanel *panel);
 static void cc_color_panel_profile_store_changed_cb (GcmProfileStore *profile_store, CcColorPanel *panel);
 
-#define GCM_PREFS_TREEVIEW_MAIN_WIDTH		250 /* px */
-#define GCM_PREFS_TREEVIEW_PROFILES_WIDTH	350 /* px */
-
 /**
  * cc_color_panel_error_dialog:
  **/
@@ -1386,14 +1383,10 @@ cc_color_panel_add_devices_columns (CcColorPanel *panel, GtkTreeView *treeview)
 							   "icon-name", GCM_DEVICES_COLUMN_ICON, NULL);
 	gtk_tree_view_append_column (treeview, column);
 
-	/* set minimum width */
-	gtk_widget_set_size_request (GTK_WIDGET (treeview), GCM_PREFS_TREEVIEW_MAIN_WIDTH, -1);
-
 	/* column for text */
 	renderer = gtk_cell_renderer_text_new ();
 	g_object_set (renderer,
 		      "wrap-mode", PANGO_WRAP_WORD,
-		      "wrap-width", GCM_PREFS_TREEVIEW_MAIN_WIDTH - 62,
 		      NULL);
 	column = gtk_tree_view_column_new_with_attributes ("", renderer,
 							   "markup", GCM_DEVICES_COLUMN_TITLE, NULL);
@@ -1412,14 +1405,10 @@ cc_color_panel_add_assign_columns (CcColorPanel *panel, GtkTreeView *treeview)
 	GtkCellRenderer *renderer;
 	GtkTreeViewColumn *column;
 
-	/* set minimum width */
-	gtk_widget_set_size_request (GTK_WIDGET (treeview), GCM_PREFS_TREEVIEW_PROFILES_WIDTH, -1);
-
 	/* column for text */
 	renderer = gcm_cell_renderer_profile_new ();
 	g_object_set (renderer,
 		      "wrap-mode", PANGO_WRAP_WORD,
-		      "wrap-width", GCM_PREFS_TREEVIEW_PROFILES_WIDTH - 62,
 		      NULL);
 	column = gtk_tree_view_column_new_with_attributes ("", renderer,
 							   "profile", GCM_ASSIGN_COLUMN_PROFILE,
@@ -1585,18 +1574,20 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 	}
 
 	/* show broken devices */
-	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "label_problems"));
+	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hbox_problems"));
 	gtk_widget_hide (widget);
 	if (kind == GCM_DEVICE_KIND_DISPLAY) {
 		ret = gcm_device_get_connected (panel->priv->current_device);
 		if (ret) {
 			ret = gcm_device_xrandr_get_xrandr13 (GCM_DEVICE_XRANDR (panel->priv->current_device));
 			if (!ret) {
+                                widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "label_problems"));
 				/* TRANSLATORS: Some shitty binary drivers do not support per-head gamma controls.
 				* Whilst this does not matter if you only have one monitor attached, it means you
 				* can't color correct additional monitors or projectors. */
 				gtk_label_set_label (GTK_LABEL (widget),
 						     _("Per-device settings not supported. Check your display driver."));
+                                widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hbox_problems"));
 				gtk_widget_show (widget);
 			}
 		}
@@ -2742,16 +2733,6 @@ cc_color_panel_init (CcColorPanel *panel)
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "expander_fine_tuning"));
 	gtk_widget_set_sensitive (widget, FALSE);
 
-	/* hide widgets by default */
-	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "vbox_device_details"));
-	gtk_widget_hide (widget);
-	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hbox_manufacturer"));
-	gtk_widget_hide (widget);
-	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hbox_model"));
-	gtk_widget_hide (widget);
-	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "hbox_serial"));
-	gtk_widget_hide (widget);
-
 	/* set up virtual dialog */
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "dialog_virtual"));
 	g_signal_connect (widget, "delete-event",
@@ -2872,7 +2853,7 @@ cc_color_panel_init (CcColorPanel *panel)
 	gtk_box_pack_start (GTK_BOX(widget), panel->priv->info_bar_loading, FALSE, FALSE, 0);
 
 	/* add infobar to devices pane */
-	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "vbox_sections"));
+	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "vbox_devices"));
 	gtk_box_pack_start (GTK_BOX(widget), panel->priv->info_bar_vcgt, FALSE, FALSE, 0);
 
 	/* add infobar to defaults pane */



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