mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Added option for remembering state of mention all and long tweet
This commit is contained in:
parent
fac228dec1
commit
d4dadfcdc7
@ -2,6 +2,8 @@
|
||||
|
||||
## changes in this version
|
||||
|
||||
* the checkbox for indicating wether TWBlue will include everyone in a reply or not, will be unchecked by default.
|
||||
* You can request TWBlue to save the state for two checkboxes: Long tweet and mention all, from the global settings dialogue.
|
||||
* For windows 10 users, some keystrokes in the invisible user interface have been changed or merged:
|
||||
* control+Windows+alt+F will be used for toggling between adding and removing a tweet to user's likes. This function will execute the needed action based in the current status for the focused tweet.
|
||||
* TWBlue will show an error if something goes wrong in an audio upload.
|
||||
|
@ -17,6 +17,9 @@ log_level = string(default="error")
|
||||
load_keymap = string(default="default.keymap")
|
||||
donation_dialog_displayed = boolean(default=False)
|
||||
check_for_updates = boolean(default=True)
|
||||
remember_mention_and_longtweet = boolean(default=False)
|
||||
longtweet = boolean(default=false)
|
||||
mention_all = boolean(default=False)
|
||||
|
||||
[proxy]
|
||||
type = string(default="Direct connection")
|
||||
|
@ -137,6 +137,9 @@ class bufferController(object):
|
||||
caption = _(u"Write the tweet here")
|
||||
tweet = messages.tweet(self.session, title, caption, "")
|
||||
if tweet.message.get_response() == widgetUtils.OK:
|
||||
if config.app["app-settings"]["remember_mention_and_longtweet"]:
|
||||
config.app["app-settings"]["longtweet"] = tweet.message.long_tweet.GetValue()
|
||||
config.app.write()
|
||||
text = tweet.message.get_text()
|
||||
if len(text) > 280 and tweet.message.get("long_tweet") == True:
|
||||
if not hasattr(tweet, "attachments"):
|
||||
@ -516,6 +519,10 @@ class baseBufferController(bufferController):
|
||||
title=_("Reply")
|
||||
message = messages.reply(self.session, title, _(u"Reply to %s") % (screen_name,), "", users=users, ids=ids)
|
||||
if message.message.get_response() == widgetUtils.OK:
|
||||
if config.app["app-settings"]["remember_mention_and_longtweet"]:
|
||||
config.app["app-settings"]["longtweet"] = message.message.long_tweet.GetValue()
|
||||
config.app["app-settings"]["mention_all"] = message.message.mentionAll.GetValue()
|
||||
config.app.write()
|
||||
params = {"_sound": "reply_send.ogg", "in_reply_to_status_id": id,}
|
||||
text = message.message.get_text()
|
||||
if twishort_enabled == False:
|
||||
@ -861,6 +868,9 @@ class peopleBufferController(baseBufferController):
|
||||
screen_name = tweet["screen_name"]
|
||||
message = messages.reply(self.session, _(u"Mention"), _(u"Mention to %s") % (screen_name,), "@%s " % (screen_name,), [screen_name,])
|
||||
if message.message.get_response() == widgetUtils.OK:
|
||||
if config.app["app-settings"]["remember_mention_and_longtweet"]:
|
||||
config.app["app-settings"]["longtweet"] = message.message.long_tweet.GetValue()
|
||||
config.app.write()
|
||||
if message.image == None:
|
||||
call_threaded(self.session.api_call, call_name="update_status", _sound="reply_send.ogg", status=message.message.get_text())
|
||||
else:
|
||||
|
@ -7,6 +7,7 @@ import widgetUtils
|
||||
import output
|
||||
import url_shortener
|
||||
import sound
|
||||
import config
|
||||
from pubsub import pub
|
||||
if system == "Windows":
|
||||
from wxUI.dialogs import message, urlList
|
||||
@ -36,6 +37,8 @@ class basicTweet(object):
|
||||
widgetUtils.connect_event(self.message.translateButton, widgetUtils.BUTTON_PRESSED, self.translate)
|
||||
if hasattr(self.message, "long_tweet"):
|
||||
widgetUtils.connect_event(self.message.long_tweet, widgetUtils.CHECKBOX, self.text_processor)
|
||||
if config.app["app-settings"]["remember_mention_and_longtweet"]:
|
||||
self.message.long_tweet.SetValue(config.app["app-settings"]["longtweet"])
|
||||
self.attachments = []
|
||||
|
||||
def translate(self, event=None):
|
||||
@ -151,6 +154,8 @@ class reply(tweet):
|
||||
if len(users) > 0:
|
||||
widgetUtils.connect_event(self.message.mentionAll, widgetUtils.CHECKBOX, self.mention_all)
|
||||
self.message.enable_button("mentionAll")
|
||||
if config.app["app-settings"]["remember_mention_and_longtweet"]:
|
||||
self.message.mentionAll.SetValue(config.app["app-settings"]["mention_all"])
|
||||
self.mention_all()
|
||||
self.message.set_cursor_at_end()
|
||||
self.text_processor()
|
||||
|
@ -68,6 +68,7 @@ class globalSettingsController(object):
|
||||
self.dialog.set_value("general", "disable_sapi5", config.app["app-settings"]["voice_enabled"])
|
||||
self.dialog.set_value("general", "hide_gui", config.app["app-settings"]["hide_gui"])
|
||||
self.dialog.set_value("general", "check_for_updates", config.app["app-settings"]["check_for_updates"])
|
||||
self.dialog.set_value("general", "remember_mention_and_longtweet", config.app["app-settings"]["remember_mention_and_longtweet"])
|
||||
proxyTypes=config.proxyTypes
|
||||
self.dialog.create_proxy([_(u"Direct connection")]+proxyTypes)
|
||||
if config.app["proxy"]["type"] not in proxyTypes:
|
||||
@ -92,7 +93,6 @@ class globalSettingsController(object):
|
||||
kmFile = open(paths.config_path("keymap.keymap"), "w")
|
||||
kmFile.close()
|
||||
self.needs_restart = True
|
||||
|
||||
if config.app["app-settings"]["autostart"] != self.dialog.get_value("general", "autostart") and paths.mode == "installed":
|
||||
config.app["app-settings"]["autostart"] = self.dialog.get_value("general", "autostart")
|
||||
autostart_windows.setAutoStart(application.name, enable=self.dialog.get_value("general", "autostart"))
|
||||
@ -106,6 +106,7 @@ class globalSettingsController(object):
|
||||
config.app["app-settings"]["play_ready_sound"] = self.dialog.get_value("general", "play_ready_sound")
|
||||
config.app["app-settings"]["speak_ready_msg"] = self.dialog.get_value("general", "speak_ready_msg")
|
||||
config.app["app-settings"]["check_for_updates"] = self.dialog.get_value("general", "check_for_updates")
|
||||
config.app["app-settings"]["remember_mention_and_longtweet"] = self.dialog.get_value("general", "remember_mention_and_longtweet")
|
||||
if config.app["proxy"]["type"]!=self.dialog.get_value("proxy", "type") or config.app["proxy"]["server"] != self.dialog.get_value("proxy", "server") or config.app["proxy"]["port"] != self.dialog.get_value("proxy", "port") or config.app["proxy"]["user"] != self.dialog.get_value("proxy", "user") or config.app["proxy"]["password"] != self.dialog.get_value("proxy", "password"):
|
||||
if self.is_started == True:
|
||||
self.needs_restart = True
|
||||
|
@ -34,6 +34,8 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
|
||||
sizer.Add(self.hide_gui, 0, wx.ALL, 5)
|
||||
self.handle_longtweets = wx.CheckBox(self, wx.NewId(), _(u"Use Codeofdusk's longtweet handlers (may decrease client performance)"))
|
||||
sizer.Add(self.handle_longtweets, 0, wx.ALL, 5)
|
||||
self.remember_mention_and_longtweet = wx.CheckBox(self, -1, _(u"Remember state for mention all and long tweet"))
|
||||
sizer.Add(self.remember_mention_and_longtweet, 0, wx.ALL, 5)
|
||||
kmbox = wx.BoxSizer(wx.VERTICAL)
|
||||
km_label = wx.StaticText(self, -1, _(u"Keymap"))
|
||||
self.km = wx.ComboBox(self, -1, choices=keymaps, style=wx.CB_READONLY)
|
||||
|
Loading…
Reference in New Issue
Block a user