diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 3c66fb48..efc4629a 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -696,6 +696,9 @@ class Controller(object): msg = messages.viewTweet(tweet, tweetsList) elif buffer.type == "account" or buffer.type == "empty": return + elif buffer.name == "sent_tweets": + tweet, tweetsList = buffer.get_full_tweet() + msg = messages.viewTweet(tweet, tweetsList) else: non_tweet = buffer.get_formatted_message() msg = messages.viewTweet(non_tweet, [], False) @@ -920,7 +923,7 @@ class Controller(object): def left(self, *args, **kwargs): buff = self.view.get_current_buffer_pos() - print buff +# print buff buffer = self.get_current_buffer() if not hasattr(buffer.buffer, "list"): output.speak(_(u"No session is currently in focus. Focus a session with the next or previous session shortcut."), True) @@ -1336,7 +1339,7 @@ class Controller(object): def insert_buffer(self, buffer, position): # print ref_buf.name, ref_buf.account # if ref_buf.account != buffer.account or ref_buf.type == "account" or type(ref_buf) == buffers.emptyPanel: -# buffers = self.get_buffers_for_account(buffer.account) + buffers = self.get_buffers_for_account(buffer.account) ref_buf = self.buffers[position+1] empty = True for i in buffers[position+1:]: @@ -1358,4 +1361,8 @@ class Controller(object): def change_buffer(self, bufferPosition): buff = self.buffers[bufferPosition] newPos = self.view.search(buff.name, buff.account) - self.view.change_buffer(newPos) \ No newline at end of file + self.view.change_buffer(newPos) + + def copy_to_clipboard(self, *args, **kwargs): + output.copy(self.get_current_buffer().get_message()) + output.speak(_(u"Copied")) diff --git a/src/keymaps/default.keymap b/src/keymaps/default.keymap index fe3d54d0..066fcc9f 100644 --- a/src/keymaps/default.keymap +++ b/src/keymaps/default.keymap @@ -36,7 +36,7 @@ update_profile = alt+win+p delete = control+win+delete clear_buffer = control+win+shift+delete repeat_item = control+win+space -copy_to_clipboard = control+win+c +copy_to_clipboard = control+win+shift+c add_to_list = control+win+a remove_from_list = control+win+shift+a toggle_buffer_mute = control+win+shift+m diff --git a/src/output.py b/src/output.py index 402bcb5c..c655be83 100644 --- a/src/output.py +++ b/src/output.py @@ -24,7 +24,7 @@ def setup (): except: return logging.exception("Output: Error during initialization.") -def Copy(text): +def copy(text): import win32clipboard #Copies text to the clipboard. win32clipboard.OpenClipboard() diff --git a/src/twitter/twitter.py b/src/twitter/twitter.py index 7e6c68ff..3c131ab3 100644 --- a/src/twitter/twitter.py +++ b/src/twitter/twitter.py @@ -28,7 +28,7 @@ class twitter(object): def authorise(self, settings): authorisationHandler.logged = False - port = random.randint(30000, 66000) + port = random.randint(30000, 65535) httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', port), authorisationHandler.handler) if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "": args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),