From 5bc39fc9f68fe44a42f7fb4fd2a9845931337e49 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 4 May 2009 19:20:21 +0200 Subject: Adapt commit with docBar commit text to the new docBar --- g-ed-it/docBar.py | 5 ----- g-ed-it/gitAction.py | 14 ++++++-------- 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) -- cgit