[gnome-builder] GbPreferencesPageGit: add keywords to widgets
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbPreferencesPageGit: add keywords to widgets
- Date: Fri, 12 Dec 2014 12:05:32 +0000 (UTC)
commit b94bbffb4df75e471f2fa710566abc45074380de
Author: Christian Hergert <christian hergert me>
Date: Fri Dec 12 04:01:50 2014 -0800
GbPreferencesPageGit: add keywords to widgets
src/preferences/gb-preferences-page-git.c | 18 ++++++++++++++++++
src/resources/ui/gb-preferences-page-git.ui | 4 ++--
2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/preferences/gb-preferences-page-git.c b/src/preferences/gb-preferences-page-git.c
index edbaddf..c5da482 100644
--- a/src/preferences/gb-preferences-page-git.c
+++ b/src/preferences/gb-preferences-page-git.c
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <glib/gi18n.h>
#include <libgit2-glib/ggit.h>
#include "gb-preferences-page-git.h"
@@ -26,6 +27,9 @@ struct _GbPreferencesPageGitPrivate
GtkEntry *git_author_name_entry;
GtkEntry *git_author_email_entry;
+
+ GtkWidget *name_label;
+ GtkWidget *email_label;
};
G_DEFINE_TYPE_WITH_PRIVATE (GbPreferencesPageGit, gb_preferences_page_git,
@@ -109,6 +113,9 @@ gb_preferences_page_git_class_init (GbPreferencesPageGitClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageGit, git_author_name_entry);
gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageGit, git_author_email_entry);
+
+ gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageGit, name_label);
+ gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageGit, email_label);
}
static void
@@ -119,4 +126,15 @@ gb_preferences_page_git_init (GbPreferencesPageGit *self)
gtk_widget_init_template (GTK_WIDGET (self));
self->priv->config = ggit_config_new_default (NULL);
+
+ gb_preferences_page_set_keywords_for_widget (GB_PREFERENCES_PAGE (self),
+ _("git author name surname"),
+ self->priv->name_label,
+ self->priv->git_author_name_entry,
+ NULL);
+ gb_preferences_page_set_keywords_for_widget (GB_PREFERENCES_PAGE (self),
+ _("git author email mail address"),
+ self->priv->email_label,
+ self->priv->git_author_email_entry,
+ NULL);
}
diff --git a/src/resources/ui/gb-preferences-page-git.ui b/src/resources/ui/gb-preferences-page-git.ui
index 2ef8118..659385b 100644
--- a/src/resources/ui/gb-preferences-page-git.ui
+++ b/src/resources/ui/gb-preferences-page-git.ui
@@ -8,7 +8,7 @@
<property name="row-spacing">6</property>
<property name="column-spacing">12</property>
<child>
- <object class="GtkLabel">
+ <object class="GtkLabel" id="name_label">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="hexpand">False</property>
@@ -34,7 +34,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
+ <object class="GtkLabel" id="email_label">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label" translatable="Yes">Author Email</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]