mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-29 22:23:12 -06:00
Added copy to clipboard option
This commit is contained in:
parent
9f2c240fc1
commit
6460c20a97
@ -696,6 +696,9 @@ class Controller(object):
|
|||||||
msg = messages.viewTweet(tweet, tweetsList)
|
msg = messages.viewTweet(tweet, tweetsList)
|
||||||
elif buffer.type == "account" or buffer.type == "empty":
|
elif buffer.type == "account" or buffer.type == "empty":
|
||||||
return
|
return
|
||||||
|
elif buffer.name == "sent_tweets":
|
||||||
|
tweet, tweetsList = buffer.get_full_tweet()
|
||||||
|
msg = messages.viewTweet(tweet, tweetsList)
|
||||||
else:
|
else:
|
||||||
non_tweet = buffer.get_formatted_message()
|
non_tweet = buffer.get_formatted_message()
|
||||||
msg = messages.viewTweet(non_tweet, [], False)
|
msg = messages.viewTweet(non_tweet, [], False)
|
||||||
@ -920,7 +923,7 @@ class Controller(object):
|
|||||||
|
|
||||||
def left(self, *args, **kwargs):
|
def left(self, *args, **kwargs):
|
||||||
buff = self.view.get_current_buffer_pos()
|
buff = self.view.get_current_buffer_pos()
|
||||||
print buff
|
# print buff
|
||||||
buffer = self.get_current_buffer()
|
buffer = self.get_current_buffer()
|
||||||
if not hasattr(buffer.buffer, "list"):
|
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)
|
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):
|
def insert_buffer(self, buffer, position):
|
||||||
# print ref_buf.name, ref_buf.account
|
# print ref_buf.name, ref_buf.account
|
||||||
# if ref_buf.account != buffer.account or ref_buf.type == "account" or type(ref_buf) == buffers.emptyPanel:
|
# 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]
|
ref_buf = self.buffers[position+1]
|
||||||
empty = True
|
empty = True
|
||||||
for i in buffers[position+1:]:
|
for i in buffers[position+1:]:
|
||||||
@ -1359,3 +1362,7 @@ class Controller(object):
|
|||||||
buff = self.buffers[bufferPosition]
|
buff = self.buffers[bufferPosition]
|
||||||
newPos = self.view.search(buff.name, buff.account)
|
newPos = self.view.search(buff.name, buff.account)
|
||||||
self.view.change_buffer(newPos)
|
self.view.change_buffer(newPos)
|
||||||
|
|
||||||
|
def copy_to_clipboard(self, *args, **kwargs):
|
||||||
|
output.copy(self.get_current_buffer().get_message())
|
||||||
|
output.speak(_(u"Copied"))
|
||||||
|
@ -36,7 +36,7 @@ update_profile = alt+win+p
|
|||||||
delete = control+win+delete
|
delete = control+win+delete
|
||||||
clear_buffer = control+win+shift+delete
|
clear_buffer = control+win+shift+delete
|
||||||
repeat_item = control+win+space
|
repeat_item = control+win+space
|
||||||
copy_to_clipboard = control+win+c
|
copy_to_clipboard = control+win+shift+c
|
||||||
add_to_list = control+win+a
|
add_to_list = control+win+a
|
||||||
remove_from_list = control+win+shift+a
|
remove_from_list = control+win+shift+a
|
||||||
toggle_buffer_mute = control+win+shift+m
|
toggle_buffer_mute = control+win+shift+m
|
||||||
|
@ -24,7 +24,7 @@ def setup ():
|
|||||||
except:
|
except:
|
||||||
return logging.exception("Output: Error during initialization.")
|
return logging.exception("Output: Error during initialization.")
|
||||||
|
|
||||||
def Copy(text):
|
def copy(text):
|
||||||
import win32clipboard
|
import win32clipboard
|
||||||
#Copies text to the clipboard.
|
#Copies text to the clipboard.
|
||||||
win32clipboard.OpenClipboard()
|
win32clipboard.OpenClipboard()
|
||||||
|
@ -28,7 +28,7 @@ class twitter(object):
|
|||||||
|
|
||||||
def authorise(self, settings):
|
def authorise(self, settings):
|
||||||
authorisationHandler.logged = False
|
authorisationHandler.logged = False
|
||||||
port = random.randint(30000, 66000)
|
port = random.randint(30000, 65535)
|
||||||
httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', port), authorisationHandler.handler)
|
httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', port), authorisationHandler.handler)
|
||||||
if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "":
|
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"]),
|
args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
|
||||||
|
Loading…
Reference in New Issue
Block a user