diff --git a/help/prefs.html b/help/prefs.html
index 06baaf2..793bfc3 100644
--- a/help/prefs.html
+++ b/help/prefs.html
@@ -77,12 +77,8 @@
Kodos - Help
Preferences
-Set your Web Browser path. You can use the ... 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.
-
The Editor Font allows you to select a desirable font for use within the Kodos editor
-The Email Server is required for sending bug reports to the author. You can submit a bug report under the main Help menu
-
You can control the number of Recent Files that are displayed at the bottom of the File 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 .
diff --git a/kodos b/kodos
index 8446047..49ead1b 100755
--- a/kodos
+++ b/kodos
@@ -33,7 +33,6 @@ import modules.help as help
from modules.status_bar import *
from modules.reference import *
from modules.prefs import *
-from modules.reportBug import reportBugWindow
from modules.version import VERSION
from modules.recent_files import RecentFiles
from modules.urlDialog import URLDialog
@@ -983,49 +982,8 @@ class Kodos(KodosBA):
def kodos_website(self):
- self.launch_browser_wrapper("http://kodos.sourceforge.net")
-
-
- def check_for_update(self):
- url = "http://sourceforge.net/project/showfiles.php?group_id=43860"
- try:
- fp = urllib.urlopen(url)
- except:
- self.status_bar.set_message(self.tr("Failed to open url"),
- 5,
- TRUE)
- return
-
- lines = fp.readlines()
- html = string.join(lines)
-
- rawstr = r"""kodos-(?P.*?)\.\w{3,4}\<"""
- match_obj = re.search(rawstr, html)
- if match_obj:
- latest_version = match_obj.group('version')
- if latest_version == VERSION:
- QMessageBox.information(None,
- self.tr("No Update is Available"),
- unicode(self.tr("You are currently using the latest version of Kodos")) + " (%s)" % VERSION)
- else:
- message = "%s\n\n%s: %s.\n%s: %s.\n\n%s\n" % \
- (unicode(self.tr("There is a newer version of Kodos available.")),
- unicode(self.tr("You are using version:")),
- VERSION,
- unicode(self.tr("The latest version is:")),
- latest_version,
- unicode(self.tr("Press OK to launch browser")))
-
- self.launch_browser_wrapper(url,
- self.tr("Kodos Update Available"),
- message)
- else:
- message = "%s.\n\n%s" % \
- (unicode(self.tr("Unable to get version info from Sourceforge")),
- unicode(self.tr("Press OK to launch browser")))
- self.launch_browser_wrapper(url,
- self.tr("Unknown version available"),
- message)
+ self.launch_browser_wrapper('https://github.com/luksan/kodos',
+ message=self.tr('Launch web browser to go to the kodos project page?'))
def launch_browser_wrapper(self, url, caption=None, message=None):
@@ -1046,7 +1004,8 @@ class Kodos(KodosBA):
def report_bug(self):
- self.bug_report_win = reportBugWindow(self)
+ self.launch_browser_wrapper('https://github.com/luksan/kodos/issues',
+ message=self.tr("Launch web browser to report a bug in kodos?"))
##############################################################################
diff --git a/modules/kodosBA.ui b/modules/kodosBA.ui
index a600de2..14139b3 100644
--- a/modules/kodosBA.ui
+++ b/modules/kodosBA.ui
@@ -406,7 +406,6 @@ database. New in Python version 2.0.
-
@@ -1285,22 +1284,6 @@ database. New in Python version 2.0.
-
- helpCheckForUpdateAction
- activated()
- KodosBA
- check_for_update()
-
-
- -1
- -1
-
-
- 20
- 20
-
-
-
replaceTextEdit
textChanged()
diff --git a/modules/prefs.py b/modules/prefs.py
index 56ea409..3112d49 100644
--- a/modules/prefs.py
+++ b/modules/prefs.py
@@ -27,8 +27,6 @@ def load(self):
self.parent.setfont(setting.toPyObject())
if preference == 'Match Font':
self.parent.setMatchFont(setting.toPyObject())
- if preference == 'Email Server':
- self.emailServerEdit.setText(setting.toPyObject())
if preference == 'Recent Files Count':
self.recentFilesSpinBox.setValue(int(setting.toPyObject()))
except Exception, e:
@@ -39,7 +37,6 @@ def load(self):
def save(self):
self.settings.setValue('Font', self.parent.getfont())
self.settings.setValue('Match Font', self.parent.getMatchFont())
- self.settings.setValue('Email Server', self.emailServerEdit.text())
self.settings.setValue('Recent Files Count', self.recentFilesSpinBox.text())
self.settings.sync()
diff --git a/modules/prefsBA.ui b/modules/prefsBA.ui
index c5c8586..d2f2290 100644
--- a/modules/prefsBA.ui
+++ b/modules/prefsBA.ui
@@ -7,7 +7,7 @@
0
0
540
- 268
+ 145
@@ -22,7 +22,7 @@
11
6
519
- 246
+ 131
@@ -44,13 +44,6 @@
- -
-
-
-
-
-
-
-
@@ -61,18 +54,22 @@
- -
+
-
- -
-
+
-
+
+
+
+
+
- -
-
+
-
+
0
@@ -80,30 +77,30 @@
- Email Server:
+ Recent Files:
false
- -
-
+
-
+
-
+
0
0
-
- Recent Files:
+
+ 25
-
- false
+
+ 5
- -
+
-
Qt::Horizontal
@@ -119,40 +116,8 @@
- -
-
-
-
- 0
- 0
-
-
-
- 25
-
-
- 5
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Expanding
-
-
-
- 20
- 40
-
-
-
-
-
@@ -228,8 +193,6 @@
fontButton
- emailServerEdit
- recentFilesSpinBox
buttonHelp
buttonApply
buttonOk
diff --git a/modules/reportBug.py b/modules/reportBug.py
deleted file mode 100644
index e4351e4..0000000
--- a/modules/reportBug.py
+++ /dev/null
@@ -1,104 +0,0 @@
-# -*- coding: utf-8 -*-
-# reportBug.py: -*- Python -*- DESCRIPTIVE TEXT.
-
-from reportBugBA import reportBugBA
-from util import *
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
-from PyQt4 import *
-import sys
-import string
-import smtplib
-from version import VERSION
-
-AUTHOR_ADDR = "phil_schwartz@users.sourceforge.net"
-
-class reportBug(reportBugBA):
- def __init__(self, parent=None, name=None):
- reportBugBA.__init__(self, parent)
- self.parent = parent
- self.kodos_main = parent.kodos_main
- self.populate()
-
-
- def populate(self):
- self.OSEdit.setText(sys.platform)
- pyvers = string.replace(sys.version, "\n", " - ")
- self.pythonVersionEdit.setText(pyvers)
- self.PyQtVersionEdit.setText(QT_VERSION_STR)
- self.regexMultiLineEdit.setPlainText(self.kodos_main.regexMultiLineEdit.toPlainText())
- self.stringMultiLineEdit.setPlainText(self.kodos_main.stringMultiLineEdit.toPlainText())
-
-
- def cancel_slot(self):
- self.parent.close()
-
- def submit_slot(self):
- addr = str(self.emailAddressEdit.text())
- if not addr:
- msg = self.tr(
- "An email address is necessary so that the author "
- "can contact you. Your email address will not "
- "be used for any other purposes.")
-
- QMessageBox.information(None,
- self.tr("You must supply a valid email address"),
- msg)
- return
-
- msg = "Subject: Kodos bug report\n\n"
- msg += "Kodos Version: %s\n" % VERSION
- msg += "Operating System: %s\n" % unicode(self.OSEdit.text())
- msg += "Python Version: %s\n" % unicode(self.pythonVersionEdit.text())
- msg += "PyQt Version: %s\n" % unicode(self.PyQtVersionEdit.text())
- msg += "\n" + "=" * 70 + "\n"
- msg += "Regex:\n%s\n" % unicode(self.regexMultiLineEdit.text())
- msg += "=" * 70 + "\n"
- msg += "String:\n%s\n" % unicode(self.stringMultiLineEdit.text())
- msg += "=" * 70 + "\n"
- msg += "Comments:\n%s\n" % unicode(self.commentsMultiLineEdit.text())
- email_server = unicode(self.kodos_main.prefs.emailServerEdit.text()) or "localhost"
- try:
- server = smtplib.SMTP(email_server)
- server.sendmail(addr, AUTHOR_ADDR, msg)
- server.quit()
- QMessageBox.information(None,
- self.tr("Bug report sent"),
- self.tr("Your bug report has been sent."))
- self.parent.close()
- except Exception, e:
- QMessageBox.information(None,
- self.tr("An exception occurred sending bug report"),
- str(e))
-
-
-class reportBugWindow(QMainWindow):
- def __init__(self, kodos_main):
- self.kodos_main = kodos_main
- QMainWindow.__init__(self, kodos_main)#, Qt.Window | Qt.WA_DeleteOnClose)
-
- self.setGeometry(100, 50, 800, 600)
- self.setWindowTitle(self.tr("Report a Bug"))
- self.setWindowIcon(QIcon(QPixmap(":images/kodos_icon.png")))
-
- self.bug_report = reportBug(self)
- self.setCentralWidget(self.bug_report)
-
-
- self.createMenu()
- self.createToolBar()
-
- self.show()
-
-
- def createMenu(self):
- self.menubar = self.menuBar()
- self.filemenu = self.menubar.addMenu(self.tr("&File"))
- self.filemenu.addAction(self.tr("&Close"), self, SLOT("close()"))
-
-
- def createToolBar(self):
- toolbar = QToolBar()
- self.addToolBar(toolbar)
- self.logolabel = kodos_toolbar_logo(toolbar)
-
diff --git a/modules/reportBugBA.ui b/modules/reportBugBA.ui
deleted file mode 100644
index 74b2eec..0000000
--- a/modules/reportBugBA.ui
+++ /dev/null
@@ -1,290 +0,0 @@
-
-
- reportBugBA
-
-
-
- 0
- 0
- 750
- 653
-
-
-
- Form1
-
-
-
- 11
-
-
- 6
-
-
-
-
-
- 6
-
-
- 0
-
-
-
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 20
- 20
-
-
-
-
- -
-
-
- Submit Bug Report
-
-
-
- -
-
-
- Cancel
-
-
-
-
-
- -
-
-
- Kodos State Information
-
-
-
- 11
-
-
- 6
-
-
-
-
-
- 6
-
-
- 0
-
-
-
-
-
- Regular Expression:
-
-
- false
-
-
-
- -
-
-
- Match String:
-
-
- false
-
-
-
-
-
- -
-
-
- 6
-
-
- 0
-
-
-
-
-
- true
-
-
-
- -
-
-
- true
-
-
-
-
-
-
-
-
- -
-
-
- System Information
-
-
-
- 11
-
-
- 6
-
-
-
-
-
- Operating System:
-
-
- false
-
-
-
- -
-
-
- PyQt Version:
-
-
- false
-
-
-
- -
-
-
- Python Version:
-
-
- false
-
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
- Comments
-
-
-
- 11
-
-
- 6
-
-
-
-
-
- 0
-
-
- 6
-
-
-
-
-
- Comments:
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Email address:
-
-
- false
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- qPixmapFromMimeSource
-
- OSEdit
- pythonVersionEdit
- PyQtVersionEdit
- emailAddressEdit
- submitButton
- cancelButton
-
-
-
-
- submitButton
- clicked()
- reportBugBA
- submit_slot()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
-
-
- cancelButton
- clicked()
- reportBugBA
- cancel_slot()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
-
-
-
|