[gitg] Use a styled text renderer for name and date



commit f93c6e8b36b2159c98bbab9167fcab99d8d51567
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Mar 18 22:25:28 2013 +0100

    Use a styled text renderer for name and date

 configure.ac                              |    6 +++++-
 plugins/history/Makefile.am               |    1 +
 plugins/history/gitg-history.vala         |    7 ++++++-
 plugins/history/resources/view-history.ui |    4 ++--
 4 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a79f6a3..47a29c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -223,6 +223,7 @@ AC_SUBST(GITG_PLUGIN_LIBDIR)
 
 GITG_PLUGIN_CFLAGS="$GITG_CFLAGS"
 GITG_PLUGIN_LIBS="$GITG_LIBS                                   \
+       \$(top_builddir)/libgd/libgd.la                         \
        \$(top_builddir)/libgitg/libgitg-1.0.la                 \
        \$(top_builddir)/libgitg-ext/libgitg-ext-1.0.la         \
        \$(top_builddir)/libgitg-gtk/libgitg-gtk-1.0.la"
@@ -247,11 +248,13 @@ GITG_PLUGIN_VALAFLAGS="                           \
        --pkg libsoup-2.4                       \
        --pkg webkit2gtk-3.0                    \
        --pkg config                            \
+       --pkg gd-1.0                            \
        \$(GITG_VALAFLAGS)                      \
        --vapidir \$(top_srcdir)/vapi           \
        --vapidir \$(top_builddir)/libgitg      \
        --vapidir \$(top_builddir)/libgitg-gtk  \
-       --vapidir \$(top_builddir)/libgitg-ext"
+       --vapidir \$(top_builddir)/libgitg-ext  \
+       --vapidir \$(top_builddir)/libgd"
 
 AC_SUBST(GITG_PLUGIN_VALAFLAGS)
 
@@ -285,6 +288,7 @@ LIBGD_INIT([
        tagged-entry
        stack
        revealer
+       _view-common
        static
        vapi
 ])
diff --git a/plugins/history/Makefile.am b/plugins/history/Makefile.am
index 7b5cd38..c1f4793 100644
--- a/plugins/history/Makefile.am
+++ b/plugins/history/Makefile.am
@@ -1,6 +1,7 @@
 INCLUDES =                                                             \
        -I$(top_srcdir)                                                 \
        -I$(srcdir)                                                     \
+       -I$(top_srcdir)/libgd                                           \
        $(GITG_PLUGIN_CFLAGS)                                           \
        $(WARN_CFLAGS)                                                  \
        -DDATADIR=\""$(datadir)"\"                                      \
diff --git a/plugins/history/gitg-history.vala b/plugins/history/gitg-history.vala
index 89387d2..b1f7183 100644
--- a/plugins/history/gitg-history.vala
+++ b/plugins/history/gitg-history.vala
@@ -182,11 +182,16 @@ namespace GitgHistory
                {
                        var ret = GitgExt.UI.from_builder("history/view-history.ui",
                                                          "scrolled_window_commit_list",
-                                                         "commit_list_view");
+                                                         "commit_list_view",
+                                                         "renderer_commit_list_author",
+                                                         "renderer_commit_list_date");
 
                        d_view = ret["commit_list_view"] as Gtk.TreeView;
                        d_view.model = d_model;
 
+                       (ret["renderer_commit_list_author"] as Gd.StyledTextRenderer).add_class("dim-label");
+                       (ret["renderer_commit_list_date"] as Gd.StyledTextRenderer).add_class("dim-label");
+
                        d_view.get_selection().changed.connect((sel) => {
                                selection_changed();
                        });
diff --git a/plugins/history/resources/view-history.ui b/plugins/history/resources/view-history.ui
index a7f1903..4b5a69c 100644
--- a/plugins/history/resources/view-history.ui
+++ b/plugins/history/resources/view-history.ui
@@ -37,7 +37,7 @@
             <property name="resizable">True</property>
             <property name="fixed-width">200</property>
             <child>
-              <object class="GtkCellRendererText" id="renderer_commit_list_author">
+              <object class="GdStyledTextRenderer" id="renderer_commit_list_author">
                 <property name="ellipsize">end</property>
               </object>
               <attributes>
@@ -53,7 +53,7 @@
             <property name="resizable">True</property>
             <property name="fixed-width">150</property>
             <child>
-              <object class="GtkCellRendererText" id="renderer_commit_list_date">
+              <object class="GdStyledTextRenderer" id="renderer_commit_list_date">
                 <property name="ellipsize">end</property>
               </object>
               <attributes>


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