give window a title

This commit is contained in:
Josh Holtrop 2011-07-07 10:33:56 -04:00
parent f791559d54
commit d030b30af2
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import gtk
import imaplib
class Window(object):
def __init__(self, conf):
def __init__(self, title, conf):
self.conf = conf
if not 'width' in self.conf:
self.conf['width'] = 32
@ -11,6 +11,7 @@ class Window(object):
self.conf['height'] = 32
self.window = gtk.Window()
self.window.set_title(title)
self.window.set_decorated(False)
self.window.connect('destroy', self.destroy_event)
self.window.connect('button-release-event', self.button_release)

View File

@ -5,6 +5,8 @@ import sys
from Window import *
PROGRAM_NAME = 'PyGTK IMAP Checker'
def get_config(fname):
conf = {}
if os.path.isfile(fname):
@ -50,7 +52,7 @@ def main(argv):
' in configuration file\n')
return 1
window = Window(conf)
window = Window(PROGRAM_NAME, conf)
window.run()
save_config(config_fname, window.conf)