X-Git-Url: http://git.maemo.org/git/?p=gonvert;a=blobdiff_plain;f=src%2Fgonvert_glade.py;h=e45d78ff61f46c18e7c6be2699fa4e231129c3e4;hp=3eaa758d738e4f85519c942dae61b6e051603f4b;hb=a052e0851cc23098d6f1caf0492fe9dd889af877;hpb=e62498c9c596588836ea7e08c83b6b5c21a43fbb diff --git a/src/gonvert_glade.py b/src/gonvert_glade.py index 3eaa758..e45d78f 100755 --- a/src/gonvert_glade.py +++ b/src/gonvert_glade.py @@ -3,7 +3,6 @@ import os import pickle -import string import gettext import logging @@ -17,6 +16,7 @@ import unit_data _moduleLogger = logging.getLogger("gonvert_glade") +PROFILE_STARTUP = False gettext.bindtextdomain('gonvert', '/usr/share/locale') gettext.textdomain('gonvert') @@ -186,14 +186,6 @@ class Gonvert(object): if 'size' in saved_window: a, b = saved_window['size'] self._mainWindow.resize(a, b) - else: - #Maximize if no previous size was found - #self._mainWindow.maximize() - pass - else: - #Maximize if no previous window.dat file was found - #self._mainWindow.maximize() - pass #Restore selections from previously saved settings if it exists and is valid. historical_catergory_found = False @@ -263,7 +255,7 @@ class Gonvert(object): def _find_first(self): assert len(self._find_result) == 0 assert self._findIndex == 0 - findString = string.lower(string.strip(self._findEntry.get_text())) + findString = self._findEntry.get_text().strip().lower() if not findString: return @@ -289,18 +281,6 @@ class Gonvert(object): ) def _find_next(self): - """ - check if 'new find' or 'last find' or 'next-find' - - new-find = run the find algorithm which also selects the first found unit - = self._findIndex = 0 and self._find_result = [] - - last-find = restart from top again - = self._findIndex = len(self._find_result) - - next-find = continue to next found location - = self._findIndex = 0 and len(self._find_result)>0 - """ if len(self._find_result) == 0: self._find_first() else: @@ -319,18 +299,6 @@ class Gonvert(object): ) def _find_previous(self): - """ - check if 'new find' or 'last find' or 'next-find' - - new-find = run the find algorithm which also selects the first found unit - = self._findIndex = 0 and self._find_result = [] - - last-find = restart from top again - = self._findIndex = len(self._find_result) - - next-find = continue to next found location - = self._findIndex = 0 and len(self._find_result)>0 - """ if len(self._find_result) == 0: self._find_first() else: @@ -669,7 +637,8 @@ def main(): raise gonvert = Gonvert() - gtk.main() + if not PROFILE_STARTUP: + gtk.main() if __name__ == "__main__":