Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7a526fc
Use the github page for the kodos project page url
Aug 9, 2012
0db8665
Remove the check_for_updates functionality
Aug 9, 2012
1aa7811
Remove the reportbug functionality and send the user to github instead
Aug 9, 2012
888d127
Remove the email server config item and the associated code
Aug 13, 2012
b2fb952
Fix the layout of the preferences window
Aug 13, 2012
881d9f3
Remove the web browser and mail server paragraphs from the help
Aug 13, 2012
360b344
Split the kodos file into a small launcher and modules.main
Aug 13, 2012
ba7af44
Move kodos loader script to bin directory
Aug 17, 2012
f5aedd2
Use subprocess.check_call instead of os.system
Aug 17, 2012
45e47df
Execute `make` in the build_py rather than in the install phase
Aug 17, 2012
20bd5ab
Remove commented out code and superfluous comments
Aug 17, 2012
9257c39
Rename the `modules` directory to `kodos`
Aug 17, 2012
6032e03
Remove the now superfluous extension of sys.path
Aug 17, 2012
547a19f
Do not install the .ui files
Aug 18, 2012
e463a31
Use optparse instead of getopt
Aug 18, 2012
2fa3ab0
Remove all debug related code from util.py
Aug 19, 2012
b2ba6b9
Remove the unused debug module
Aug 19, 2012
378e036
Use the logging framework instead of conditional prints
Aug 19, 2012
a3db334
Use the logging framework instead of unconditional prints
Aug 19, 2012
b737c62
Hand the qApp object to the main `Kodos` class
Aug 19, 2012
510d344
Use relative imports and avoid * imports
Aug 19, 2012
9e7b6ec
Remove unused imports
Aug 19, 2012
3563bac
Remove RecentFiles.move(..)
Aug 19, 2012
561f2ae
Remove superfluous import of os.path
Aug 19, 2012
0e45c36
Use package relative imports
Aug 19, 2012
4ab2ca9
Use True and False instead of TRUE and FALSE
Aug 19, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include screenshots/*.png
include MANIFEST.in
include LICENSE.txt
include README.txt
include modules/*.ui
include modules/*.py
include kodos/*.ui
include kodos/*.py
include windows/build.bat
include windows/installer.iss
include CHANGELOG.txt
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
all: modules/kodos_rc.py
$(MAKE) -C modules
all: kodos/kodos_rc.py
$(MAKE) -C kodos
pylupdate4 kodos.pro
$(MAKE) -C translations

clean:
$(RM) -fv modules/kodos_rc.py
$(MAKE) clean -C modules
$(RM) -fv kodos/kodos_rc.py
$(MAKE) clean -C kodos

modules/kodos_rc.py: kodos.qrc
kodos/kodos_rc.py: kodos.qrc
pyrcc4 -o $@ $<
60 changes: 60 additions & 0 deletions bin/kodos
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# kodos.py: -*- Python -*- DESCRIPTIVE TEXT.

import sys
import os
import logging
import optparse

try:
from PyQt4 import QtGui
from PyQt4 import QtCore
except:
sys.exit("""Could not locate the PyQt module. Please make sure that
you have installed PyQt for the version of Python that you are running.""")

from kodos.main import Kodos
from kodos.util import findFile

parser = optparse.OptionParser()
parser.add_option('-f', '--filename', dest='filename',
help='Load filename on startup', metavar='FILE')
parser.add_option('-d', '--debug', dest='debug', action='store_true',
help='Set log level to debug')
parser.add_option('-k', dest='kodos_dir', type='string',
default=os.path.join(sys.prefix, "kodos"),
help='Set path containing Kodos images & help subdirs',
metavar='DIR')
parser.add_option('-l', '--locale', dest='locale', type='string',
default='en',
help='2-letter locale', metavar='LEVEL')
options, args = parser.parse_args()

if options.debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.WARNING)
log = logging.getLogger('kodos')

os.environ['KODOS_DIR'] = options.kodos_dir

qApp = QtGui.QApplication(sys.argv)
qApp.setOrganizationName("kodos")
qApp.setApplicationName("kodos")
qApp.setOrganizationDomain("kodos.sourceforge.net")

if options.locale != 'en':
localefile = "kodos_%s.qm" % (options.locale or QtCore.QTextCodec.locale())
localepath = findFile(os.path.join("translations", localefile))
log.debug('locale changed to: %s, file: %s, path: %s' % (locale,
localefile,
localepath))

translator = QtCore.QTranslator(qApp)
translator.load(localepath)
qApp.installTranslator(translator)

kodos = Kodos(qApp, options.filename)
kodos.show()
sys.exit(qApp.exec_())
4 changes: 0 additions & 4 deletions help/prefs.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,8 @@ <h2><font color=green>Kodos - Help</font></h2>
</td>
<td width=80%>
<h3>Preferences</h3>
Set your <b>Web Browser</b> path. You can use the <b>...</b> button to use a file dialog to help locate your browser. The web browser is necessary to access external links within the Python Regex documentation.<p>

The <b>Editor Font</b> allows you to select a desirable font for use within the Kodos editor<p>

The <b>Email Server</b> is required for sending bug reports to the author. You can submit a bug report under the main <b>Help</b> menu<p>

You can control the number of <b>Recent Files</b> that are displayed at the bottom of the <b>File</b> menu. The default value is 5. To display more or less recent files, set this value accordingly. The recent file list is maintained independtly of this value such that applying a lower value and then a higher value will not purge entries. That is, if you have 10 files and then set this value to 3 and later set this value to 10, the 10 files will be immediately available for selection .<p>


Expand Down
50 changes: 25 additions & 25 deletions kodos.pro
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
SOURCES = kodos
modules/about.py
modules/debug.py
modules/help.py
modules/__init__.py
modules/parseRegexLib.py
modules/prefs.py
modules/recent_files.py
modules/reference.py
modules/regexLibrary.py
modules/reportBug.py
modules/status_bar.py
modules/tooltip.py
modules/urlDialog.py
modules/util.py
modules/version.py
kodos/about.py
kodos/debug.py
kodos/help.py
kodos/__init__.py
kodos/parseRegexLib.py
kodos/prefs.py
kodos/recent_files.py
kodos/reference.py
kodos/regexLibrary.py
kodos/reportBug.py
kodos/status_bar.py
kodos/tooltip.py
kodos/urlDialog.py
kodos/util.py
kodos/version.py

TRANSLATIONS = translations/kodos_en.ts \
translations/kodos_pl.ts \
translations/kodos_sv.ts

FORMS = modules/aboutBA.ui \
modules/helpBA.ui \
modules/kodosBA.ui \
modules/newUserDialogBA.ui
modules/prefsBA.ui \
modules/referenceBA.ui \
modules/regexLibraryBA.ui \
modules/reportBugBA.ui \
modules/resultsBA.ui \
modules/urlDialogBA.ui
FORMS = kodos/aboutBA.ui \
kodos/helpBA.ui \
kodos/kodosBA.ui \
kodos/newUserDialogBA.ui
kodos/prefsBA.ui \
kodos/referenceBA.ui \
kodos/regexLibraryBA.ui \
kodos/reportBugBA.ui \
kodos/resultsBA.ui \
kodos/urlDialogBA.ui
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions modules/help.py → kodos/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from PyQt4 import QtCore

from . import util
from helpBA import HelpBA
from . import helpBA

class textbrowser(QtGui.QTextBrowser):
# reimplemented textbrowser that filters out external sources
Expand All @@ -28,9 +28,9 @@ def setSource(self, src):



class Help(HelpBA):
class Help(helpBA.HelpBA):
def __init__(self, parent, filename):
HelpBA.__init__(self, parent)
helpBA.HelpBA.__init__(self, parent)

self.setGeometry(100, 50, 800, 600)

Expand Down
File renamed without changes.
17 changes: 0 additions & 17 deletions modules/kodosBA.ui → kodos/kodosBA.ui
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ database. New in Python version 2.0.</string>
<addaction name="helpRegexLibAction"/>
<addaction name="separator"/>
<addaction name="helpVisitWebsiteAction"/>
<addaction name="helpCheckForUpdateAction"/>
<addaction name="helpReportBugAction"/>
<addaction name="separator"/>
<addaction name="helpAboutAction"/>
Expand Down Expand Up @@ -1285,22 +1284,6 @@ database. New in Python version 2.0.</string>
</hint>
</hints>
</connection>
<connection>
<sender>helpCheckForUpdateAction</sender>
<signal>activated()</signal>
<receiver>KodosBA</receiver>
<slot>check_for_update()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>20</x>
<y>20</y>
</hint>
</hints>
</connection>
<connection>
<sender>replaceTextEdit</sender>
<signal>textChanged()</signal>
Expand Down
Loading