summaryrefslogtreecommitdiffstats
path: root/g-ed-it
diff options
context:
space:
mode:
Diffstat (limited to 'g-ed-it')
-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)