mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-02-22 08:31:20 -06:00
Merge branch 'master' of https://github.com/manuelcortez/TWBlue
This commit is contained in:
commit
2b3c7601f2
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
documentation = []
|
||||
documentation.append(_(u"""Documentation for TW Blue 0.46"""))
|
||||
documentation.append(_(u"""Documentation for TW Blue 0.50"""))
|
||||
# Translators: This is the new line character, don't change it in the translations.
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
@ -47,16 +47,16 @@ documentation.append(_(u"""
|
||||
documentation.append(_(u"""First off, it's necessary to authorise the program so it can access your Twitter account and act on your behalf. The authorisation process is quite simple, and the program never gets data such as your username and password. In order to authorise the application, you just need to run the main executable file, called TWBlue.exe (on some computers it may appear simply as TWBlue)."""))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""When executed, if you have not previously configured the program, it will show a dialogue box where it tells you'll be taken to Twitter in order to authorise the application as soon as you press OK. To begin the authorisation process, press the only available button on the box."""))
|
||||
#$documentation.append(_(u"""When executed, if you have not previously configured the program, it will show a dialogue box where it tells you'll be taken to Twitter in order to authorise the application as soon as you press OK. To begin the authorisation process, press the only available button on the box."""))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""Your default browser will open on the Twitter page to request authorisation. Enter your user name and password if you're not already logged in, look for the authorise button, and press it."""))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""Read the instructions you will get if the process is successful. In summary, you will be given a numeric code with several digits you must paste on an edit field open by the application on another window."""))
|
||||
#$documentation.append(_(u"""Read the instructions you will get if the process is successful. In summary, you will be given a numeric code with several digits you must paste on an edit field open by the application on another window."""))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""Paste the verification code, and press the enter key. """))
|
||||
#$documentation.append(_(u"""Paste the verification code, and press the enter key. """))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""If all went well, the application will start playing sounds, indicating your data are being updated."""))
|
||||
@ -65,10 +65,10 @@ documentation.append(_(u"""
|
||||
documentation.append(_(u"""When the process is finished,the program will play another sound, and the screen reader will say "ready"."""))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""## The program's interface {#interface}"""))
|
||||
documentation.append(_(u"""## The program's interface"""))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""The easiest way to describe the graphical interface of the application is a window with a menu bar with four menus (application, tweet, user and help), a list with several elements, and, in most cases, three buttons: tweet, retweet and reply. The actions available for each element are described below."""))
|
||||
documentation.append(_(u"""The easiest way to describe the graphical interface of the application is a window with a menu bar with five menus (application, tweet, user, buffer and help), a list with several elements, and, in most cases, three buttons: tweet, retweet and reply. The actions available for each element are described below."""))
|
||||
documentation.append(_(u"""
|
||||
"""))
|
||||
documentation.append(_(u"""Elements on the lists may be tweets, direct messages or users. TW Blue creates different tabs for each list, which can be sent tweets, main timeline tweets, favourites, or direct messages, and each tab contains a single type of tweet. These tabs are called lists or buffers."""))
|
||||
|
@ -1,8 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
name = 'TW Blue'
|
||||
snapshot = True
|
||||
snapshot = False
|
||||
if snapshot == False:
|
||||
version = "0.48"
|
||||
version = "0.50"
|
||||
update_url = 'http://twblue.com.mx/updates/tw_blue.json'
|
||||
else:
|
||||
version = "6"
|
||||
|
@ -44,13 +44,13 @@ class autocompletionSettings(object):
|
||||
|
||||
def execute_at_startup(window):
|
||||
database = storage.storage()
|
||||
if config.main["mysc"]["save_followers_in_autocompletion_db"] == True:
|
||||
if config.main["mysc"]["save_followers_in_autocompletion_db"] == True and config.main["other_buffers"]["show_followers"] == True:
|
||||
buffer = window.search_buffer("people", "followers")
|
||||
for i in buffer.db.settings[buffer.name_buffer]:
|
||||
database.set_user(i["screen_name"], i["name"], 1)
|
||||
else:
|
||||
database.remove_by_buffer(1)
|
||||
if config.main["mysc"]["save_friends_in_autocompletion_db"] == True:
|
||||
if config.main["mysc"]["save_friends_in_autocompletion_db"] == True and config.main["other_buffers"]["show_friends"] == True:
|
||||
buffer = window.search_buffer("people", "friends")
|
||||
for i in buffer.db.settings[buffer.name_buffer]:
|
||||
database.set_user(i["screen_name"], i["name"], 2)
|
||||
|
@ -127,7 +127,7 @@ class listViewer(wx.Dialog):
|
||||
output.speak(_(u"This list is arready opened."))
|
||||
return
|
||||
listUI = gui.buffers.lists.listPanel(self.nb, self.parent, list_updated["slug"]+"-list", argumento=utils.find_list(list_updated["slug"], self.db.settings["lists"]))
|
||||
self.nb.AddPage(listUI, _(u"List for %s") % (list_updated["slug"],))
|
||||
self.nb.InsertSubPage(self.db.settings["buffers"].index("lists"), listUI, _(u"List for %s") % (list_updated["slug"],))
|
||||
self.db.settings["buffers"].append(list_updated["slug"]+"-list")
|
||||
num = listUI.start_streams()
|
||||
listUI.put_items(num)
|
||||
|
@ -339,6 +339,7 @@ class mainFrame(wx.Frame):
|
||||
self.Bind(event.MyEVT_STARTED, self.onInit)
|
||||
self.Bind(event.EVT_RESULT, self.onMemberAdded)
|
||||
pub.subscribe(self.listen_streamerror, "streamError")
|
||||
pub.subscribe(self.listen_for_friends, "friendsReceived")
|
||||
call_threaded(self.init, run_streams=True)
|
||||
|
||||
def init(self, run_streams=False):
|
||||
@ -1072,12 +1073,15 @@ class mainFrame(wx.Frame):
|
||||
|
||||
def listen_streamerror(self):
|
||||
log.error("There is a connection error")
|
||||
print "Connection error"
|
||||
if hasattr(self, "stream"):
|
||||
self.stream.disconnect()
|
||||
del self.stream
|
||||
if hasattr(self, "stream2"):
|
||||
self.stream2.disconnect()
|
||||
del self.stream2
|
||||
del self.stream
|
||||
|
||||
def listen_for_friends(self):
|
||||
self.stream2.set_friends(self.stream.friends)
|
||||
|
||||
### Close App
|
||||
def Destroy(self):
|
||||
|
@ -42,11 +42,12 @@ class streamer(TwythonStreamer):
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
def set_friends(self, friends):
|
||||
self.friends = friends
|
||||
|
||||
def on_success(self, data):
|
||||
try:
|
||||
if data.has_key("text") and utils.is_allowed(data):
|
||||
self.check_tls(data)
|
||||
elif "friends" in data:
|
||||
self.friends = data["friends"]
|
||||
except:
|
||||
pass
|
@ -8,6 +8,7 @@ import config
|
||||
import logging as original_logger
|
||||
log = original_logger.getLogger("MainStream")
|
||||
import output
|
||||
from wx.lib.pubsub import pub
|
||||
|
||||
class streamer(TwythonStreamer):
|
||||
def __init__(self, app_key, app_secret, oauth_token, oauth_token_secret, timeout=300, retry_count=None, retry_in=10, client_args=None, handlers=None, chunk_size=1, parent=None):
|
||||
@ -105,6 +106,7 @@ class streamer(TwythonStreamer):
|
||||
self.process_dm(data)
|
||||
elif "friends" in data:
|
||||
self.friends = data["friends"]
|
||||
pub.sendMessage("friendsReceived")
|
||||
elif "text" in data and utils.is_allowed(data) == True:
|
||||
if data["user"]["id"] in self.muted_users: return
|
||||
self.check_mentions(data)
|
||||
|
@ -13,6 +13,8 @@ else:
|
||||
languageHandler.setLanguage("system")
|
||||
import platform
|
||||
system = platform.system()
|
||||
import logging as original_logger
|
||||
log = original_logger.getLogger("events")
|
||||
|
||||
def prettydate(d):
|
||||
""" Converts a string to the relative time."""
|
||||
@ -224,7 +226,9 @@ def compose_event(data, username):
|
||||
elif data["event"] == "list_user_unsubscribed":
|
||||
if data["source"]["screen_name"] == username: event = _(u"You've unsubscribed from the list %s, which is owned by %s(@%s)") % (data["target_object"]["name"], data["target"]["name"], data["target"]["screen_name"])
|
||||
else: event = _("You've been unsubscribed from the list %s, which is owned by %s(@%s)") % (data["target_object"]["name"], data["source"]["name"], data["source"]["screen_name"])
|
||||
else: event = _("Unknown")
|
||||
else:
|
||||
log.error("event: %s\n target: %s\n source: %s\n" % (data["event"], data["target"], data["source"]))
|
||||
event = _("Unknown")
|
||||
# output.speak(event)
|
||||
return [time.strftime("%I:%M %p"), event]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Define paths for a regular use, if there are not paths for python32 or 64, these commands will be taken.
|
||||
pythonpath32="C:/python27x86"
|
||||
pythonpath64="C:/python27"
|
||||
pythonpath32="/C/python27x86"
|
||||
pythonpath64="/C/python27"
|
||||
nsyspath=$PROGRAMFILES/NSIS
|
||||
|
||||
help () {
|
||||
@ -46,10 +46,10 @@ if [ -d dist/ ];
|
||||
rm -rf dist
|
||||
fi
|
||||
$pythonpath32/python.exe "setup.py" "py2exe" "--quiet"
|
||||
mv -f dist ../scripts/TWBlue64
|
||||
mv -f dist ../scripts/TWBlue
|
||||
rm -rf build
|
||||
$pythonpath64/python.exe "setup.py" "py2exe" "--quiet"
|
||||
mv -f dist ../scripts/TWBlue
|
||||
mv -f dist ../scripts/TWBlue64
|
||||
rm -rf build
|
||||
cd ../scripts
|
||||
$nsispath/Unicode/makensis.exe "twblue.nsi"
|
Loading…
x
Reference in New Issue
Block a user