[gitg/wip/sindhus/interactive-rebase] Handle rebase start dialog response
- From: Sindhu Sundar <sindhus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/sindhus/interactive-rebase] Handle rebase start dialog response
- Date: Fri, 13 Sep 2013 14:36:51 +0000 (UTC)
commit f8ea0c7967ac9531ea8c9900296ff49800235ece
Author: Sindhu S <sindhus live in>
Date: Fri Sep 13 20:06:00 2013 +0530
Handle rebase start dialog response
gitg/gitg-rebase-controller.vala | 3 ++-
gitg/gitg-rebase-start-dialog.vala | 14 ++++++++++++++
gitg/resources/gitg-rebase-start-dialog.ui | 6 +++++-
3 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/gitg/gitg-rebase-controller.vala b/gitg/gitg-rebase-controller.vala
index 9232512..c339679 100644
--- a/gitg/gitg-rebase-controller.vala
+++ b/gitg/gitg-rebase-controller.vala
@@ -23,8 +23,9 @@ namespace Gitg
{
private string output;
private string repo_path;
- public RebaseController()
+ public RebaseController(string repository_path)
{
+ repo_path = repository_path;
output = "";
}
diff --git a/gitg/gitg-rebase-start-dialog.vala b/gitg/gitg-rebase-start-dialog.vala
index 4af641a..fe03274 100644
--- a/gitg/gitg-rebase-start-dialog.vala
+++ b/gitg/gitg-rebase-start-dialog.vala
@@ -29,7 +29,21 @@ namespace Gitg
public RebaseStartDialog(Gitg.Repository repository)
{
File? workdir = repository.get_workdir();
+ r_rebase_spinbutton.set_range(0,30);
repository_path = workdir.get_path();
}
+
+ public override void response(int id) {
+ if (id == Gtk.ResponseType.OK)
+ {
+ var rebase_controller = new RebaseController(repository_path);
+ int num_of_commits = 5;
+ // FIXME: User should be able to enter N
+ // int num_of_commits = r_rebase_spinbutton.get_value_as_int();
+ }
+ destroy();
+ }
+
+
}
}
\ No newline at end of file
diff --git a/gitg/resources/gitg-rebase-start-dialog.ui b/gitg/resources/gitg-rebase-start-dialog.ui
index 11f248d..c636d34 100644
--- a/gitg/resources/gitg-rebase-start-dialog.ui
+++ b/gitg/resources/gitg-rebase-start-dialog.ui
@@ -87,7 +87,11 @@
<object class="GtkSpinButton" id="rebase_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="has_focus">False</property>
+ <property name="is_focus">False</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="expand">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]