Store in config default width and height of main window

This commit is contained in:
Cédric Krier committed 2009-06-05 13:02:43 +02:00
1 parent 474a3162f1
commit ad31f3908c
3 files changed
+11 -4

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
* Store in config default width and height of main window
* Add 'starts with' and 'ends with' on char search
* Handle domain with '=' or '!=' as operator on selection
* Extend fields domain with local domains
+5 -3
View File
@@ -66,17 +66,19 @@ class ConfigManager(object):
'login.server': 'localhost',
'login.port': '8070',
'login.db': False,
'client.modepda': False,
'client.toolbar': 'default',
'tip.autostart': False,
'tip.position': 0,
'logging.logger': '',
'logging.level': 'ERROR',
'client.default_path': get_home_dir(),
'form.toolbar': True,
'client.default_width': 900,
'client.default_height': 750,
'client.modepda': False,
'client.toolbar': 'default',
'client.form_tab': 'left',
'client.tree_width': True,
'client.spellcheck': False,
'client.default_path': get_home_dir(),
'client.lang': locale.getdefaultlocale()[0],
'client.language_direction': 'ltr',
'client.actions': {
+5 -1
View File
@@ -43,7 +43,8 @@ class Main(object):
super(Main, self).__init__()
self.window = gtk.Window()
self.window.set_default_size(900, 750)
self.window.set_default_size(int(CONFIG['client.default_width']),
int(CONFIG['client.default_height']))
self.window.set_resizable(True)
self.window.set_title('Tryton')
self.window.set_icon(TRYTON_ICON)
@@ -1248,6 +1249,9 @@ class Main(object):
@staticmethod
def sig_quit(widget=None):
width, height = Main.get_main().window.get_size()
CONFIG['client.default_width'] = width
CONFIG['client.default_height'] = height
CONFIG.save()
if hasattr(gtk, 'accel_map_save'):
gtk.accel_map_save(os.path.join(get_home_dir(), '.trytonsc'))