[gitg/wip/sindhus/interactive-rebase] Add rebase listbox to rebase window
- From: Sindhu Sundar <sindhus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/sindhus/interactive-rebase] Add rebase listbox to rebase window
- Date: Mon, 9 Sep 2013 14:58:12 +0000 (UTC)
commit f69cb0653bb92be2a9c5cb1aa61fbdf058b4bc13
Author: Sindhu S <sindhus live in>
Date: Mon Sep 9 19:01:09 2013 +0530
Add rebase listbox to rebase window
gitg/Makefile.am | 1 +
gitg/gitg-rebase-list-box.vala | 4 ++++
gitg/gitg-rebase-window.vala | 8 ++++++++
.../resources/gitg-rebase-list-box-row.ui | 6 +++---
gitg/resources/gitg-resources.xml | 3 +++
5 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/gitg/Makefile.am b/gitg/Makefile.am
index 3f9866e..7eb6633 100644
--- a/gitg/Makefile.am
+++ b/gitg/Makefile.am
@@ -42,6 +42,7 @@ VALASOURCES = \
gitg-clone-dialog.vala \
gitg-author-details-dialog.vala \
gitg-resource.vala \
+ gitg-rebase-list-box.vala \
gitg-rebase-parser.vala \
gitg-rebase-window.vala \
gitg-application.vala \
diff --git a/gitg/gitg-rebase-list-box.vala b/gitg/gitg-rebase-list-box.vala
index abfd7c3..c0d35cd 100644
--- a/gitg/gitg-rebase-list-box.vala
+++ b/gitg/gitg-rebase-list-box.vala
@@ -53,6 +53,10 @@ namespace Gitg
row.show();
add(row);
}
+
+ construct {
+ show ();
+ }
}
}
diff --git a/gitg/gitg-rebase-window.vala b/gitg/gitg-rebase-window.vala
index 0c39b20..89fd589 100644
--- a/gitg/gitg-rebase-window.vala
+++ b/gitg/gitg-rebase-window.vala
@@ -27,6 +27,14 @@ public class RebaseWindow : Gtk.Window
{
this.title = "gitg Rebase";
destroy.connect (Gtk.main_quit);
+ var rebase_listbox = new RebaseListBox();
+ rebase_listbox.add_rebase_row("sha1", "msg");
+ rebase_listbox.add_rebase_row("sha2", "msg");
+ rebase_listbox.add_rebase_row("sha3", "msg");
+ var hbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 1);
+ hbox.homogeneous = true;
+ hbox.add (rebase_listbox);
+ add (hbox);
}
}
diff --git a/libgitg/resources/gitg-rebase-list-box-row.ui b/gitg/resources/gitg-rebase-list-box-row.ui
similarity index 69%
rename from libgitg/resources/gitg-rebase-list-box-row.ui
rename to gitg/resources/gitg-rebase-list-box-row.ui
index 73b80a1..d29185a 100644
--- a/libgitg/resources/gitg-rebase-list-box-row.ui
+++ b/gitg/resources/gitg-rebase-list-box-row.ui
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.8 -->
- <template class="GitgRepositoryListBoxRow" parent="GtkListBoxRow">
+ <template class="GitgRebaseListBoxRow" parent="GtkListBoxRow">
<child>
- <object class="GtkBox">
+ <object class="GtkBox" id="r_gtk_box">
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel" id="r_commit_sha">
</object>
</child>
<child>
- <object class="GtkLabel" id="r_commit_message">
+ <object class="GtkLabel" id="r_commit_msg">
</object>
</child>
</object>
diff --git a/gitg/resources/gitg-resources.xml b/gitg/resources/gitg-resources.xml
index 0d08cca..e1a309f 100644
--- a/gitg/resources/gitg-resources.xml
+++ b/gitg/resources/gitg-resources.xml
@@ -17,6 +17,9 @@
<file alias="icons/gitg.svg" compressed="true"
preprocess="xml-stripblanks">../../data/icons/gitg.svg</file>
<file alias="icons/gitg128x128.png">../../data/icons/gitg128x128.png</file>
</gresource>
+ <gresource prefix="/org/gnome/gitg/gtk">
+ <file compressed="true" preprocess="xml-stripblanks">gitg-rebase-list-box-row.ui</file>
+ </gresource>
</gresources>
<!-- ex: et ts=2 -->
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]