mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-23 03:38:08 -06:00
Solved conflicts
This commit is contained in:
commit
831bbc2f2f
@ -1013,13 +1013,11 @@ class Controller(object):
|
|||||||
def interact(self):
|
def interact(self):
|
||||||
"Select the best action for the currently focused tweet (audio, geocode, URL, etc)."
|
"Select the best action for the currently focused tweet (audio, geocode, URL, etc)."
|
||||||
buffer = self.get_current_buffer()
|
buffer = self.get_current_buffer()
|
||||||
if hasattr(sound.URLPlayer,'stream') and config.app['app-settings']['use_Codeofdusk_audio_handlers']:
|
if hasattr(sound.URLPlayer,'stream'):
|
||||||
return sound.URLPlayer.stop_audio(delete=True)
|
return sound.URLPlayer.stop_audio(delete=True)
|
||||||
tweet = buffer.get_tweet()
|
tweet = buffer.get_tweet()
|
||||||
url=None
|
url=None
|
||||||
urls = utils.find_urls(tweet)
|
urls = utils.find_urls(tweet)
|
||||||
if len(urls) > 0 and config.app['app-settings']['use_Codeofdusk_audio_handlers']==False:
|
|
||||||
return buffer.url()
|
|
||||||
if len(urls) == 1:
|
if len(urls) == 1:
|
||||||
url=urls[0]
|
url=urls[0]
|
||||||
elif len(urls) > 1:
|
elif len(urls) > 1:
|
||||||
@ -1294,7 +1292,7 @@ class Controller(object):
|
|||||||
output.speak(_(u"Session mute on"), True)
|
output.speak(_(u"Session mute on"), True)
|
||||||
elif buffer.session.settings["sound"]["session_mute"] == True:
|
elif buffer.session.settings["sound"]["session_mute"] == True:
|
||||||
buffer.session.settings["sound"]["session_mute"] = False
|
buffer.session.settings["sound"]["session_mute"] = False
|
||||||
output.speak(_(u"Global mute off"), True)
|
output.speak(_(u"Session mute off"), True)
|
||||||
|
|
||||||
def toggle_buffer_mute(self, *args, **kwargs):
|
def toggle_buffer_mute(self, *args, **kwargs):
|
||||||
buffer = self.get_current_buffer()
|
buffer = self.get_current_buffer()
|
||||||
|
@ -10,6 +10,7 @@ left = control+win+left
|
|||||||
right = control+win+right
|
right = control+win+right
|
||||||
next_account = control+win+shift+right
|
next_account = control+win+shift+right
|
||||||
previous_account = control+win+shift+left
|
previous_account = control+win+shift+left
|
||||||
|
show_hide=control+win+w
|
||||||
post_tweet = control+win+n
|
post_tweet = control+win+n
|
||||||
post_reply = control+win+r
|
post_reply = control+win+r
|
||||||
post_retweet = control+win+shift+r
|
post_retweet = control+win+shift+r
|
||||||
@ -43,4 +44,4 @@ edit_keystrokes = control+win+k
|
|||||||
view_user_lists = win+alt+shift+l
|
view_user_lists = win+alt+shift+l
|
||||||
reverse_geocode = control+win+g
|
reverse_geocode = control+win+g
|
||||||
view_reverse_geocode = control+win+shift+g
|
view_reverse_geocode = control+win+shift+g
|
||||||
get_trending_topics = control+win+shift+t
|
get_trending_topics = control+win+shift+t
|
||||||
|
@ -78,7 +78,7 @@ def compose_followers_list(tweet, db, relative_times=True):
|
|||||||
ts2 = _("Unavailable")
|
ts2 = _("Unavailable")
|
||||||
else:
|
else:
|
||||||
ts2 = _("Unavailable")
|
ts2 = _("Unavailable")
|
||||||
return [_(u"%s (@%s). %s followers, %s friends, %s tweets. Last tweet on %s. Joined Twitter on %s") % (tweet["name"], tweet["screen_name"], tweet["followers_count"], tweet["friends_count"], tweet["statuses_count"], ts2, ts)]
|
return [_(u"%s (@%s). %s followers, %s friends, %s tweets. Last tweeted %s. Joined Twitter %s") % (tweet["name"], tweet["screen_name"], tweet["followers_count"], tweet["friends_count"], tweet["statuses_count"], ts2, ts)]
|
||||||
|
|
||||||
def compose_event(data, username):
|
def compose_event(data, username):
|
||||||
if data["event"] == "block":
|
if data["event"] == "block":
|
||||||
|
@ -5,7 +5,7 @@ import widgetUtils
|
|||||||
class textLimited(widgetUtils.BaseDialog):
|
class textLimited(widgetUtils.BaseDialog):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(textLimited, self).__init__(parent=None, *args, **kwargs)
|
super(textLimited, self).__init__(parent=None, *args, **kwargs)
|
||||||
|
self.shift=False
|
||||||
def createTextArea(self, message="", text=""):
|
def createTextArea(self, message="", text=""):
|
||||||
self.panel = wx.Panel(self)
|
self.panel = wx.Panel(self)
|
||||||
self.label = wx.StaticText(self.panel, -1, message)
|
self.label = wx.StaticText(self.panel, -1, message)
|
||||||
@ -16,6 +16,8 @@ class textLimited(widgetUtils.BaseDialog):
|
|||||||
# dc.SetFont(font)
|
# dc.SetFont(font)
|
||||||
# x, y = dc.GetTextExtent("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
|
# x, y = dc.GetTextExtent("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
|
||||||
# self.text.SetSize((x, y))
|
# self.text.SetSize((x, y))
|
||||||
|
self.Bind(wx.EVT_TEXT_ENTER, self.on_enter)
|
||||||
|
self.Bind(wx.EVT_CHAR_HOOK, self.handle_keys)
|
||||||
self.text.SetFocus()
|
self.text.SetFocus()
|
||||||
self.textBox = wx.BoxSizer(wx.HORIZONTAL)
|
self.textBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
self.textBox.Add(self.label, 0, wx.ALL, 5)
|
self.textBox.Add(self.label, 0, wx.ALL, 5)
|
||||||
@ -44,6 +46,16 @@ class textLimited(widgetUtils.BaseDialog):
|
|||||||
def onSelect(self, ev):
|
def onSelect(self, ev):
|
||||||
self.text.SelectAll()
|
self.text.SelectAll()
|
||||||
|
|
||||||
|
def on_enter(self,event):
|
||||||
|
if self.shift==False and hasattr(self,'okButton'):
|
||||||
|
return wx.PostEvent(self.okButton.GetEventHandler(),wx.PyCommandEvent(wx.EVT_BUTTON.typeId,wx.ID_OK))
|
||||||
|
else:
|
||||||
|
return self.text.WriteText('\n')
|
||||||
|
|
||||||
|
def handle_keys(self,event):
|
||||||
|
self.shift=event.ShiftDown()
|
||||||
|
event.Skip()
|
||||||
|
|
||||||
def set_cursor_at_end(self):
|
def set_cursor_at_end(self):
|
||||||
self.text.SetInsertionPoint(len(self.text.GetValue()))
|
self.text.SetInsertionPoint(len(self.text.GetValue()))
|
||||||
|
|
||||||
@ -90,8 +102,6 @@ class tweet(textLimited):
|
|||||||
self.mainBox.Add(self.ok_cancelSizer)
|
self.mainBox.Add(self.ok_cancelSizer)
|
||||||
selectId = wx.NewId()
|
selectId = wx.NewId()
|
||||||
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)
|
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)
|
||||||
self.Bind(wx.EVT_TEXT_ENTER, self.on_enter)
|
|
||||||
self.Bind(wx.EVT_CHAR_HOOK, self.handle_keys)
|
|
||||||
self.accel_tbl = wx.AcceleratorTable([
|
self.accel_tbl = wx.AcceleratorTable([
|
||||||
(wx.ACCEL_CTRL, ord('A'), selectId),
|
(wx.ACCEL_CTRL, ord('A'), selectId),
|
||||||
])
|
])
|
||||||
@ -110,16 +120,8 @@ class tweet(textLimited):
|
|||||||
if openFileDialog.ShowModal() == wx.ID_CANCEL:
|
if openFileDialog.ShowModal() == wx.ID_CANCEL:
|
||||||
return None
|
return None
|
||||||
return open(openFileDialog.GetPath(), "rb")
|
return open(openFileDialog.GetPath(), "rb")
|
||||||
def handle_keys(self,event):
|
|
||||||
self.shift=event.ShiftDown()
|
|
||||||
event.Skip()
|
|
||||||
def on_enter(self,event):
|
|
||||||
if self.shift==False:
|
|
||||||
return wx.PostEvent(self.okButton.GetEventHandler(),wx.PyCommandEvent(wx.EVT_BUTTON.typeId,wx.ID_OK))
|
|
||||||
else:
|
|
||||||
return text.WriteText('\n')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class retweet(tweet):
|
class retweet(tweet):
|
||||||
def createControls(self, title, message, text):
|
def createControls(self, title, message, text):
|
||||||
self.mainBox = wx.BoxSizer(wx.VERTICAL)
|
self.mainBox = wx.BoxSizer(wx.VERTICAL)
|
||||||
|
Loading…
Reference in New Issue
Block a user