remove some useless indentation and hide message window until a tab is inserted
This commit is contained in:
parent
1689ae3783
commit
d945166749
|
@ -71,15 +71,12 @@ class MessageWindow:
|
||||||
self.notebook.remove_page(0)
|
self.notebook.remove_page(0)
|
||||||
# Tab customizations
|
# Tab customizations
|
||||||
pref_pos = gajim.config.get('tabs_position')
|
pref_pos = gajim.config.get('tabs_position')
|
||||||
if pref_pos != 'top':
|
if pref_pos == 'bottom':
|
||||||
if pref_pos == 'bottom':
|
nb_pos = gtk.POS_BOTTOM
|
||||||
nb_pos = gtk.POS_BOTTOM
|
elif pref_pos == 'left':
|
||||||
elif pref_pos == 'left':
|
nb_pos = gtk.POS_LEFT
|
||||||
nb_pos = gtk.POS_LEFT
|
elif pref_pos == 'right':
|
||||||
elif pref_pos == 'right':
|
nb_pos = gtk.POS_RIGHT
|
||||||
nb_pos = gtk.POS_RIGHT
|
|
||||||
else:
|
|
||||||
nb_pos = gtk.POS_TOP
|
|
||||||
else:
|
else:
|
||||||
nb_pos = gtk.POS_TOP
|
nb_pos = gtk.POS_TOP
|
||||||
self.notebook.set_tab_pos(nb_pos)
|
self.notebook.set_tab_pos(nb_pos)
|
||||||
|
@ -96,8 +93,6 @@ class MessageWindow:
|
||||||
self.notebook.drag_dest_set(gtk.DEST_DEFAULT_ALL, self.DND_TARGETS,
|
self.notebook.drag_dest_set(gtk.DEST_DEFAULT_ALL, self.DND_TARGETS,
|
||||||
gtk.gdk.ACTION_COPY)
|
gtk.gdk.ACTION_COPY)
|
||||||
|
|
||||||
self.window.show_all()
|
|
||||||
|
|
||||||
def _on_window_focus(self, widget, event):
|
def _on_window_focus(self, widget, event):
|
||||||
# window received focus, so if we had urgency REMOVE IT
|
# window received focus, so if we had urgency REMOVE IT
|
||||||
# NOTE: we do not have to read the message (it maybe in a bg tab)
|
# NOTE: we do not have to read the message (it maybe in a bg tab)
|
||||||
|
@ -601,19 +596,18 @@ class MessageWindowMgr:
|
||||||
if not gajim.config.get('saveposition'):
|
if not gajim.config.get('saveposition'):
|
||||||
size = (common.config.DEFAULT_WINDOW_WIDTH,
|
size = (common.config.DEFAULT_WINDOW_WIDTH,
|
||||||
common.config.DEFAULT_WINDOW_HEIGHT)
|
common.config.DEFAULT_WINDOW_HEIGHT)
|
||||||
else:
|
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:
|
size = (gajim.config.get_per('accounts', acct, 'msgwin-width'),
|
||||||
size = (gajim.config.get_per('accounts', acct, 'msgwin-width'),
|
gajim.config.get_per('accounts', acct, 'msgwin-height'))
|
||||||
gajim.config.get_per('accounts', acct, 'msgwin-height'))
|
elif self.mode == self.CONFIG_PERTYPE:
|
||||||
elif self.mode == self.CONFIG_PERTYPE:
|
if type == message_control.TYPE_PM:
|
||||||
if type == message_control.TYPE_PM:
|
type = message_control.TYPE_CHAT
|
||||||
type = message_control.TYPE_CHAT
|
opt_width = type + '-msgwin-width'
|
||||||
opt_width = type + '-msgwin-width'
|
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))
|
||||||
gtkgui_helpers.resize_window(win.window, size[0], size[1])
|
gtkgui_helpers.resize_window(win.window, size[0], size[1])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue