diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 1525208e..0015100f 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -1013,13 +1013,11 @@ class Controller(object): def interact(self): "Select the best action for the currently focused tweet (audio, geocode, URL, etc)." 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) tweet = buffer.get_tweet() url=None 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: url=urls[0] elif len(urls) > 1: @@ -1294,7 +1292,7 @@ class Controller(object): output.speak(_(u"Session mute on"), True) elif buffer.session.settings["sound"]["session_mute"] == True: 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): buffer = self.get_current_buffer() diff --git a/src/keymaps/Qwitter.keymap b/src/keymaps/Qwitter.keymap index 46bb0ea2..c95b6936 100644 --- a/src/keymaps/Qwitter.keymap +++ b/src/keymaps/Qwitter.keymap @@ -10,6 +10,7 @@ left = control+win+left right = control+win+right next_account = control+win+shift+right previous_account = control+win+shift+left +show_hide=control+win+w post_tweet = control+win+n post_reply = control+win+r post_retweet = control+win+shift+r @@ -43,4 +44,4 @@ edit_keystrokes = control+win+k view_user_lists = win+alt+shift+l reverse_geocode = control+win+g view_reverse_geocode = control+win+shift+g -get_trending_topics = control+win+shift+t \ No newline at end of file +get_trending_topics = control+win+shift+t diff --git a/src/twitter/compose.py b/src/twitter/compose.py index fae41fe9..351ca1c5 100644 --- a/src/twitter/compose.py +++ b/src/twitter/compose.py @@ -78,7 +78,7 @@ def compose_followers_list(tweet, db, relative_times=True): ts2 = _("Unavailable") else: 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): if data["event"] == "block": diff --git a/src/wxUI/dialogs/message.py b/src/wxUI/dialogs/message.py index 1b12d92c..7f27fadf 100644 --- a/src/wxUI/dialogs/message.py +++ b/src/wxUI/dialogs/message.py @@ -5,7 +5,7 @@ import widgetUtils class textLimited(widgetUtils.BaseDialog): def __init__(self, *args, **kwargs): super(textLimited, self).__init__(parent=None, *args, **kwargs) - + self.shift=False def createTextArea(self, message="", text=""): self.panel = wx.Panel(self) self.label = wx.StaticText(self.panel, -1, message) @@ -16,6 +16,8 @@ class textLimited(widgetUtils.BaseDialog): # dc.SetFont(font) # x, y = dc.GetTextExtent("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") # 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.textBox = wx.BoxSizer(wx.HORIZONTAL) self.textBox.Add(self.label, 0, wx.ALL, 5) @@ -44,6 +46,16 @@ class textLimited(widgetUtils.BaseDialog): def onSelect(self, ev): 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): self.text.SetInsertionPoint(len(self.text.GetValue())) @@ -90,8 +102,6 @@ class tweet(textLimited): self.mainBox.Add(self.ok_cancelSizer) selectId = wx.NewId() 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([ (wx.ACCEL_CTRL, ord('A'), selectId), ]) @@ -110,16 +120,8 @@ class tweet(textLimited): if openFileDialog.ShowModal() == wx.ID_CANCEL: return None 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): def createControls(self, title, message, text): self.mainBox = wx.BoxSizer(wx.VERTICAL)