give window a title
This commit is contained in:
parent
f791559d54
commit
d030b30af2
@ -3,7 +3,7 @@ import gtk
|
|||||||
import imaplib
|
import imaplib
|
||||||
|
|
||||||
class Window(object):
|
class Window(object):
|
||||||
def __init__(self, conf):
|
def __init__(self, title, conf):
|
||||||
self.conf = conf
|
self.conf = conf
|
||||||
if not 'width' in self.conf:
|
if not 'width' in self.conf:
|
||||||
self.conf['width'] = 32
|
self.conf['width'] = 32
|
||||||
@ -11,6 +11,7 @@ class Window(object):
|
|||||||
self.conf['height'] = 32
|
self.conf['height'] = 32
|
||||||
|
|
||||||
self.window = gtk.Window()
|
self.window = gtk.Window()
|
||||||
|
self.window.set_title(title)
|
||||||
self.window.set_decorated(False)
|
self.window.set_decorated(False)
|
||||||
self.window.connect('destroy', self.destroy_event)
|
self.window.connect('destroy', self.destroy_event)
|
||||||
self.window.connect('button-release-event', self.button_release)
|
self.window.connect('button-release-event', self.button_release)
|
||||||
|
@ -5,6 +5,8 @@ import sys
|
|||||||
|
|
||||||
from Window import *
|
from Window import *
|
||||||
|
|
||||||
|
PROGRAM_NAME = 'PyGTK IMAP Checker'
|
||||||
|
|
||||||
def get_config(fname):
|
def get_config(fname):
|
||||||
conf = {}
|
conf = {}
|
||||||
if os.path.isfile(fname):
|
if os.path.isfile(fname):
|
||||||
@ -50,7 +52,7 @@ def main(argv):
|
|||||||
' in configuration file\n')
|
' in configuration file\n')
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
window = Window(conf)
|
window = Window(PROGRAM_NAME, conf)
|
||||||
window.run()
|
window.run()
|
||||||
|
|
||||||
save_config(config_fname, window.conf)
|
save_config(config_fname, window.conf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user