Merged in changes from the oblogout-distutils-extra branch

This commit is contained in:
2009-01-26 23:01:36 +00:00
parent 8ffe6e4ce3
commit 796e5f80f5
2 changed files with 63 additions and 29 deletions

View File

@@ -69,7 +69,11 @@ class OpenboxLogout():
# Load configuration file
self.load_config(config)
# Start the window
self.init_window()
def init_window(self):
# Start pyGTK setup
self.window = gtk.Window()
self.window.set_title(_("Openbox Logout"))
@@ -169,14 +173,7 @@ class OpenboxLogout():
def load_config(self, config):
""" Load the configuration file and parse entries, when encountering a issue
change safe defaults """
if config == None:
config = '/etc/openbox-logout.conf'
if not os.path.exists(config):
self.logger.error(_("Unable to find config file %s") % config)
exit()
self.img_path = "%s/themes" % self.determine_path()
self.parser = ConfigParser.SafeConfigParser()
@@ -377,7 +374,7 @@ class OpenboxLogout():
def quit(self, widget=None, data=None):
gtk.main_quit()
def run(self):
def run_logout(self):
self.window.show_all()
gtk.main()
@@ -391,4 +388,4 @@ if __name__ == "__main__":
config = None
app = OpenboxLogout(config)
app.run()
app.run_logout()