Add tooltips on startup and improve for missing tip file
This commit is contained in:
@@ -91,8 +91,10 @@ def tipoftheday(parent=None):
|
||||
tip_file = False
|
||||
if lang:
|
||||
tip_file = os.path.join(DATA_DIR, 'tipoftheday.'+lang+'.txt')
|
||||
if not tip_file:
|
||||
if not os.path.isfile(tip_file):
|
||||
tip_file = os.path.join(DATA_DIR, 'tipoftheday.txt')
|
||||
if not os.path.isfile(tip_file):
|
||||
return
|
||||
tips = file(tip_file).read().split('---')
|
||||
tip = tips[self.number % len(tips)]
|
||||
del tips
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ class TrytonClient(object):
|
||||
def run(self):
|
||||
main = Main()
|
||||
if CONFIG['tip.autostart']:
|
||||
pass
|
||||
main.sig_tips()
|
||||
else:
|
||||
main.sig_login()
|
||||
gtk.main()
|
||||
|
||||
Reference in New Issue
Block a user