Initial cleanup after automated refactoring.

This commit is contained in:
Bill Dengler
2017-06-17 00:58:38 +00:00
parent 9677d996d1
commit 8a05cd5600
92 changed files with 1850 additions and 2365 deletions

View File

@@ -1,2 +1,2 @@
from __future__ import absolute_import
from .keystrokeEditor import KeystrokeEditor

View File

@@ -1,56 +1,56 @@
# -*- coding: utf-8 -*-
actions = {
"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"Focus the next session"),
"previous_account": _(u"Focus the previous session"),
"show_hide": _(u"Show or hide the GUI"),
"post_tweet": _(u"New tweet"),
"post_reply": _(u"Reply"),
"post_retweet": _(u"Retweet"),
"send_dm": _(u"Send direct message"),
"add_to_favourites": _(u"Like a tweet"),
"remove_from_favourites": _(u"Unlike a tweet"),
"follow": _(u"Open the user actions dialogue"),
"user_details": _(u"See user details"),
"view_item": _(u"Show tweet"),
"exit": _(u"Quit"),
"open_timeline": _(u"Open user timeline"),
"remove_buffer": _(u"Destroy buffer"),
"interact": _(u"Interact with the currently focused tweet."),
"url": _(u"Open URL"),
"volume_up": _(u"Increase volume by 5%"),
"volume_down": _(u"Decrease volume by 5%"),
"go_home": _(u"Jump to the first element of a buffer"),
"go_end": _(u"Jump to the last element of the current buffer"),
"go_page_up": _(u"Jump 20 elements up in the current buffer"),
"go_page_down": _(u"Jump 20 elements down in the current buffer"),
"update_profile": _(u"Edit profile"),
"delete": _(u"Delete a tweet or direct 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"Mute/unmute the current session"),
"toggle_autoread": _(u"toggle the automatic reading of incoming tweets in the active buffer"),
"search": _(u"Search on twitter"),
"find": _(u"Find a string in the currently focused buffer"),
"edit_keystrokes": _(u"Show the keystroke editor"),
"view_user_lists": _(u"Show lists for a specified user"),
"get_more_items": _(u"load previous items"),
"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"),
"check_for_updates": _(u"Check and download updates"),
"lists_manager": _(u"Opens the list manager, which allows you to create, edit, delete and open lists in buffers."),
"configuration": _(u"Opens the global settings dialogue"),
"accountConfiguration": _(u"Opens the account settings dialogue"),
"audio": _(u"Try to play an audio file"),
"update_buffer": _(u"Updates the buffer and retrieves possible lost items there."),
"ocr_image": _(u"Extracts the text from a picture and displays the result in a dialog."),
# -*- coding: utf-8 -*-
actions = {
"up": _("Go up in the current buffer"),
"down": _("Go down in the current buffer"),
"left": _("Go to the previous buffer"),
"right": _("Go to the next buffer"),
"next_account": _("Focus the next session"),
"previous_account": _("Focus the previous session"),
"show_hide": _("Show or hide the GUI"),
"post_tweet": _("New tweet"),
"post_reply": _("Reply"),
"post_retweet": _("Retweet"),
"send_dm": _("Send direct message"),
"add_to_favourites": _("Like a tweet"),
"remove_from_favourites": _("Unlike a tweet"),
"follow": _("Open the user actions dialogue"),
"user_details": _("See user details"),
"view_item": _("Show tweet"),
"exit": _("Quit"),
"open_timeline": _("Open user timeline"),
"remove_buffer": _("Destroy buffer"),
"interact": _("Interact with the currently focused tweet."),
"url": _("Open URL"),
"volume_up": _("Increase volume by 5%"),
"volume_down": _("Decrease volume by 5%"),
"go_home": _("Jump to the first element of a buffer"),
"go_end": _("Jump to the last element of the current buffer"),
"go_page_up": _("Jump 20 elements up in the current buffer"),
"go_page_down": _("Jump 20 elements down in the current buffer"),
"update_profile": _("Edit profile"),
"delete": _("Delete a tweet or direct message"),
"clear_buffer": _("Empty the current buffer"),
"repeat_item": _("Repeat last item"),
"copy_to_clipboard": _("Copy to clipboard"),
"add_to_list": _("Add to list"),
"remove_from_list": _("Remove from list"),
"toggle_buffer_mute": _("Mute/unmute the active buffer"),
"toggle_session_mute": _("Mute/unmute the current session"),
"toggle_autoread": _("toggle the automatic reading of incoming tweets in the active buffer"),
"search": _("Search on twitter"),
"find": _("Find a string in the currently focused buffer"),
"edit_keystrokes": _("Show the keystroke editor"),
"view_user_lists": _("Show lists for a specified user"),
"get_more_items": _("load previous items"),
"reverse_geocode": _("Get geolocation"),
"view_reverse_geocode": _("Display the tweet's geolocation in a dialog"),
"get_trending_topics": _("Create a trending topics buffer"),
"open_conversation": _("View conversation"),
"check_for_updates": _("Check and download updates"),
"lists_manager": _("Opens the list manager, which allows you to create, edit, delete and open lists in buffers."),
"configuration": _("Opens the global settings dialogue"),
"accountConfiguration": _("Opens the account settings dialogue"),
"audio": _("Try to play an audio file"),
"update_buffer": _("Updates the buffer and retrieves possible lost items there."),
"ocr_image": _("Extracts the text from a picture and displays the result in a dialog."),
}

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from builtins import object
import widgetUtils
import config

View File

@@ -5,20 +5,20 @@ from wxUI.dialogs import baseDialog
class keystrokeEditorDialog(baseDialog.BaseWXDialog):
def __init__(self):
super(keystrokeEditorDialog, self).__init__(parent=None, id=-1, title=_(u"Keystroke editor"))
super(keystrokeEditorDialog, self).__init__(parent=None, id=-1, title=_("Keystroke editor"))
panel = wx.Panel(self)
self.actions = []
sizer = wx.BoxSizer(wx.VERTICAL)
keysText = wx.StaticText(panel, -1, _(u"Select a keystroke to edit"))
self.keys = widgets.list(self, _(u"Action"), _(u"Keystroke"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL, size=(400, 450))
keysText = wx.StaticText(panel, -1, _("Select a keystroke to edit"))
self.keys = widgets.list(self, _("Action"), _("Keystroke"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL, size=(400, 450))
self.keys.list.SetFocus()
firstSizer = wx.BoxSizer(wx.HORIZONTAL)
firstSizer.Add(keysText, 0, wx.ALL, 5)
firstSizer.Add(self.keys.list, 0, wx.ALL, 5)
self.edit = wx.Button(panel, -1, _(u"Edit"))
self.edit = wx.Button(panel, -1, _("Edit"))
self.edit.SetDefault()
self.execute = wx.Button(panel, -1, _(u"Execute action"))
close = wx.Button(panel, wx.ID_CANCEL, _(u"Close"))
self.execute = wx.Button(panel, -1, _("Execute action"))
close = wx.Button(panel, wx.ID_CANCEL, _("Close"))
secondSizer = wx.BoxSizer(wx.HORIZONTAL)
secondSizer.Add(self.edit, 0, wx.ALL, 5)
secondSizer.Add(self.execute, 0, wx.ALL, 5)
@@ -45,24 +45,24 @@ class keystrokeEditorDialog(baseDialog.BaseWXDialog):
class editKeystrokeDialog(baseDialog.BaseWXDialog):
def __init__(self):
super(editKeystrokeDialog, self).__init__(parent=None, id=-1, title=_(u"Editing keystroke"))
super(editKeystrokeDialog, self).__init__(parent=None, id=-1, title=_("Editing keystroke"))
panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL)
self.control = wx.CheckBox(panel, -1, _(u"Control"))
self.alt = wx.CheckBox(panel, -1, _(u"Alt"))
self.shift = wx.CheckBox(panel, -1, _(u"Shift"))
self.win = wx.CheckBox(panel, -1, _(u"Windows"))
self.control = wx.CheckBox(panel, -1, _("Control"))
self.alt = wx.CheckBox(panel, -1, _("Alt"))
self.shift = wx.CheckBox(panel, -1, _("Shift"))
self.win = wx.CheckBox(panel, -1, _("Windows"))
sizer1 = wx.BoxSizer(wx.HORIZONTAL)
sizer1.Add(self.control)
sizer1.Add(self.alt)
sizer1.Add(self.shift)
sizer1.Add(self.win)
charLabel = wx.StaticText(panel, -1, _(u"Key"))
charLabel = wx.StaticText(panel, -1, _("Key"))
self.key = wx.TextCtrl(panel, -1)
sizer2 = wx.BoxSizer(wx.HORIZONTAL)
sizer2.Add(charLabel)
sizer2.Add(self.key)
ok = wx.Button(panel, wx.ID_OK, _(u"OK"))
ok = wx.Button(panel, wx.ID_OK, _("OK"))
ok.SetDefault()
cancel = wx.Button(panel, wx.ID_CANCEL)
sizer3 = wx.BoxSizer(wx.HORIZONTAL)
@@ -75,7 +75,7 @@ class editKeystrokeDialog(baseDialog.BaseWXDialog):
def no_win_message():
return wx.MessageDialog(None, _(u"You need to use the Windows key"), _(u"Invalid keystroke"), wx.OK|wx.ICON_ERROR).ShowModal()
return wx.MessageDialog(None, _("You need to use the Windows key"), _("Invalid keystroke"), wx.OK|wx.ICON_ERROR).ShowModal()
def no_key():
return wx.MessageDialog(None, _(u"You must provide a character for the keystroke"), _(u"Invalid keystroke"), wx.ICON_ERROR).ShowModal()
return wx.MessageDialog(None, _("You must provide a character for the keystroke"), _("Invalid keystroke"), wx.ICON_ERROR).ShowModal()