summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Gautier <mgautier@fedoraproject.org>2009-04-02 12:01:21 +0200
committerMatthieu Gautier <mgautier@fedoraproject.org>2009-04-02 12:01:21 +0200
commitb023c8db4608f47acd362d4fff80d2f652b8a8e2 (patch)
tree1ea8366cac39352620e34307e7e3e97748b6024a
parent00558ba5c086f6bd8db04b61e76587f232f91658 (diff)
parentc55cc3b2375db984c222a0cc29da91aae2da9905 (diff)
downloadg-ed-it-b023c8db4608f47acd362d4fff80d2f652b8a8e2.tar.gz
g-ed-it-b023c8db4608f47acd362d4fff80d2f652b8a8e2.tar.xz
g-ed-it-b023c8db4608f47acd362d4fff80d2f652b8a8e2.zip
Merge branch 'diff_button'
Conflicts: g-ed-it/docBar.py Signed-off-by: Matthieu Gautier <mgautier@fedoraproject.org>
-rw-r--r--g-ed-it/docBar.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/g-ed-it/docBar.py b/g-ed-it/docBar.py
index 9365520..ee59b3a 100644
--- a/g-ed-it/docBar.py
+++ b/g-ed-it/docBar.py
@@ -33,6 +33,14 @@ class DocBar (object):
self.btn_commit = gtk.Button("commit")
self.btn_commit.connect("clicked", self.commit_file)
+ self.btn_diff_head_index = gtk.Button("diff HEAD/INDEX")
+ self.btn_diff_head_index.connect("clicked", self.diff_head_index)
+
+ self.btn_diff_index_wt = gtk.Button("diff INDEX/WT")
+ self.btn_diff_index_wt.connect("clicked", self.diff_index_wt)
+
+ hbox.pack_start(self.btn_diff_head_index, False, False)
+ hbox.pack_start(self.btn_diff_index_wt, False, False)
hbox.pack_start(self.lbl_status, True, False)
hbox.pack_start(self.btn_add, False, False)
hbox.pack_start(self.btn_commit, False, False)
@@ -82,6 +90,8 @@ class DocBar (object):
def setDocInfo(self):
self.btn_add.set_sensitive(self.index2WT!=None)
self.btn_commit.set_sensitive(self.HEAD2index!=None)
+ self.btn_diff_head_index.set_sensitive(self.HEAD2index!=None)
+ self.btn_diff_index_wt.set_sensitive(self.index2WT!=None)
if self.doc.is_untitled():
self.lbl_status.set_label("Nouveau fichier")
else:
@@ -139,6 +149,16 @@ class DocBar (object):
def commit_file(self,button):
uri = self.doc.get_uri_for_display()
self.commitDialog.show(uri)
+ print "End of the commit !!!!!!!!"
self.getDocState()
pass
-
+
+ def diff_head_index(self,button):
+ uri = self.doc.get_uri_for_display()
+ subprocess.call(["git-diff","--cached",os.path.basename(uri)],cwd=os.path.dirname(uri))
+ pass
+
+ def diff_index_wt(self,button):
+ uri = self.doc.get_uri_for_display()
+ subprocess.call(["git-diff",os.path.basename(uri)],cwd=os.path.dirname(uri))
+ pass