don't hide roster on startup if no systray module is available

This commit is contained in:
Yann Leboulanger 2008-04-17 06:34:32 +00:00
parent fbc1ae9b5c
commit 2d04fc6ae6
2 changed files with 9 additions and 8 deletions

View File

@ -2964,8 +2964,6 @@ class Interface:
gajim.status_before_autoaway[a] = '' gajim.status_before_autoaway[a] = ''
gajim.transport_avatar[a] = {} gajim.transport_avatar[a] = {}
self.roster = roster_window.RosterWindow()
if gajim.config.get('remote_control'): if gajim.config.get('remote_control'):
try: try:
import remote_control import remote_control
@ -3013,11 +3011,6 @@ class Interface:
self.show_vcard_when_connect = [] self.show_vcard_when_connect = []
path_to_file = os.path.join(gajim.DATA_DIR, 'pixmaps', 'gajim.png')
pix = gtk.gdk.pixbuf_new_from_file(path_to_file)
# set the icon to all newly opened windows
gtk.window_set_default_icon(pix)
self.roster.window.set_icon_from_file(path_to_file) # and to roster window
self.sleeper = common.sleepy.Sleepy( self.sleeper = common.sleepy.Sleepy(
gajim.config.get('autoawaytime') * 60, # make minutes to seconds gajim.config.get('autoawaytime') * 60, # make minutes to seconds
gajim.config.get('autoxatime') * 60) gajim.config.get('autoxatime') * 60)
@ -3042,6 +3035,14 @@ class Interface:
if self.systray_capabilities and gajim.config.get('trayicon'): if self.systray_capabilities and gajim.config.get('trayicon'):
self.show_systray() self.show_systray()
self.roster = roster_window.RosterWindow()
path_to_file = os.path.join(gajim.DATA_DIR, 'pixmaps', 'gajim.png')
pix = gtk.gdk.pixbuf_new_from_file(path_to_file)
# set the icon to all newly opened windows
gtk.window_set_default_icon(pix)
self.roster.window.set_icon_from_file(path_to_file) # and to roster window
self.init_emoticons() self.init_emoticons()
self.make_regexps() self.make_regexps()

View File

@ -5564,7 +5564,7 @@ class RosterWindow:
if gajim.config.get('show_roster_on_startup'): if gajim.config.get('show_roster_on_startup'):
self.window.show_all() self.window.show_all()
else: else:
if not gajim.config.get('trayicon'): if not gajim.config.get('trayicon') or not gajim.interface.systray_capabilities:
# cannot happen via GUI, but I put this incase user touches # cannot happen via GUI, but I put this incase user touches
# config. without trayicon, he or she should see the roster! # config. without trayicon, he or she should see the roster!
self.window.show_all() self.window.show_all()