[gitg] Add UIElement descriptions



commit 98cfe0e52024386b7bd03f7ab8b627df6bc16f3d
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Tue Jul 1 17:49:43 2014 +0200

    Add UIElement descriptions

 gitg/commit/gitg-commit.vala         |    5 +++++
 gitg/gitg-ui-elements.vala           |    2 +-
 gitg/history/gitg-history.vala       |    5 +++++
 libgitg-ext/gitg-ext-ui-element.vala |    8 ++++++++
 plugins/diff/gitg-diff.vala          |    5 +++++
 plugins/files/gitg-files.vala        |    5 +++++
 6 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index eeb079a..0e2484a 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -110,6 +110,11 @@ namespace GitgCommit
                        owned get { return _("Commit"); }
                }
 
+               public string description
+               {
+                       owned get { return _("Create new commits and manage the staging area"); }
+               }
+
                public string? icon
                {
                        owned get { return "document-save-symbolic"; }
diff --git a/gitg/gitg-ui-elements.vala b/gitg/gitg-ui-elements.vala
index 47538f2..ca18967 100644
--- a/gitg/gitg-ui-elements.vala
+++ b/gitg/gitg-ui-elements.vala
@@ -180,7 +180,7 @@ public class UIElements<T> : Object
 
                d_stack.add_with_properties(e.widget,
                                            "name", e.id,
-                                           "title", e.display_name,
+                                           "title", e.description,
                                            "icon-name", e.icon,
                                            "position", insert_position);
        }
diff --git a/gitg/history/gitg-history.vala b/gitg/history/gitg-history.vala
index 57bf6b8..fe4dd91 100644
--- a/gitg/history/gitg-history.vala
+++ b/gitg/history/gitg-history.vala
@@ -164,6 +164,11 @@ namespace GitgHistory
                        owned get { return _("History"); }
                }
 
+               public string description
+               {
+                       owned get { return _("Examine the history of the repository"); }
+               }
+
                public string? icon
                {
                        owned get { return "view-list-symbolic"; }
diff --git a/libgitg-ext/gitg-ext-ui-element.vala b/libgitg-ext/gitg-ext-ui-element.vala
index cf9f144..ab2c806 100644
--- a/libgitg-ext/gitg-ext-ui-element.vala
+++ b/libgitg-ext/gitg-ext-ui-element.vala
@@ -51,6 +51,14 @@ public interface UIElement : Object
        public abstract string display_name { owned get; }
 
        /**
+        * The description of the ui element.
+        *
+        * This should result in a string which can
+        * be displayed in the gitg UI to describe the element.
+        */
+       public abstract string description { owned get; }
+
+       /**
         * The ui element icon.
         *
         * If provided, the icon will be used in navigation toolbars
diff --git a/plugins/diff/gitg-diff.vala b/plugins/diff/gitg-diff.vala
index 0b08a4d..61dd9a3 100644
--- a/plugins/diff/gitg-diff.vala
+++ b/plugins/diff/gitg-diff.vala
@@ -71,6 +71,11 @@ namespace GitgDiff
                        owned get { return _("Diff"); }
                }
 
+               public string description
+               {
+                       owned get { return _("Show the changes introduced by the selected commit"); }
+               }
+
                public string? icon
                {
                        owned get { return "diff-symbolic"; }
diff --git a/plugins/files/gitg-files.vala b/plugins/files/gitg-files.vala
index 5127cb6..385c356 100644
--- a/plugins/files/gitg-files.vala
+++ b/plugins/files/gitg-files.vala
@@ -63,6 +63,11 @@ namespace GitgFiles
                        owned get { return _("Files"); }
                }
 
+               public string description
+               {
+                       owned get { return _("Show the files in the tree of the selected commit"); }
+               }
+
                public string? icon
                {
                        owned get { return "system-file-manager-symbolic"; }


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