[gnome-color-manager] Add the filename basename to the profile view



commit 813c39747c4a0c01a5ee97842e32ab38ea5d71fc
Author: Richard Hughes <richard hughsie com>
Date:   Thu Dec 3 10:06:08 2009 +0000

    Add the filename basename to the profile view

 data/gcm-prefs.ui |   63 +++++++++++++++++++++++++++++++++++++++++++++++++---
 src/gcm-prefs.c   |   13 ++++++++++-
 2 files changed, 71 insertions(+), 5 deletions(-)
---
diff --git a/data/gcm-prefs.ui b/data/gcm-prefs.ui
index 8110da8..bc4457b 100644
--- a/data/gcm-prefs.ui
+++ b/data/gcm-prefs.ui
@@ -646,7 +646,7 @@
                                         <child>
                                           <object class="GtkHBox" id="hbox_vendor">
                                             <property name="visible">True</property>
-                                            <property name="spacing">3</property>
+                                            <property name="spacing">9</property>
                                             <child>
                                               <object class="GtkHBox" id="hbox5">
                                                 <property name="visible">True</property>
@@ -662,6 +662,7 @@
                                                 </child>
                                               </object>
                                               <packing>
+                                                <property name="expand">False</property>
                                                 <property name="position">0</property>
                                               </packing>
                                             </child>
@@ -696,7 +697,7 @@
                                         <child>
                                           <object class="GtkHBox" id="hbox_copyright">
                                             <property name="visible">True</property>
-                                            <property name="spacing">3</property>
+                                            <property name="spacing">9</property>
                                             <child>
                                               <object class="GtkHBox" id="hbox10">
                                                 <property name="visible">True</property>
@@ -712,6 +713,7 @@
                                                 </child>
                                               </object>
                                               <packing>
+                                                <property name="expand">False</property>
                                                 <property name="position">0</property>
                                               </packing>
                                             </child>
@@ -746,7 +748,7 @@
                                         <child>
                                           <object class="GtkHBox" id="hbox_type">
                                             <property name="visible">True</property>
-                                            <property name="spacing">3</property>
+                                            <property name="spacing">9</property>
                                             <child>
                                               <object class="GtkHBox" id="hbox6">
                                                 <property name="visible">True</property>
@@ -762,6 +764,7 @@
                                                 </child>
                                               </object>
                                               <packing>
+                                                <property name="expand">False</property>
                                                 <property name="position">0</property>
                                               </packing>
                                             </child>
@@ -796,7 +799,7 @@
                                         <child>
                                           <object class="GtkHBox" id="hbox_size">
                                             <property name="visible">True</property>
-                                            <property name="spacing">3</property>
+                                            <property name="spacing">9</property>
                                             <child>
                                               <object class="GtkHBox" id="hbox30">
                                                 <property name="visible">True</property>
@@ -812,6 +815,7 @@
                                                 </child>
                                               </object>
                                               <packing>
+                                                <property name="expand">False</property>
                                                 <property name="position">0</property>
                                               </packing>
                                             </child>
@@ -843,6 +847,57 @@
                                             <property name="position">3</property>
                                           </packing>
                                         </child>
+                                        <child>
+                                          <object class="GtkHBox" id="hbox_filename">
+                                            <property name="visible">True</property>
+                                            <property name="spacing">9</property>
+                                            <child>
+                                              <object class="GtkHBox" id="hbox32">
+                                                <property name="visible">True</property>
+                                                <child>
+                                                  <object class="GtkLabel" id="label_title_filename">
+                                                    <property name="visible">True</property>
+                                                    <property name="label" translatable="yes" comments="The type of profile, e.g. display, scanner, etc.">File name:</property>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="expand">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="GtkHBox" id="hbox33">
+                                                <property name="visible">True</property>
+                                                <child>
+                                                  <object class="GtkLabel" id="label_filename">
+                                                    <property name="visible">True</property>
+                                                    <property name="label">filename</property>
+                                                    <property name="use_markup">True</property>
+                                                    <property name="wrap">True</property>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="position">0</property>
+                                                  </packing>
+                                                </child>
+                                              </object>
+                                              <packing>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="padding">3</property>
+                                            <property name="position">4</property>
+                                          </packing>
+                                        </child>
                                       </object>
                                       <packing>
                                         <property name="position">0</property>
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 4afebc0..64e2be8 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -1346,6 +1346,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 	gchar *copyright = NULL;
 	gchar *vendor = NULL;
 	gchar *filename = NULL;
+	gchar *basename = NULL;
 	gchar *size_text = NULL;
 	GcmProfileType profile_type = GCM_PROFILE_TYPE_UNKNOWN;
 	const gchar *profile_type_text;
@@ -1401,7 +1402,12 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 		gtk_label_set_label (GTK_LABEL (widget), profile_type_text);
 	}
 
-	/* set type */
+	/* set basename */
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "label_filename"));
+	basename = g_path_get_basename (filename);
+	gtk_label_set_label (GTK_LABEL (widget), basename);
+
+	/* set size */
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_size"));
 	if (size == 0) {
 		gtk_widget_hide (widget);
@@ -1452,6 +1458,7 @@ gcm_prefs_profiles_treeview_clicked_cb (GtkTreeSelection *selection, gpointer us
 	g_object_unref (blue);
 	g_free (size_text);
 	g_free (filename);
+	g_free (basename);
 	g_free (copyright);
 	g_free (vendor);
 
@@ -2250,6 +2257,8 @@ main (int argc, char **argv)
 	gtk_size_group_add_widget (size_group, widget);
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox30"));
 	gtk_size_group_add_widget (size_group, widget);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox32"));
+	gtk_size_group_add_widget (size_group, widget);
 
 	/* set alignment for right */
 	size_group2 = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@@ -2267,6 +2276,8 @@ main (int argc, char **argv)
 	gtk_size_group_add_widget (size_group2, widget);
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox31"));
 	gtk_size_group_add_widget (size_group2, widget);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hbox33"));
+	gtk_size_group_add_widget (size_group2, widget);
 
 	/* get screen */
 	rr_screen = gnome_rr_screen_new (gdk_screen_get_default (), NULL, NULL, &error);



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