summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Gautier <mgautier@fedoraproject.org>2009-05-04 19:20:21 +0200
committerMatthieu Gautier <mgautier@fedoraproject.org>2009-05-04 19:20:21 +0200
commit5bc39fc9f68fe44a42f7fb4fd2a9845931337e49 (patch)
tree7144de68fdfe7472da995df8b96bb09a5e194106
parentc0e1c23317d7f7c9cf8ddf86255e4a087027eb3e (diff)
downloadg-ed-it-5bc39fc9f68fe44a42f7fb4fd2a9845931337e49.zip
g-ed-it-5bc39fc9f68fe44a42f7fb4fd2a9845931337e49.tar.gz
g-ed-it-5bc39fc9f68fe44a42f7fb4fd2a9845931337e49.tar.xz
Adapt commit with docBar commit text to the new docBar
-rw-r--r--g-ed-it/docBar.py5
-rw-r--r--g-ed-it/gitAction.py14
2 files changed, 6 insertions, 13 deletions
diff --git a/g-ed-it/docBar.py b/g-ed-it/docBar.py
index dcd40c3..29d2027 100644
--- a/g-ed-it/docBar.py
+++ b/g-ed-it/docBar.py
@@ -93,11 +93,6 @@ class DocBar (object):
self.currentTab.show_all()
self.update_docBar_ui()
- def get_and_clear_commitText(self):
- text = self.commit_text.get_text()
- self.commit_text.set_text("")
- return text
-
def deactivate(self):
if self.currentTab:
self.currentTab.remove(self.docBar)
diff --git a/g-ed-it/gitAction.py b/g-ed-it/gitAction.py
index 1f48d51..fa51551 100644
--- a/g-ed-it/gitAction.py
+++ b/g-ed-it/gitAction.py
@@ -37,15 +37,13 @@ class GitAction (object):
fileUri = window.get_active_tab().get_document().get_uri_for_display()
self.commitDialog.run(window,fileUri,True)
- def commit_current_file(self, button, window, commitTextMethod = None):
+ def commit_current_file(self, button, window):
fileUri = window.get_active_tab().get_document().get_uri_for_display()
- if commitTextMethod:
- text = commitTextMethod()
- if text != "":
- subprocess.call('git-commit -m "'+text+'" '+os.path.basename(fileUri),stdout=subprocess.PIPE,cwd=os.path.dirname(fileUri), shell=True)
- self.plugin.fast_update_ui()
- else:
- self.commitDialog.run(window,fileUri,False)
+ text = self.plugin.windowHelpers[window].docBar.commit_text.get_text()
+ self.plugin.windowHelpers[window].docBar.commit_text.set_text("")
+ if text != "":
+ subprocess.call('git-commit -m "'+text+'" '+os.path.basename(fileUri),stdout=subprocess.PIPE,cwd=os.path.dirname(fileUri), shell=True)
+ window.emit("active-tab-state-changed")
else:
self.commitDialog.run(window,fileUri,False)