mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Merge branch 'next-gen' of https://github.com/manuelcortez/TWBlue into next-gen
This commit is contained in:
commit
96671645bb
@ -10,7 +10,7 @@ else:
|
||||
author = u"Manuel Cortéz"
|
||||
authorEmail = "manuel@manuelcortez.net"
|
||||
copyright = u"copyright (C) 2013-2015, Manuel cortéz"
|
||||
description = u"TW Blue is an app designed to use Twitter simply and efficiently while using minimal system resources. This app provides access to most Twitter features."
|
||||
description = unicode(name+" is an app designed to use Twitter simply and efficiently while using minimal system resources. This app provides access to most Twitter features.")
|
||||
translators = [u"Bryner Villalobos, Bill Dengler (English)", u"Mohammed Al Shara (Arabic)", u"Joan Rabat, Juan Carlos Rivilla (Catalan)", u"Manuel cortéz (Spanish)", u"Sukil Etxenike Arizaleta (Basque)", u"Jani Kinnunen (finnish)", u"Rémy Ruiz (French)", u"Alba Quinteiro (Galician)", u"Steffen Schultz (German)", u"Robert Osztolykan (Hungarian)", u"Paweł Masarczyk (Polish)", u"Odenilton Júnior Santos (Portuguese)", u"Alexander Jaszyn (Russian)", u"Burak (Turkish)"]
|
||||
url = u"http://twblue.es"
|
||||
report_bugs_url = "http://twblue.es/bugs/api/soap/mantisconnect.php?wsdl"
|
||||
|
@ -2,15 +2,16 @@
|
||||
import argparse
|
||||
import paths
|
||||
import logging
|
||||
import application
|
||||
log = logging.getLogger("commandlineLauncher")
|
||||
|
||||
parser = argparse.ArgumentParser(description="TW Blue command line launcher")
|
||||
parser = argparse.ArgumentParser(description=application.name+" command line launcher")
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
group.add_argument("-p", "--portable", help="Use TW Blue as a portable application.", action="store_true", default=True)
|
||||
group.add_argument("-i", "--installed", help="Use TW Blue as an installed application. Config files will be saved in the user data directory", action="store_true")
|
||||
parser.add_argument("-d", "--data-directory", action="store", dest="directory", help="Specifies the directory where TW Blue saves userdata.")
|
||||
group.add_argument("-p", "--portable", help="Use " + application.name + " as a portable application.", action="store_true", default=True)
|
||||
group.add_argument("-i", "--installed", help="Use " + application.name + " as an installed application. Config files will be saved in the user data directory", action="store_true")
|
||||
parser.add_argument("-d", "--data-directory", action="store", dest="directory", help="Specifies the directory where " + application.name + " saves userdata.")
|
||||
args = parser.parse_args()
|
||||
log.debug("Starting TWBlue with the following arguments: installed = %s, portable = %s and directory = %s" % (args.installed, args.portable, args.directory))
|
||||
log.debug("Starting " + application.name + " with the following arguments: installed = %s, portable = %s and directory = %s" % (args.installed, args.portable, args.directory))
|
||||
if args.installed == True: paths.mode = "installed"
|
||||
elif args.portable == True:
|
||||
paths.mode = "portable"
|
||||
|
@ -5,6 +5,7 @@ import os
|
||||
import exceptions
|
||||
import dropbox
|
||||
import logging
|
||||
import application
|
||||
from keys import keyring
|
||||
from utils import *
|
||||
from dropbox.rest import ErrorResponse
|
||||
@ -51,7 +52,7 @@ class dropboxLogin(object):
|
||||
return self.flow.start()
|
||||
|
||||
def authorise(self, code):
|
||||
log.debug("Authorising TWBlue in Dropbox...")
|
||||
log.debug("Authorising " + application.name + " to Dropbox...")
|
||||
access_token, user_id = self.flow.finish(code)
|
||||
log.debug("Saving tokens...")
|
||||
self.config["services"]["dropbox_token"] = access_token
|
||||
@ -64,7 +65,7 @@ class dropboxUploader(object):
|
||||
self.client = dropbox.client.DropboxClient(config["services"]["dropbox_token"])
|
||||
else:
|
||||
log.error("Dropbox is not authorised for this session.")
|
||||
raise UnauthorisedError("You need authorise TWBlue")
|
||||
raise UnauthorisedError("You need to authorise " + application.name)
|
||||
self.filename = filename
|
||||
self.short_url = short_url
|
||||
self.file = open(self.filename, "rb")
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
import application
|
||||
class autocompletionSettingsDialog(widgetUtils.BaseDialog):
|
||||
def __init__(self):
|
||||
super(autocompletionSettingsDialog, self).__init__(parent=None, id=-1, title=_(u"Autocomplete users’ settings"))
|
||||
@ -23,4 +23,4 @@ class autocompletionSettingsDialog(widgetUtils.BaseDialog):
|
||||
self.SetClientSize(sizer.CalcMin())
|
||||
|
||||
def show_success_dialog():
|
||||
wx.MessageDialog(None, _(u"TWBlue's database of users has been updated."), _(u"Done"), wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _(uapplication.name+"'s database of users has been updated."), _(u"Done"), wx.OK).ShowModal()
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from gi.repository import Gtk
|
||||
|
||||
import application
|
||||
def retweet_question(parent):
|
||||
dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Retweet"))
|
||||
dialog.format_secondary_text(_(u"Would you like to add a comment to this tweet?"))
|
||||
@ -17,13 +17,13 @@ def delete_tweet_dialog(parent):
|
||||
|
||||
def exit_dialog(parent):
|
||||
dialog = Gtk.MessageDialog(parent, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Exit"))
|
||||
dialog.format_secondary_text(_(u"Do you really want to close TW Blue?"))
|
||||
dialog.format_secondary_text(_(u"Do you really want to close " + application.name + "?"))
|
||||
answer = dialog.run()
|
||||
dialog.destroy()
|
||||
return answer
|
||||
|
||||
def needs_restart():
|
||||
wx.MessageDialog(None, _(u"The application requires to be restarted to save these changes. Press OK to do it now."), _("Restart TW Blue"), wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _(unicode(application.name+" must be restarted to save these changes. Press OK to restart now.")), _("Restart " + application.name), wx.OK).ShowModal()
|
||||
|
||||
def delete_user_from_db():
|
||||
return wx.MessageDialog(None, _(u"Are you sure you want to delete this user from the database? This user will not appear on the autocomplete results anymore."), _(u"Confirm"), wx.YES_NO|wx.ICON_QUESTION).ShowModal()
|
||||
|
@ -2,7 +2,7 @@
|
||||
import baseDialog
|
||||
import wx
|
||||
import logging as original_logger
|
||||
|
||||
import application
|
||||
class general(wx.Panel, baseDialog.BaseWXDialog):
|
||||
def __init__(self, parent, languages):
|
||||
super(general, self).__init__(parent)
|
||||
@ -14,13 +14,13 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
|
||||
langBox.Add(language, 0, wx.ALL, 5)
|
||||
langBox.Add(self.language, 0, wx.ALL, 5)
|
||||
sizer.Add(langBox, 0, wx.ALL, 5)
|
||||
self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting TwBlue?"))
|
||||
self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting " + application.name))
|
||||
sizer.Add(self.ask_at_exit, 0, wx.ALL, 5)
|
||||
self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shorcuts on the GUI"))
|
||||
self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shortcuts while GUI is visible"))
|
||||
sizer.Add(self.use_invisible_shorcuts, 0, wx.ALL, 5)
|
||||
self.disable_sapi5 = wx.CheckBox(self, -1, _(u"Activate Sapi5 when any other screen reader is not being run"))
|
||||
sizer.Add(self.disable_sapi5, 0, wx.ALL, 5)
|
||||
self.hide_gui = wx.CheckBox(self, -1, _(u"Activate the auto-start of the invisible interface"))
|
||||
self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch"))
|
||||
sizer.Add(self.hide_gui, 0, wx.ALL, 5)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
|
@ -99,8 +99,8 @@ class mainFrame(Gtk.Window):
|
||||
self.changelog = Gtk.MenuItem(label="What's new in this version?")
|
||||
self.check_for_updates = Gtk.MenuItem(label="Check for updates")
|
||||
self.reportError = Gtk.MenuItem(label="Report an error")
|
||||
self.visit_website = Gtk.MenuItem(label="TWBlue's website")
|
||||
self.about = Gtk.MenuItem(label="ABout TWBlue")
|
||||
self.visit_website = Gtk.MenuItem(label=application.name+"'s website")
|
||||
self.about = Gtk.MenuItem(label="ABout "+application.name)
|
||||
self.append_to_menu(help, self.doc, self.sounds_tutorial, self.changelog, self.check_for_updates, self.reportError, self.visit_website, self.about)
|
||||
help_menu = Gtk.MenuItem(label="Help")
|
||||
help_menu.set_submenu(help)
|
||||
@ -110,7 +110,7 @@ class mainFrame(Gtk.Window):
|
||||
### MAIN
|
||||
def __init__(self):
|
||||
""" Main function of this class."""
|
||||
super(mainFrame, self).__init__(title="TW Blue")
|
||||
super(mainFrame, self).__init__(title=application.name)
|
||||
self.accel_group = Gtk.AccelGroup()
|
||||
self.add_accel_group(self.accel_group)
|
||||
self.box = Gtk.VBox()
|
||||
@ -203,4 +203,4 @@ class mainFrame(Gtk.Window):
|
||||
getattr(self, menuitem).Check(check)
|
||||
|
||||
def no_update_available():
|
||||
wx.MessageDialog(None, _(u"Your TW Blue version is up to date"), _(u"Update"), style=wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _(u"Your " + application.name + " version is up to date"), _(u"Update"), style=wx.OK).ShowModal()
|
||||
|
@ -44,7 +44,7 @@ class reportBug(object):
|
||||
try:
|
||||
client = Client(application.report_bugs_url)
|
||||
issue = client.factory.create('IssueData')
|
||||
issue.project.name = "TWBlue"
|
||||
issue.project.name = application.name
|
||||
issue.project.id = 0
|
||||
issue.summary = self.dialog.get("summary"),
|
||||
issue.description = "Reported by @%s\n\n" % (self.user_name) + self.dialog.get("description")
|
||||
|
@ -18,7 +18,7 @@
|
||||
############################################################
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
import application
|
||||
class reportBugDialog(widgetUtils.BaseDialog):
|
||||
def __init__(self, categories, reproducibilities, severities):
|
||||
super(reportBugDialog, self).__init__(parent=None, id=wx.NewId())
|
||||
@ -66,7 +66,7 @@ class reportBugDialog(widgetUtils.BaseDialog):
|
||||
severityB.Add(severityLabel, 0, wx.ALL, 5)
|
||||
severityB.Add(self.severity, 0, wx.ALL, 5)
|
||||
sizer.Add(severityB, 0, wx.ALL, 5)
|
||||
self.agree = wx.CheckBox(panel, -1, _(u"I know that the TW Blue bug system will get my Twitter username to contact me and fix the bug quickly"))
|
||||
self.agree = wx.CheckBox(panel, -1, _(u"I know that the " + application.name + " bug system will get my Twitter username to contact me and fix the bug quickly"))
|
||||
self.agree.SetValue(False)
|
||||
sizer.Add(self.agree, 0, wx.ALL, 5)
|
||||
self.ok = wx.Button(panel, wx.ID_OK, _(u"Send report"))
|
||||
|
@ -1,20 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
actions = {
|
||||
"up": _(u"Go up up on the current list"),
|
||||
"down": _(u"Go down up on the current list"),
|
||||
"left": _(u"Go to the previous tab"),
|
||||
"right": _(u"Go to the next tab"),
|
||||
"up": _(u"Go up in the current buffer"),
|
||||
"down": _(u"Go down in the current buffer"),
|
||||
"left": _(u"Go to the previous buffer"),
|
||||
"right": _(u"Go to the next buffer"),
|
||||
"next_account": _(u"Change to the next account"),
|
||||
"previous_account": _(u"Change to the previous account"),
|
||||
"show_hide": _(u"Show the graphical interface"),
|
||||
"show_hide": _(u"Show or hide the GUI"),
|
||||
"post_tweet": _(u"New tweet"),
|
||||
"post_reply": _(u"Reply to a tweet"),
|
||||
"post_reply": _(u"Reply"),
|
||||
"post_retweet": _(u"Retweet"),
|
||||
"send_dm": _(u"Send direct message"),
|
||||
"add_to_favourites": _(u"Mark as favourite"),
|
||||
"remove_from_favourites": _(u"Remove from favourites"),
|
||||
"follow": _(u"Open the actions dialogue"),
|
||||
"follow": _(u"Open the user actions dialogue"),
|
||||
"user_details": _(u"See user details"),
|
||||
"view_item": _(u"Show tweet"),
|
||||
"exit": _(u"Quit"),
|
||||
@ -30,20 +29,20 @@ actions = {
|
||||
"go_page_down": _(u"Move 20 elements down on the current list"),
|
||||
"update_profile": _(u"Edit profile"),
|
||||
"delete": _(u"Remove a tweet or direct message"),
|
||||
"clear_buffer": _(u"Empty the buffer removing all the elements"),
|
||||
"repeat_item": _(u"Listen to the current message"),
|
||||
"clear_buffer": _(u"Empty the current buffer"),
|
||||
"repeat_item": _(u"Repeat last item"),
|
||||
"copy_to_clipboard": _(u"Copy to clipboard"),
|
||||
"add_to_list": _(u"Add to list"),
|
||||
"remove_from_list": _(u"Remove from list"),
|
||||
"toggle_buffer_mute": _(u"Mute/unmute the active buffer"),
|
||||
"toggle_session_mute": _(u"Globally mute/unmute the current account in TWBlue"),
|
||||
"toggle_session_mute": _(u"Globally mute/unmute the current account"),
|
||||
"toggle_autoread": _(u"toggle the automatic reading of incoming tweets in the active buffer"),
|
||||
"search": _(u"Search on twitter"),
|
||||
"edit_keystrokes": _(u"Show the keystroke editor"),
|
||||
"view_user_lists": _(u"Show lists for a specified user"),
|
||||
"get_more_items": _(u"load previous items to any buffer"),
|
||||
"reverse_geocode": _(u"Get location of any tweet"),
|
||||
"view_reverse_geocode": _(u"Display the tweet's location in a dialog"),
|
||||
"get_trending_topics": _(u"Create a buffer for displaying trends for a desired place"),
|
||||
"open_conversation": _(u"Opens up a conversation buffer"),
|
||||
"reverse_geocode": _(u"Get geolocation"),
|
||||
"view_reverse_geocode": _(u"Display the tweet's geolocation in a dialog"),
|
||||
"get_trending_topics": _(u"Create a trending topics buffer"),
|
||||
"open_conversation": _(u"View conversation"),
|
||||
}
|
@ -49,7 +49,7 @@ if system == "Linux":
|
||||
log = logging.getLogger("main")
|
||||
|
||||
def setup():
|
||||
log.debug("Starting TWBlue %s" % (application.version,))
|
||||
log.debug("Starting " + application.name + " %s" % (application.version,))
|
||||
config.setup()
|
||||
log.debug("Using %s %s" % (platform.system(), platform.architecture()[0]))
|
||||
log.debug("Application path is %s" % (paths.app_path(),))
|
||||
|
@ -1,13 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import wx
|
||||
from multiplatform_widgets import widgets
|
||||
|
||||
import application
|
||||
class sessionManagerWindow(wx.Dialog):
|
||||
def __init__(self):
|
||||
super(sessionManagerWindow, self).__init__(parent=None, title="Session manager", size=wx.DefaultSize)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
label = wx.StaticText(panel, -1, u"Select a twitter account to start TW Blue", size=wx.DefaultSize)
|
||||
label = wx.StaticText(panel, -1, u"Select a twitter account to start " + application.name, size=wx.DefaultSize)
|
||||
listSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.list = widgets.list(panel, u"Account", style=wx.LC_SINGLE_SEL|wx.LC_REPORT)
|
||||
listSizer.Add(label, 0, wx.ALL, 5)
|
||||
|
@ -12,7 +12,7 @@ import platform
|
||||
import output
|
||||
system = platform.system()
|
||||
from mysc.repeating_timer import RepeatingTimer
|
||||
|
||||
import application
|
||||
URLPlayer = None
|
||||
|
||||
def setup():
|
||||
@ -46,7 +46,7 @@ class soundSystem(object):
|
||||
self.path = paths.sound_path("default")
|
||||
self.soundpack_OK = True
|
||||
else:
|
||||
log.error("Path for the current soundpack does not exist and the default soundpack is deleted, TWBlue will not play sounds.")
|
||||
log.error("The current soundpack could not be found and the default soundpack has been deleted, " + application.name + " will not play sounds.")
|
||||
self.soundpack_OK = False
|
||||
|
||||
def __init__(self, soundConfig):
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import BaseHTTPServer
|
||||
import application
|
||||
from urlparse import urlparse, parse_qs
|
||||
|
||||
logged = False
|
||||
@ -16,5 +17,5 @@ class handler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
params = parse_qs(urlparse(self.path).query)
|
||||
global verifier
|
||||
verifier = params.get('oauth_verifier', [None])[0]
|
||||
self.wfile.write("You have successfully logged in to Twitter with TW Blue. "
|
||||
self.wfile.write("You have successfully logged into Twitter with" + application.name + ". "
|
||||
"You can close this window now.")
|
@ -27,4 +27,4 @@ def progress_callback(total_downloaded, total_size):
|
||||
progress_dialog.Update((total_downloaded*100)/total_size, _(u"Updating... %s of %s") % (str(utils.convert_bytes(total_downloaded)), str(utils.convert_bytes(total_size))))
|
||||
|
||||
def update_finished():
|
||||
ms = wx.MessageDialog(None, _(u"The new TWBlue version has been downloaded and installed. Press OK to start the application."), _(u"Done!")).ShowModal()
|
||||
ms = wx.MessageDialog(None, _(u"The update has been downloaded and installed successfully. Press OK to continue."), _(u"Done!")).ShowModal()
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import wx
|
||||
|
||||
import application
|
||||
def retweet_question(parent):
|
||||
return wx.MessageDialog(parent, _(u"Would you like to add a comment to this tweet?"), _("Retweet"), wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION).ShowModal()
|
||||
|
||||
@ -8,7 +8,7 @@ def delete_tweet_dialog(parent):
|
||||
return wx.MessageDialog(parent, _(u"Do you really want to delete this message? It will be eliminated from Twitter as well."), _(u"Delete"), wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
|
||||
def exit_dialog(parent):
|
||||
dlg = wx.MessageDialog(parent, _(u"Do you really want to close TW Blue?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION)
|
||||
dlg = wx.MessageDialog(parent, _(u"Do you really want to close " + application.name + "?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION)
|
||||
return dlg.ShowModal()
|
||||
|
||||
def needs_restart():
|
||||
|
Loading…
Reference in New Issue
Block a user