[gitg] Rename DashView as RepositoryListBox



commit df9ea7250a0ca466102bbaf94ccf76980498e352
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Jul 8 21:00:37 2013 +0200

    Rename DashView as RepositoryListBox

 gitg/gitg-window.vala                              |    2 +-
 gitg/resources/ui/gitg-window.ui                   |    2 +-
 libgitg/Makefile.am                                |    2 +-
 ...ash-view.vala => gitg-repository-list-box.vala} |   28 ++++++++++----------
 ...view-row.ui => gitg-repository-list-box-row.ui} |    2 +-
 libgitg/resources/resources.xml                    |    4 +-
 tests/Makefile.am                                  |   12 ++++----
 tests/{dash-view.vala => repository-list-box.vala} |    4 +-
 8 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index eb602fa..f9d3d97 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -61,7 +61,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
        [GtkChild]
        private Gtk.ScrolledWindow d_dash_scrolled_window;
        [GtkChild]
-       private Gitg.DashView d_dash_view;
+       private Gitg.RepositoryListBox d_dash_view;
 
        [GtkChild]
        private Gtk.Stack d_stack_activities;
diff --git a/gitg/resources/ui/gitg-window.ui b/gitg/resources/ui/gitg-window.ui
index bad83c9..b27f292 100644
--- a/gitg/resources/ui/gitg-window.ui
+++ b/gitg/resources/ui/gitg-window.ui
@@ -224,7 +224,7 @@
                   <class name="content-view"/>
                 </style>
                 <child>
-                  <object class="GitgDashView" id="d_dash_view">
+                  <object class="GitgRepositoryListBox" id="d_dash_view">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <signal name="repository_activated" handler="dash_view_repository_activated" 
swapped="no"/>
diff --git a/libgitg/Makefile.am b/libgitg/Makefile.am
index b7ab910..cf6b892 100644
--- a/libgitg/Makefile.am
+++ b/libgitg/Makefile.am
@@ -59,7 +59,7 @@ VALA_FILES =                                  \
        gitg-diff-view-request.vala             \
        gitg-diff-view-request-resource.vala    \
        gitg-diff-view-request-diff.vala        \
-       gitg-dash-view.vala                     \
+       gitg-repository-list-box.vala           \
        gitg-when-mapped.vala                   \
        gitg-progress-bin.vala                  \
        gitg-stage.vala                         \
diff --git a/libgitg/gitg-dash-view.vala b/libgitg/gitg-repository-list-box.vala
similarity index 90%
rename from libgitg/gitg-dash-view.vala
rename to libgitg/gitg-repository-list-box.vala
index 7261cf7..a92b549 100644
--- a/libgitg/gitg-dash-view.vala
+++ b/libgitg/gitg-repository-list-box.vala
@@ -19,13 +19,13 @@
 
 namespace Gitg
 {
-       public class DashView : Gtk.ListBox
+       public class RepositoryListBox : Gtk.ListBox
        {
                private static Gtk.IconSize d_icon_size;
                private string? d_filter_text;
 
-               [GtkTemplate (ui = "/org/gnome/gitg/gtk/dash-view/gitg-dash-view-row.ui")]
-               private class DashRow : Gtk.ListBoxRow
+               [GtkTemplate (ui = "/org/gnome/gitg/gtk/gitg-repository-list-box-row.ui")]
+               private class Row : Gtk.ListBoxRow
                {
                        private Repository? d_repository;
                        private DateTime d_time;
@@ -123,7 +123,7 @@ namespace Gitg
                                }
                        }
 
-                       public DashRow(string name, string branch_name, bool has_remote)
+                       public Row(string name, string branch_name, bool has_remote)
                        {
                                Object(repository_name: name, branch_name: branch_name, has_remote: 
has_remote);
                        }
@@ -133,7 +133,7 @@ namespace Gitg
 
                protected override void row_activated(Gtk.ListBoxRow row)
                {
-                       var r = (DashRow)row;
+                       var r = (Row)row;
 
                        if (r.repository != null)
                        {
@@ -162,12 +162,12 @@ namespace Gitg
 
                private bool filter(Gtk.ListBoxRow row)
                {
-                       return d_filter_text != null ? ((DashRow)row).repository_name.contains(d_filter_text) 
: true;
+                       return d_filter_text != null ? ((Row)row).repository_name.contains(d_filter_text) : 
true;
                }
 
                private int compare_widgets(Gtk.ListBoxRow a, Gtk.ListBoxRow b)
                {
-                       return - ((DashRow)a).time.compare(((DashRow)b).time);
+                       return - ((Row)a).time.compare(((Row)b).time);
                }
 
                private void add_recent_info()
@@ -218,13 +218,13 @@ namespace Gitg
                        }
                }
 
-               private DashRow get_row_for_repository(Repository repository)
+               private Row get_row_for_repository(Repository repository)
                {
-                       DashRow? row = null;
+                       Row? row = null;
 
                        foreach (var child in get_children())
                        {
-                               var d = (DashRow)child;
+                               var d = (Row)child;
                                if (d.repository.get_location().equal(repository.get_location()))
                                {
                                        row = d;
@@ -248,7 +248,7 @@ namespace Gitg
 
                public void add_repository(Repository repository)
                {
-                       DashRow? row = get_row_for_repository(repository);
+                       Row? row = get_row_for_repository(repository);
 
                        if (row == null)
                        {
@@ -267,7 +267,7 @@ namespace Gitg
                                }
                                catch {}
 
-                               row = new DashRow(repository.name, head_name, has_remote);
+                               row = new Row(repository.name, head_name, has_remote);
                                row.repository = repository;
                                row.show();
                                add(row);
@@ -286,7 +286,7 @@ namespace Gitg
                        }
                }
 
-               private async Repository? clone(DashRow row, string url, File location, bool is_bare)
+               private async Repository? clone(Row row, string url, File location, bool is_bare)
                {
                        SourceFunc callback = clone.callback;
                        Repository? repository = null;
@@ -352,7 +352,7 @@ namespace Gitg
                        }
 
                        // Clone
-                       DashRow row = new DashRow(subfolder_name, "Cloning...", true);
+                       Row row = new Row(subfolder_name, "Cloning...", true);
                        row.loading = true;
                        row.show();
                        add(row);
diff --git a/libgitg/resources/gitg-dash-view-row.ui b/libgitg/resources/gitg-repository-list-box-row.ui
similarity index 98%
rename from libgitg/resources/gitg-dash-view-row.ui
rename to libgitg/resources/gitg-repository-list-box-row.ui
index 054a620..86c5c62 100644
--- a/libgitg/resources/gitg-dash-view-row.ui
+++ b/libgitg/resources/gitg-repository-list-box-row.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.8 -->
-  <template class="GitgDashViewDashRow" parent="GtkListBoxRow">
+  <template class="GitgRepositoryListBoxRow" parent="GtkListBoxRow">
     <child>
       <object class="GitgProgressBin" id="d_progress_bin">
         <property name="visible">True</property>
diff --git a/libgitg/resources/resources.xml b/libgitg/resources/resources.xml
index 4a29d03..6e7e602 100644
--- a/libgitg/resources/resources.xml
+++ b/libgitg/resources/resources.xml
@@ -7,8 +7,8 @@
     <file compressed="true">diff-view.css</file>
     <file compressed="true">jquery-1.10.1.min.js</file>
   </gresource>
-  <gresource prefix="/org/gnome/gitg/gtk/dash-view">
-    <file compressed="true" preprocess="xml-stripblanks">gitg-dash-view-row.ui</file>
+  <gresource prefix="/org/gnome/gitg/gtk">
+    <file compressed="true" preprocess="xml-stripblanks">gitg-repository-list-box-row.ui</file>
   </gresource>
   <gresource prefix="/org/gnome/gitg/gtk/sidebar">
     <file compressed="true">sidebar-view.ui</file>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d39ddff..7101574 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,15 +4,15 @@ noinst_PROGRAMS = $(TEST_PROGS) $(DEMO_PROGS)
 
 AM_VALAFLAGS = $(GITG_PLUGIN_VALAFLAGS)
 
-DEMO_PROGS = diff-view dash-view progress-bin
+DEMO_PROGS = diff-view repository-list-box progress-bin
 
 diff_view_SOURCES = diff-view.vala
 diff_view_LDADD = $(GITG_PLUGIN_LIBS)
 diff_view_CFLAGS = $(GITG_PLUGIN_CFLAGS) -w
 
-dash_view_SOURCES = dash-view.vala
-dash_view_LDADD = $(GITG_PLUGIN_LIBS)
-dash_view_CFLAGS = $(GITG_PLUGIN_CFLAGS) -w
+repository_list_box_SOURCES = repository-list-box.vala
+repository_list_box_LDADD = $(GITG_PLUGIN_LIBS)
+repository_list_box_CFLAGS = $(GITG_PLUGIN_CFLAGS) -w
 
 progress_bin_SOURCES = progress-bin.vala
 progress_bin_LDADD = $(GITG_PLUGIN_LIBS)
@@ -22,12 +22,12 @@ TESTS = $(TEST_PROGS)
 
 BUILT_SOURCES =                                \
        diff_view_vala.stamp                    \
-       dash_view_vala.stamp                    \
+       repository_list_box_vala.stamp                  \
        progress_bin_vala.stamp
 
 CLEANFILES =                                   \
        $(diff_view_SOURCES:.vala=.c)           \
-       $(dash_view_SOURCES:.vala=.c)           \
+       $(repository_list_box_SOURCES:.vala=.c)         \
        $(progress_bin_SOURCES:.vala=.c)        \
        $(BUILT_SOURCES)
 
diff --git a/tests/dash-view.vala b/tests/repository-list-box.vala
similarity index 82%
rename from tests/dash-view.vala
rename to tests/repository-list-box.vala
index e549c8b..bf04bc4 100644
--- a/tests/dash-view.vala
+++ b/tests/repository-list-box.vala
@@ -1,7 +1,7 @@
 using Gtk;
 using Gitg;
 
-class TestDashView
+class TestRepositoryListBox
 {
        public static int main(string[] args)
        {
@@ -10,7 +10,7 @@ class TestDashView
 
                var window = new Window();
                window.set_default_size(300, 300);
-               window.add(new DashView());
+               window.add(new RepositoryListBox());
                window.show_all();
 
                window.delete_event.connect((w, ev) => {


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