hide show_roster_on_startup from windows [no trayicon]

This commit is contained in:
Nikos Kouremenos 2005-06-06 13:12:12 +00:00
parent 2cc9a0aa5c
commit 79ddc9d228
3 changed files with 9 additions and 5 deletions

View File

@ -102,11 +102,14 @@ class Preferences_window:
st = gajim.config.get('show_roster_on_startup')
show_roster_on_startup_checkbutton = self.xml.get_widget(
'show_roster_on_startup_checkbutton')
if gajim.config.get('trayicon'): # allow it only when trayicon ON
show_roster_on_startup_checkbutton.set_active(st)
if os.name == 'nt':
show_roster_on_startup_checkbutton.set_no_show_all(True)
else:
show_roster_on_startup_checkbutton.set_sensitive(False)
show_roster_on_startup_checkbutton.set_active(st)
if gajim.config.get('trayicon'): # allow it only when trayicon ON
show_roster_on_startup_checkbutton.set_active(st)
else:
show_roster_on_startup_checkbutton.set_sensitive(False)
show_roster_on_startup_checkbutton.set_active(st)
#Save position
st = gajim.config.get('saveposition')

View File

@ -5794,7 +5794,6 @@ Custom</property>
<child>
<widget class="GtkCheckButton" id="show_roster_on_startup_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Show roster window on startup</property>
<property name="use_underline">True</property>

View File

@ -1519,12 +1519,14 @@ class Roster_window:
gajim.config.get('y-position'))
self.window.resize(gajim.config.get('width'), \
gajim.config.get('height'))
if gajim.config.get('show_roster_on_startup'):
self.window.show_all()
else:
if not gajim.config.get('trayicon'):
# cannot happen via GUI, but I put this incase user touches config
self.window.show_all() # without trayicon, he should see the roster!
gajim.config.set('show_roster_on_startup', True)
self.groups = {}
self.contacts = {}