This commit is contained in:
parent
53b5de2d32
commit
65c2a2826e
|
@ -35,6 +35,7 @@ class Config:
|
|||
|
||||
__options = {
|
||||
# name: [ type, value ]
|
||||
'show_roster_on_startup': [opt_bool, True],
|
||||
'verbose': [ opt_bool, False ],
|
||||
'delauth': [ opt_bool, True ],
|
||||
'delroster': [ opt_bool, True ],
|
||||
|
|
|
@ -98,6 +98,16 @@ class Preferences_window:
|
|||
else:
|
||||
self.trayicon_checkbutton.set_sensitive(False)
|
||||
|
||||
#Show roster on Gajim startup
|
||||
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)
|
||||
else:
|
||||
show_roster_on_startup_checkbutton.set_sensitive(False)
|
||||
show_roster_on_startup_checkbutton.set_active(st)
|
||||
|
||||
#Save position
|
||||
st = gajim.config.get('saveposition')
|
||||
self.xml.get_widget('save_position_checkbutton').set_active(st)
|
||||
|
@ -426,9 +436,17 @@ class Preferences_window:
|
|||
gajim.config.set('trayicon', True)
|
||||
self.plugin.show_systray()
|
||||
self.plugin.roster.update_status_comboxbox()
|
||||
|
||||
self.xml.get_widget(
|
||||
'show_roster_on_startup_checkbutton').set_sensitive(True)
|
||||
else:
|
||||
gajim.config.set('trayicon', False)
|
||||
self.plugin.hide_systray()
|
||||
show_roster_on_startup_checkbutton = self.xml.get_widget(
|
||||
'show_roster_on_startup_checkbutton')
|
||||
gajim.config.set('show_roster_on_startup', True) # no tray, show roster!
|
||||
show_roster_on_startup_checkbutton.set_active(True)
|
||||
show_roster_on_startup_checkbutton.set_sensitive(False)
|
||||
self.plugin.roster.draw_roster()
|
||||
self.plugin.save_config()
|
||||
|
||||
|
@ -614,6 +632,11 @@ class Preferences_window:
|
|||
buf2[jid])
|
||||
window.load_var(jid, saved_var[jid])
|
||||
|
||||
def on_show_roster_on_startup_checkbutton_toggled(self, widget):
|
||||
active = widget.get_active()
|
||||
gajim.config.set('show_roster_on_startup', active)
|
||||
self.plugin.save_config()
|
||||
|
||||
def on_use_tabbed_chat_window_checkbutton_toggled(self, widget):
|
||||
if widget.get_active():
|
||||
gajim.config.set('usetabbedchat', True)
|
||||
|
|
|
@ -54,7 +54,7 @@ from common import optparser
|
|||
|
||||
profile = ''
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'hvp:', [ 'help', 'verbose',
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'hvp:', ['help', 'verbose',
|
||||
'profile='])
|
||||
except getopt.error, msg:
|
||||
print msg
|
||||
|
@ -783,7 +783,7 @@ class Interface:
|
|||
else:
|
||||
self.systray_capabilities = True
|
||||
self.systray = systray.Systray(self)
|
||||
if self.systray_capabilities:
|
||||
if self.systray_capabilities and gajim.config.get('trayicon'):
|
||||
self.show_systray()
|
||||
|
||||
if gajim.config.get('check_for_new_version'):
|
||||
|
|
|
@ -5792,6 +5792,26 @@ Custom</property>
|
|||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">6</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>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_show_roster_on_startup_checkbutton_toggled" last_modification_time="Wed, 01 Jun 2005 01:24:38 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="send_os_info_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
@ -868,7 +868,7 @@ class Roster_window:
|
|||
if (show == 'online' and not gajim.config.get('ask_online_status')) or \
|
||||
(show == 'offline' and not gajim.config.get('ask_offline_status')):
|
||||
lowered_uf_status_msg = helpers.get_uf_show(show).lower()
|
||||
return "I'm %s" % lowered_uf_status_msg
|
||||
return _("I'm %s") % lowered_uf_status_msg
|
||||
dlg = dialogs.Change_status_message_dialog(self.plugin, show)
|
||||
message = dlg.run()
|
||||
return message
|
||||
|
@ -1519,7 +1519,13 @@ class Roster_window:
|
|||
gajim.config.get('y-position'))
|
||||
self.window.resize(gajim.config.get('width'), \
|
||||
gajim.config.get('height'))
|
||||
self.window.show_all()
|
||||
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!
|
||||
|
||||
self.groups = {}
|
||||
self.contacts = {}
|
||||
self.newly_added = {}
|
||||
|
|
Loading…
Reference in New Issue