Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make the glade file path not dependant on the current working directory.

  • Loading branch information...
commit 31644ea6d484c0bfd9eb440c9d45709fc1228b57 1 parent 3c185bc
Stephan Sokolow authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 timeclock.py
View
7 timeclock.py
@@ -5,6 +5,8 @@
@todo: Planned improvements:
- Clicking the preferences button while the dialog is shown should do nothing.
+ - Should I offer preferences options for remembering window position and things
+ like "always on top" and "on all desktops"?
- Rework the design to minimize dependence on GTK+ (in case I switch to Qt for
Phonon)
- Have the system complain if overhead + work + play + sleep (8 hours) > 24
@@ -44,6 +46,9 @@
import logging, os, signal, sys, time, pickle
+SELF_DIR = os.path.dirname(os.path.abspath(__file__))
+print SELF_DIR
+
DATA_DIR = os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share'))
if not os.path.isdir(DATA_DIR):
try:
@@ -102,7 +107,7 @@ def notify_exhaustion(mode):
class TimeClock:
def __init__(self):
#Set the Glade file
- self.gladefile = "timeclock.glade"
+ self.gladefile = os.path.join(SELF_DIR, "timeclock.glade")
self.wTree = gtk.glade.XML(self.gladefile)
self.last_tick = time.time()
Please sign in to comment.
Something went wrong with that request. Please try again.