mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
#33: Miscelaneous cleanup.
This commit is contained in:
parent
2aceab527e
commit
0ddc20ea7c
@ -46,7 +46,7 @@ class bufferController(object):
|
|||||||
|
|
||||||
def get_event(self, ev):
|
def get_event(self, ev):
|
||||||
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "audio"
|
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "audio"
|
||||||
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "url"
|
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "interact"
|
||||||
elif ev.GetKeyCode() == wx.WXK_F5: event = "volume_down"
|
elif ev.GetKeyCode() == wx.WXK_F5: event = "volume_down"
|
||||||
elif ev.GetKeyCode() == wx.WXK_F6: event = "volume_up"
|
elif ev.GetKeyCode() == wx.WXK_F6: event = "volume_up"
|
||||||
elif ev.GetKeyCode() == wx.WXK_DELETE and ev.ShiftDown(): event = "clear_list"
|
elif ev.GetKeyCode() == wx.WXK_DELETE and ev.ShiftDown(): event = "clear_list"
|
||||||
@ -430,7 +430,7 @@ class baseBufferController(bufferController):
|
|||||||
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)."
|
||||||
#debugging (remove when issue is closed).
|
#debugging (remove when issue is closed).
|
||||||
output.speak("Interact method invoked",True)
|
print "Interact method invoked"
|
||||||
tweet = self.get_tweet()
|
tweet = self.get_tweet()
|
||||||
urls = utils.find_urls(tweet)
|
urls = utils.find_urls(tweet)
|
||||||
#handle audio-only (no weblinks) tweets.
|
#handle audio-only (no weblinks) tweets.
|
||||||
@ -651,7 +651,7 @@ class peopleBufferController(baseBufferController):
|
|||||||
self.session.db[self.name]["cursor"] = -1
|
self.session.db[self.name]["cursor"] = -1
|
||||||
self.buffer.list.clear()
|
self.buffer.list.clear()
|
||||||
|
|
||||||
def url(self):
|
def interact(self):
|
||||||
user.profileController(self.session, user=self.get_right_tweet()["screen_name"])
|
user.profileController(self.session, user=self.get_right_tweet()["screen_name"])
|
||||||
|
|
||||||
class searchBufferController(baseBufferController):
|
class searchBufferController(baseBufferController):
|
||||||
@ -774,7 +774,7 @@ class trendsBufferController(bufferController):
|
|||||||
elif dlg == widgetUtils.NO:
|
elif dlg == widgetUtils.NO:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def url(self, *args, **kwargs):
|
def interact(self, *args, **kwargs):
|
||||||
self.searchfunction(value=self.get_message())
|
self.searchfunction(value=self.get_message())
|
||||||
|
|
||||||
class conversationBufferController(searchBufferController):
|
class conversationBufferController(searchBufferController):
|
||||||
|
@ -1010,6 +1010,10 @@ class Controller(object):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def interact(self, *args, **kwargs):
|
||||||
|
buffer = self.get_current_buffer()
|
||||||
|
return buffer.interact()
|
||||||
|
|
||||||
def url(self, *args, **kwargs):
|
def url(self, *args, **kwargs):
|
||||||
buffer = self.get_current_buffer()
|
buffer = self.get_current_buffer()
|
||||||
buffer.url()
|
buffer.url()
|
||||||
|
Loading…
Reference in New Issue
Block a user