diff options
author | Matthieu Gautier <mgautier@fedoraproject.org> | 2009-05-04 19:20:21 +0200 |
---|---|---|
committer | Matthieu Gautier <mgautier@fedoraproject.org> | 2009-05-04 19:20:21 +0200 |
commit | 5bc39fc9f68fe44a42f7fb4fd2a9845931337e49 (patch) | |
tree | 7144de68fdfe7472da995df8b96bb09a5e194106 /g-ed-it/gitAction.py | |
parent | c0e1c23317d7f7c9cf8ddf86255e4a087027eb3e (diff) | |
download | g-ed-it-5bc39fc9f68fe44a42f7fb4fd2a9845931337e49.tar.gz g-ed-it-5bc39fc9f68fe44a42f7fb4fd2a9845931337e49.tar.xz g-ed-it-5bc39fc9f68fe44a42f7fb4fd2a9845931337e49.zip |
Adapt commit with docBar commit text to the new docBar
Diffstat (limited to 'g-ed-it/gitAction.py')
-rw-r--r-- | g-ed-it/gitAction.py | 14 |
1 files changed, 6 insertions, 8 deletions
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) |