Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

getting it to build with py2app

  • Loading branch information...
commit 36f078c9a1c624909ec0f8e951d4f7f4e6a00329 1 parent ed8b136
Alex Ehlke authored
View
9 TODO
@@ -1,15 +1,16 @@
FINAL TODO BEFORE FIRST RELEASE:
-url hash support for history (only loading needs it I think)
+-url hash support for history (only loading needs it I think)
TODO:
+put search results in history items
+
up/down swipe
-refactor style sheet resources, and look at the dictionary.app ones
need inactive toolbar button images
@@ -18,12 +19,14 @@ when setting the search field to the result selected (like when they press enter
inactive-styled segmented buttons
-
custom horizontal scrollbar for webview so that it doesn't overlap the corner
prefetch entry text after a search
+
TODO LATER:
+refactor style sheet resources, and look at the dictionary.app ones
+
on-hover of links, show the entry's title or something
shorter IDs for books. possibly store these in a dotfile in the epwing dir so it's not path-dependent
View
5 build.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+./buildresources.sh
+./buildui.sh
+python setup.py py2app
+cp qt.conf dist/manabidict.app/Contents/Resources
View
3  buildresources.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+pyrcc4 ./resources/resources.qrc -o ./src/manabidict/resources_rc.py
View
0  buildui.sh
No changes.
View
3  qt.conf
@@ -0,0 +1,3 @@
+[Paths]
+Plugins = bollocks
+
View
45 setup.py
@@ -0,0 +1,45 @@
+
+from setuptools import setup
+import os
+import py2app
+from src import manabidict
+
+#from distribute_setup import use_setuptools
+#use_setuptools()
+
+
+os.system('/bin/rm -rf dist')
+os.system('/bin/rm -rf build')
+#os.system pyc
+
+
+PLIST = {
+ 'PyRuntimeLocations': ['/System/Library/Frameworks/Python.framework/Versions/2.6/Python'],
+}
+
+
+setup(
+ name='manabidict',
+ #version=
+ description='A viewer for EPWING-formatted Japanese dictionaries.',
+ author='Alex Ehlke',
+ url='http://manabi.org',
+ license='GPLv3',
+ app=['src/manabidict/manabidict.py'],
+ zip_safe=False,
+
+ options={
+ 'py2app': {
+ 'semi_standalone': False,
+ #'argv_emulation': True,
+ 'includes': ['sip', 'PyQt4', 'gzip', 'PyQt4.QtCore', 'PyQt4.QtGui','PyQt4.QtWebKit',],
+ 'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 'PyQt4.QtXml', 'PyQt4.phonon', 'wx', 'tcl', 'Tkinter'],
+ 'packages': ['lxml'],
+ 'plist': PLIST,
+ },
+ },
+
+ setup_requires=['py2app'],
+)
+
+#os.system(
View
0  src/__init__.py
No changes.
View
30 src/manabidict/historyitems.py
@@ -0,0 +1,30 @@
+
+
+class HistoryItem(object):
+
+ def __init__(self, label):
+ self.label = label
+ self.entries = None
+ self.entry = None
+
+
+class UrlHistoryItem(HistoryItem):
+
+ def __init__(self, label, url):
+ super(UrlHistoryItem, self).__init__(label)
+ self.url = url
+
+
+
+#class EntryHistoryItem(HistoryItem):
+
+ #def __init__(self, label, entries):
+ #super(EntryHistoryItem, self).__init__(label)
+ #self.entry = entry
+
+
+#class CombinedEntriesHistoryItem(HistoryItem):
+
+ #def __init__(self, label, entries):
+ #super(CombinedEntryHistoryItem, self).__init__(label)
+ #self.entries = entries
View
2  src/manabidict/resources_rc.py
@@ -2,7 +2,7 @@
# Resource object code
#
-# Created: Thu Jul 8 12:00:47 2010
+# Created: Wed Jul 21 09:03:54 2010
# by: The Resource Compiler for PyQt (Qt v4.6.2)
#
# WARNING! All changes made in this file will be lost!
View
10 src/manabidict/ui/dictionary.py
@@ -20,7 +20,7 @@
from epwingprotocol import MNetworkAccessManager
-#from forms.dictionary import Ui_DictionaryWindow
+from forms.dictionary import Ui_DictionaryWindow
#from epywing.manager
from epywing.uris import route as route_dictionary_uri, collection_uri_prefix
@@ -108,10 +108,10 @@ def eventFilter(self, obj, event):
-class Dictionary(QMainWindow):
+class Dictionary(QMainWindow):#, Ui_DictionaryWindow):
- ui_class, widget_class = uic.loadUiType('../../qtcreator/dictionary.ui')
- ui = ui_class()
+ #ui_class, widget_class = uic.loadUiType('../../qtcreator/dictionary.ui')
+ #ui = ui_class()
ZOOM_DELTA = 0.10
ZOOM_RANGE = (0.4, 4.0,)
@@ -121,6 +121,8 @@ class Dictionary(QMainWindow):
def __init__(self, book_manager, parent=None):
super(Dictionary, self).__init__(parent)
+ self.ui = Ui_DictionaryWindow()
+
self.book_manager = book_manager
self.history = HistoryManager()
self.settings = QSettings()
View
11 src/manabidict/ui/preferences.py
@@ -6,15 +6,14 @@
import os
from os import path
-#from forms.dictionary import Ui_DictionaryWindow
+from forms.preferences import Ui_PreferencesDialog
#from epywing.manager
+class Preferences(QDialog):#, Ui_PreferencesDialog):
-class Preferences(QDialog):
-
- ui_class, widget_class = uic.loadUiType('../../qtcreator/preferences.ui')
- ui = ui_class()
+ #ui_class, widget_class = uic.loadUiType('../../qtcreator/preferences.ui')
+ #ui = ui_class()
#booksChanged = pyqtSignal()
@@ -23,6 +22,8 @@ def __init__(self, book_manager, parent=None):
'''
super(Preferences, self).__init__(parent)
+ self.ui = Ui_PreferencesDialog()
+
self.settings = QSettings()
self.book_manager = book_manager
Please sign in to comment.
Something went wrong with that request. Please try again.