Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 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
49 changes: 4 additions & 45 deletions kodos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<version>.*?)\.\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):
Expand All @@ -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?"))


##############################################################################
Expand Down
17 changes: 0 additions & 17 deletions modules/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
3 changes: 0 additions & 3 deletions modules/prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()
Expand Down
77 changes: 20 additions & 57 deletions modules/prefsBA.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>540</width>
<height>268</height>
<height>145</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -22,7 +22,7 @@
<x>11</x>
<y>6</y>
<width>519</width>
<height>246</height>
<height>131</height>
</rect>
</property>
<layout class="QVBoxLayout">
Expand All @@ -44,13 +44,6 @@
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2" colspan="3">
<widget class="QPushButton" name="fontButtonMatch">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="textLabel1">
<property name="text">
Expand All @@ -61,49 +54,53 @@
</property>
</widget>
</item>
<item row="0" column="1" colspan="3">
<item row="0" column="1" colspan="2">
<widget class="QPushButton" name="fontButton">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1" colspan="3">
<widget class="QLineEdit" name="emailServerEdit"/>
<item row="1" column="1" colspan="2">
<widget class="QPushButton" name="fontButtonMatch">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0" rowspan="2">
<widget class="QLabel" name="TextLabel1_2Emaii">
<item row="2" column="0">
<widget class="QLabel" name="TextLabel1_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Email Server:</string>
<string>Recent Files:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="TextLabel1_2">
<item row="2" column="1">
<widget class="QSpinBox" name="recentFilesSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Recent Files:</string>
<property name="maximum">
<number>25</number>
</property>
<property name="wordWrap">
<bool>false</bool>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item row="4" column="2" colspan="2">
<item row="2" column="2">
<spacer name="Spacer1_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand All @@ -119,40 +116,8 @@
</property>
</spacer>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="recentFilesSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>25</number>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="Spacer1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
Expand Down Expand Up @@ -228,8 +193,6 @@
<layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>fontButton</tabstop>
<tabstop>emailServerEdit</tabstop>
<tabstop>recentFilesSpinBox</tabstop>
<tabstop>buttonHelp</tabstop>
<tabstop>buttonApply</tabstop>
<tabstop>buttonOk</tabstop>
Expand Down
104 changes: 0 additions & 104 deletions modules/reportBug.py

This file was deleted.

Loading