[gitg/wip/sindhus/branch-info] Add string branch_info to Dash View



commit 7f57f1dc6d37c6cea67c7a2445265f639f867285
Author: Sindhu S <sindhus live in>
Date:   Mon Sep 9 10:19:23 2013 +0530

    Add string branch_info to Dash View

 libgitg/gitg-repository-list-box.vala             |   11 ++++++++++-
 libgitg/resources/gitg-repository-list-box-row.ui |   20 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-repository-list-box.vala b/libgitg/gitg-repository-list-box.vala
index 70433db..4f09da1 100644
--- a/libgitg/gitg-repository-list-box.vala
+++ b/libgitg/gitg-repository-list-box.vala
@@ -40,6 +40,8 @@ namespace Gitg
                        [GtkChild]
                        private Gtk.Label d_branch_label;
                        [GtkChild]
+                       private Gtk.Label d_branch_info;
+                       [GtkChild]
                        private Gtk.Arrow d_arrow;
                        [GtkChild]
                        private Gtk.Spinner d_spinner;
@@ -58,6 +60,7 @@ namespace Gitg
                                                {
                                                        var head = d_repository.get_head();
                                                        branch_name = head.parsed_name.shortname;
+                                                       branch_info = "Blah!";
                                                }
                                                catch {}
                                        }
@@ -88,6 +91,12 @@ namespace Gitg
                                set { d_branch_label.set_markup("<small>%s</small>".printf(value)); }
                        }
 
+                       public string? branch_info
+                       {
+                               get { return d_branch_info.get_text(); }
+                               set { d_branch_info.set_markup("<small>%s</small>".printf(value)); }
+                       }
+
                        public bool loading
                        {
                                get { return d_loading; }
@@ -125,7 +134,7 @@ namespace Gitg
 
                        public Row(string name, string branch_name, bool has_remote)
                        {
-                               Object(repository_name: name, branch_name: branch_name, has_remote: 
has_remote);
+                               Object(repository_name: name, branch_name: branch_name, branch_info: 
branch_info, has_remote: has_remote);
                        }
                }
 
diff --git a/libgitg/resources/gitg-repository-list-box-row.ui 
b/libgitg/resources/gitg-repository-list-box-row.ui
index 86c5c62..b12826f 100644
--- a/libgitg/resources/gitg-repository-list-box-row.ui
+++ b/libgitg/resources/gitg-repository-list-box-row.ui
@@ -70,6 +70,26 @@
               </packing>
             </child>
             <child>
+              <object class="GtkLabel" id="d_branch_info">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="has_focus">False</property>
+                <property name="is_focus">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="ellipsize">end</property>
+                <style>
+                  <class name="dim-label"/>
+                </style>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkArrow" id="d_arrow">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>


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