default msg window w and h is in glade now
This commit is contained in:
parent
faaa7d6dc4
commit
29fef124a2
|
@ -41,9 +41,6 @@ opt_bool = [ 'boolean', 0 ]
|
||||||
opt_color = [ 'color', '^(#[0-9a-fA-F]{6})|()$' ]
|
opt_color = [ 'color', '^(#[0-9a-fA-F]{6})|()$' ]
|
||||||
opt_one_window_types = ['never', 'always', 'peracct', 'pertype']
|
opt_one_window_types = ['never', 'always', 'peracct', 'pertype']
|
||||||
|
|
||||||
DEFAULT_WINDOW_WIDTH = 480
|
|
||||||
DEFAULT_WINDOW_HEIGHT = 440
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
|
||||||
__options = {
|
__options = {
|
||||||
|
|
|
@ -17680,6 +17680,8 @@ Maybe I'll refactor later</property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
<property name="modal">False</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="resizable">True</property>
|
||||||
<property name="destroy_with_parent">False</property>
|
<property name="destroy_with_parent">False</property>
|
||||||
<property name="decorated">True</property>
|
<property name="decorated">True</property>
|
||||||
|
|
|
@ -602,11 +602,10 @@ class MessageWindowMgr:
|
||||||
|
|
||||||
def _size_window(self, win, acct, type):
|
def _size_window(self, win, acct, type):
|
||||||
'''Resizes window from config settings'''
|
'''Resizes window from config settings'''
|
||||||
size = None
|
|
||||||
if not gajim.config.get('saveposition'):
|
if not gajim.config.get('saveposition'):
|
||||||
size = (common.config.DEFAULT_WINDOW_WIDTH,
|
return
|
||||||
common.config.DEFAULT_WINDOW_HEIGHT)
|
|
||||||
elif self.mode == self.CONFIG_NEVER or self.mode == self.CONFIG_ALWAYS:
|
if self.mode == self.CONFIG_NEVER or self.mode == self.CONFIG_ALWAYS:
|
||||||
size = (gajim.config.get('msgwin-width'),
|
size = (gajim.config.get('msgwin-width'),
|
||||||
gajim.config.get('msgwin-height'))
|
gajim.config.get('msgwin-height'))
|
||||||
elif self.mode == self.CONFIG_PERACCT:
|
elif self.mode == self.CONFIG_PERACCT:
|
||||||
|
@ -619,8 +618,9 @@ class MessageWindowMgr:
|
||||||
opt_height = type + '-msgwin-height'
|
opt_height = type + '-msgwin-height'
|
||||||
size = (gajim.config.get(opt_width),
|
size = (gajim.config.get(opt_width),
|
||||||
gajim.config.get(opt_height))
|
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):
|
def _position_window(self, win, acct, type):
|
||||||
|
|
Loading…
Reference in New Issue