default msg window w and h is in glade now

This commit is contained in:
Nikos Kouremenos 2006-01-25 13:27:23 +00:00
parent faaa7d6dc4
commit 29fef124a2
3 changed files with 8 additions and 9 deletions

View File

@ -41,9 +41,6 @@ opt_bool = [ 'boolean', 0 ]
opt_color = [ 'color', '^(#[0-9a-fA-F]{6})|()$' ]
opt_one_window_types = ['never', 'always', 'peracct', 'pertype']
DEFAULT_WINDOW_WIDTH = 480
DEFAULT_WINDOW_HEIGHT = 440
class Config:
__options = {

View File

@ -17680,6 +17680,8 @@ Maybe I'll refactor later</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">480</property>
<property name="default_height">440</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>

View File

@ -602,11 +602,10 @@ class MessageWindowMgr:
def _size_window(self, win, acct, type):
'''Resizes window from config settings'''
size = None
if not gajim.config.get('saveposition'):
size = (common.config.DEFAULT_WINDOW_WIDTH,
common.config.DEFAULT_WINDOW_HEIGHT)
elif self.mode == self.CONFIG_NEVER or self.mode == self.CONFIG_ALWAYS:
return
if self.mode == self.CONFIG_NEVER or self.mode == self.CONFIG_ALWAYS:
size = (gajim.config.get('msgwin-width'),
gajim.config.get('msgwin-height'))
elif self.mode == self.CONFIG_PERACCT:
@ -619,9 +618,10 @@ class MessageWindowMgr:
opt_height = type + '-msgwin-height'
size = (gajim.config.get(opt_width),
gajim.config.get(opt_height))
else:
return
if size is not None:
gtkgui_helpers.resize_window(win.window, size[0], size[1])
gtkgui_helpers.resize_window(win.window, size[0], size[1])
def _position_window(self, win, acct, type):
'''Returns the position tuple: (x, y)'''