Skip to content

Commit

Permalink
Improve UI on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
TheaMorin committed Aug 9, 2016
1 parent 92bcd9a commit 933784e
Show file tree
Hide file tree
Showing 37 changed files with 559 additions and 144 deletions.
2 changes: 2 additions & 0 deletions plover/Plover.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Add predefined macros for your project here. For example:
// #define THE_ANSWER 42
1 change: 1 addition & 0 deletions plover/Plover.creator
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[General]
294 changes: 294 additions & 0 deletions plover/Plover.files
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
__pycache__/__init__.cpython-35.pyc
__pycache__/app.cpython-35.pyc
__pycache__/config.cpython-35.pyc
__pycache__/exception.cpython-35.pyc
__pycache__/formatting.cpython-35.pyc
__pycache__/key_combo.cpython-35.pyc
__pycache__/log.cpython-35.pyc
__pycache__/main.cpython-35.pyc
__pycache__/misc.cpython-35.pyc
__pycache__/orthography.cpython-35.pyc
__pycache__/steno.cpython-35.pyc
__pycache__/steno_dictionary.cpython-35.pyc
__pycache__/suggestions.cpython-35.pyc
__pycache__/translation.cpython-35.pyc
assets/american_english_words.txt
assets/commands.json
assets/connected.png
assets/disconnected.png
assets/down.png
assets/main.json
assets/plover-icon.svg
assets/plover.ico
assets/plover.png
assets/refresh.png
assets/remove.png
assets/spinner.gif
assets/up.png
assets/user.json
dictionary/__pycache__/__init__.cpython-35.pyc
dictionary/__pycache__/base.cpython-35.pyc
dictionary/__pycache__/json_dict.cpython-35.pyc
dictionary/__pycache__/loading_manager.cpython-35.pyc
dictionary/__pycache__/rtfcre_dict.cpython-35.pyc
dictionary/__init__.py
dictionary/__init__.pyc
dictionary/base.py
dictionary/base.pyc
dictionary/json_dict.py
dictionary/json_dict.pyc
dictionary/loading_manager.py
dictionary/loading_manager.pyc
dictionary/rtfcre_dict.py
dictionary/rtfcre_dict.pyc
gui/__init__.pyc
gui/add_translation.pyc
gui/config.pyc
gui/dictionary_editor.pyc
gui/keyboard_config.pyc
gui/log.pyc
gui/log_osx.pyc
gui/lookup.pyc
gui/main.pyc
gui/paper_tape.pyc
gui/serial_config.pyc
gui/suggestions.pyc
gui/util.pyc
gui_qt/__pycache__/__init__.cpython-35.pyc
gui_qt/__pycache__/about_dialog.cpython-35.pyc
gui_qt/__pycache__/about_dialog_ui.cpython-35.pyc
gui_qt/__pycache__/add_translation.cpython-35.pyc
gui_qt/__pycache__/add_translation_ui.cpython-35.pyc
gui_qt/__pycache__/config_file_widget_ui.cpython-35.pyc
gui_qt/__pycache__/config_keyboard_widget_ui.cpython-35.pyc
gui_qt/__pycache__/config_serial_widget_ui.cpython-35.pyc
gui_qt/__pycache__/config_window.cpython-35.pyc
gui_qt/__pycache__/config_window_ui.cpython-35.pyc
gui_qt/__pycache__/dictionary_editor.cpython-35.pyc
gui_qt/__pycache__/dictionary_editor_ui.cpython-35.pyc
gui_qt/__pycache__/dictionary_manager.cpython-35.pyc
gui_qt/__pycache__/dictionary_manager_ui.cpython-35.pyc
gui_qt/__pycache__/engine.cpython-35.pyc
gui_qt/__pycache__/i18n.cpython-35.pyc
gui_qt/__pycache__/log_qt.cpython-35.pyc
gui_qt/__pycache__/lookup_dialog.cpython-35.pyc
gui_qt/__pycache__/lookup_dialog_ui.cpython-35.pyc
gui_qt/__pycache__/main.cpython-35.pyc
gui_qt/__pycache__/main_window.cpython-35.pyc
gui_qt/__pycache__/main_window_ui.cpython-35.pyc
gui_qt/__pycache__/paper_tape.cpython-35.pyc
gui_qt/__pycache__/paper_tape_ui.cpython-35.pyc
gui_qt/__pycache__/resources_rc.cpython-35.pyc
gui_qt/__pycache__/suggestions_dialog.cpython-35.pyc
gui_qt/__pycache__/suggestions_dialog_ui.cpython-35.pyc
gui_qt/__pycache__/suggestions_widget.cpython-35.pyc
gui_qt/__pycache__/suggestions_widget_ui.cpython-35.pyc
gui_qt/__pycache__/trayicon.cpython-35.pyc
gui_qt/__pycache__/utils.cpython-35.pyc
gui_qt/messages/fr/LC_MESSAGES/plover.mo
gui_qt/messages/fr/LC_MESSAGES/plover.po
gui_qt/messages/plover.pot
gui_qt/resources/add-translation.svg
gui_qt/resources/add.png
gui_qt/resources/add.svg
gui_qt/resources/books.svg
gui_qt/resources/clear.png
gui_qt/resources/delete.png
gui_qt/resources/delete.svg
gui_qt/resources/dictionary.png
gui_qt/resources/edit.png
gui_qt/resources/erase.svg
gui_qt/resources/font.png
gui_qt/resources/font.svg
gui_qt/resources/lightbulb.png
gui_qt/resources/lightbulb.svg
gui_qt/resources/magnify.svg
gui_qt/resources/new.png
gui_qt/resources/on-top.png
gui_qt/resources/pencil.svg
gui_qt/resources/pin-off.svg
gui_qt/resources/pin.svg
gui_qt/resources/plover.png
gui_qt/resources/preferences.png
gui_qt/resources/refresh.png
gui_qt/resources/refresh.svg
gui_qt/resources/resources.qrc
gui_qt/resources/save.png
gui_qt/resources/save.svg
gui_qt/resources/search.png
gui_qt/resources/settings.svg
gui_qt/resources/state-disabled.png
gui_qt/resources/state-disconnected.png
gui_qt/resources/state-enabled.png
gui_qt/resources/states.xcf
gui_qt/resources/suggestions.png
gui_qt/resources/tape.png
gui_qt/resources/tape.svg
gui_qt/resources/undo.png
gui_qt/resources/undo.svg
gui_qt/__init__.py
gui_qt/about_dialog.py
gui_qt/about_dialog.ui
gui_qt/about_dialog_ui.py
gui_qt/add_translation.py
gui_qt/add_translation.ui
gui_qt/add_translation_ui.py
gui_qt/config_file_widget.ui
gui_qt/config_file_widget_ui.py
gui_qt/config_keyboard_widget.ui
gui_qt/config_keyboard_widget_ui.py
gui_qt/config_serial_widget.ui
gui_qt/config_serial_widget_ui.py
gui_qt/config_window.py
gui_qt/config_window.ui
gui_qt/config_window_ui.py
gui_qt/dictionary_editor.py
gui_qt/dictionary_editor.ui
gui_qt/dictionary_editor_ui.py
gui_qt/dictionary_manager.py
gui_qt/dictionary_manager.ui
gui_qt/dictionary_manager_ui.py
gui_qt/engine.py
gui_qt/i18n.py
gui_qt/log_qt.py
gui_qt/lookup_dialog.py
gui_qt/lookup_dialog.ui
gui_qt/lookup_dialog_ui.py
gui_qt/main.py
gui_qt/main_window.py
gui_qt/main_window.ui
gui_qt/main_window_ui.py
gui_qt/paper_tape.py
gui_qt/paper_tape.ui
gui_qt/paper_tape_ui.py
gui_qt/resources_rc.py
gui_qt/suggestions_dialog.py
gui_qt/suggestions_dialog.ui
gui_qt/suggestions_dialog_ui.py
gui_qt/suggestions_widget.py
gui_qt/suggestions_widget.ui
gui_qt/suggestions_widget_ui.py
gui_qt/trayicon.py
gui_qt/utils.py
gui_wx/__init__.py
gui_wx/__init__.pyc
gui_wx/add_translation.py
gui_wx/add_translation.pyc
gui_wx/config.py
gui_wx/config.pyc
gui_wx/dictionary_editor.py
gui_wx/dictionary_editor.pyc
gui_wx/dictionary_editor_store.py
gui_wx/dictionary_editor_store.pyc
gui_wx/keyboard_config.py
gui_wx/keyboard_config.pyc
gui_wx/log.py
gui_wx/log.pyc
gui_wx/log_wx.py
gui_wx/lookup.py
gui_wx/lookup.pyc
gui_wx/main.py
gui_wx/main.pyc
gui_wx/paper_tape.py
gui_wx/paper_tape.pyc
gui_wx/serial_config.py
gui_wx/serial_config.pyc
gui_wx/suggestions.py
gui_wx/suggestions.pyc
gui_wx/util.py
gui_wx/util.pyc
machine/__pycache__/__init__.cpython-35.pyc
machine/__pycache__/base.cpython-35.pyc
machine/__pycache__/geminipr.cpython-35.pyc
machine/__pycache__/keyboard.cpython-35.pyc
machine/__pycache__/keymap.cpython-35.pyc
machine/__pycache__/passport.cpython-35.pyc
machine/__pycache__/registry.cpython-35.pyc
machine/__pycache__/stentura.cpython-35.pyc
machine/__pycache__/treal.cpython-35.pyc
machine/__pycache__/txbolt.cpython-35.pyc
machine/__init__.py
machine/__init__.pyc
machine/base.py
machine/base.pyc
machine/geminipr.py
machine/geminipr.pyc
machine/keyboard.py
machine/keyboard.pyc
machine/keymap.py
machine/keymap.pyc
machine/passport.py
machine/passport.pyc
machine/registry.py
machine/registry.pyc
machine/stentura.py
machine/stentura.pyc
machine/treal.py
machine/treal.pyc
machine/txbolt.py
machine/txbolt.pyc
oslayer/__pycache__/__init__.cpython-35.pyc
oslayer/__pycache__/config.cpython-35.pyc
oslayer/__pycache__/keyboardcontrol.cpython-35.pyc
oslayer/__pycache__/log_osx.cpython-35.pyc
oslayer/__pycache__/osxkeyboardcontrol.cpython-35.pyc
oslayer/__pycache__/osxkeyboardlayout.cpython-35.pyc
oslayer/__pycache__/processlock.cpython-35.pyc
oslayer/__pycache__/utils.cpython-35.pyc
oslayer/__init__.py
oslayer/__init__.pyc
oslayer/comscan.pyc
oslayer/config.py
oslayer/config.pyc
oslayer/keyboardcontrol.py
oslayer/keyboardcontrol.pyc
oslayer/list_ports_posix.pyc
oslayer/log_dbus.py
oslayer/log_osx.py
oslayer/log_osx.pyc
oslayer/mac_keycode.pyc
oslayer/osxkeyboardcontrol.py
oslayer/osxkeyboardcontrol.pyc
oslayer/osxkeyboardlayout.py
oslayer/osxkeyboardlayout.pyc
oslayer/processlock.py
oslayer/processlock.pyc
oslayer/utils.py
oslayer/winkeyboardcontrol.py
oslayer/winkeyboardlayout.py
oslayer/xkeyboardcontrol.py
system/__pycache__/__init__.cpython-35.pyc
system/__pycache__/english_stenotype.cpython-35.pyc
system/__init__.py
system/__init__.pyc
system/english_stenotype.py
system/english_stenotype.pyc
__init__.py
__init__.pyc
app.py
app.pyc
config.py
config.pyc
dictionary_editor_store.pyc
exception.py
exception.pyc
formatting.py
formatting.pyc
key_combo.py
key_combo.pyc
log.py
log.pyc
main.py
main.pyc
misc.py
misc.pyc
orthography.py
orthography.pyc
steno.py
steno.pyc
steno_dictionary.py
steno_dictionary.pyc
suggestions.py
suggestions.pyc
translation.py
translation.pyc
Empty file added plover/Plover.includes
Empty file.
4 changes: 2 additions & 2 deletions plover/gui_qt/dictionary_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
from plover.steno import normalize_steno

from plover.gui_qt.dictionary_editor_ui import Ui_DictionaryEditor
from plover.gui_qt.utils import ToolBar, WindowState

from plover.gui_qt.utils import ToolBar, WindowState, SetSvgIcons

DictionaryItem = namedtuple('DictionaryItem', 'strokes translation dictionary')

Expand Down Expand Up @@ -263,6 +262,7 @@ class DictionaryEditor(QDialog, Ui_DictionaryEditor, WindowState):
def __init__(self, engine, dictionary_paths, parent=None):
super(DictionaryEditor, self).__init__(parent)
self.setupUi(self)
SetSvgIcons(self)
self._engine = engine
with engine:
dictionary_list = [
Expand Down
7 changes: 2 additions & 5 deletions plover/gui_qt/dictionary_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from plover.gui_qt.dictionary_manager_ui import Ui_DictionaryManager
from plover.gui_qt.dictionary_editor import DictionaryEditor
from plover.gui_qt.utils import ToolBar, WindowState
from plover.gui_qt.utils import ToolBar, WindowState, SetSvgIcons


class DictionaryManager(QDialog, Ui_DictionaryManager, WindowState):
Expand All @@ -22,6 +22,7 @@ class DictionaryManager(QDialog, Ui_DictionaryManager, WindowState):
def __init__(self, engine):
super(DictionaryManager, self).__init__()
self.setupUi(self)
SetSvgIcons(self)
self._engine = engine
self._states = []
self._dictionaries = []
Expand All @@ -37,7 +38,6 @@ def __init__(self, engine):
self.action_EditDictionaries,
self.action_RemoveDictionaries,
self.action_AddDictionaries,
self.action_AddTranslation,
))
self._update_dictionaries(engine.config['dictionary_file_names'],
record=False, save=False)
Expand Down Expand Up @@ -174,6 +174,3 @@ def on_add_dictionaries(self):
if filename not in dictionaries:
dictionaries.append(filename)
self._update_dictionaries(dictionaries)

def on_add_translation(self):
self._engine.command_add_translation.emit()
31 changes: 0 additions & 31 deletions plover/gui_qt/dictionary_manager.ui
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,6 @@
<string>Ctrl+O</string>
</property>
</action>
<action name="action_AddTranslation">
<property name="icon">
<iconset resource="resources/resources.qrc">
<normaloff>:/new.png</normaloff>:/new.png</iconset>
</property>
<property name="text">
<string>&amp;New translation</string>
</property>
<property name="toolTip">
<string>Add a new translation</string>
</property>
<property name="shortcut">
<string>Ctrl+N</string>
</property>
</action>
</widget>
<layoutdefault spacing="5" margin="8"/>
<resources>
Expand Down Expand Up @@ -218,22 +203,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>action_AddTranslation</sender>
<signal>triggered()</signal>
<receiver>DictionaryManager</receiver>
<slot>on_add_translation()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>149</y>
</hint>
</hints>
</connection>
<connection>
<sender>table</sender>
<signal>itemDoubleClicked(QTableWidgetItem*)</signal>
Expand Down
Loading

0 comments on commit 933784e

Please sign in to comment.