changeset fdbb8050d2a2 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=fdbb8050d2a2
description: add an option to allow hidding roster even if systray is not shown. Fixes #6930
diffstat:
src/common/config.py | 3 ++-
src/roster_window.py | 12 +++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 3b94370166b5 -r fdbb8050d2a2 src/common/config.py
--- a/src/common/config.py Sat Jul 23 23:18:17 2011 +0200
+++ b/src/common/config.py Sun Jul 24 10:54:43 2011 +0200
@@ -86,7 +86,8 @@
'autoxa_message': [ opt_str, _('$S (Not available as a result of being idle more than $T min)'), _('$S will be replaced by current status message, $T by autoxa time.') ],
'ask_online_status': [ opt_bool, False ],
'ask_offline_status': [ opt_bool, False ],
- 'trayicon': [opt_str, 'always', _("When to show notification area icon. Can be 'never', 'on_event', 'always'."), True],
+ 'trayicon': [opt_str, 'always', _("When to show notification area icon. Can be 'never', 'on_event', 'always'."), False],
+ 'allow_hide_roster': [opt_bool, False, _("Allow to hide the roster window even if the tray icon is not shown."), False],
'iconset': [ opt_str, DEFAULT_ICONSET, '', True ],
'mood_iconset': [ opt_str, DEFAULT_MOOD_ICONSET, '', True ],
'activity_iconset': [ opt_str, DEFAULT_ACTIVITY_ICONSET, '', True ],
diff -r 3b94370166b5 -r fdbb8050d2a2 src/roster_window.py
--- a/src/roster_window.py Sat Jul 23 23:18:17 2011 +0200
+++ b/src/roster_window.py Sun Jul 24 10:54:43 2011 +0200
@@ -2310,9 +2310,9 @@
"""
Main window X button was clicked
"""
- if gajim.interface.systray_enabled and not gajim.config.get(
- 'quit_on_roster_x_button') and gajim.config.get('trayicon') != \
- 'on_event':
+ if not gajim.config.get('quit_on_roster_x_button') and (
+ (gajim.interface.systray_enabled and gajim.config.get('trayicon') != \
+ 'on_event') or gajim.config.get('allow_hide_roster')):
self.tooltip.hide_tooltip()
if gajim.config.get('save-roster-position'):
x, y = self.window.get_position()
@@ -3878,8 +3878,10 @@
# let message window close the tab
return
list_of_paths = self.tree.get_selection().get_selected_rows()[1]
- if not len(list_of_paths) and gajim.interface.systray_enabled and \
- not gajim.config.get('quit_on_roster_x_button'):
+ if not len(list_of_paths) and not gajim.config.get(
+ 'quit_on_roster_x_button') and ((gajim.interface.systray_enabled and\
+ gajim.config.get('trayicon') == 'always') or gajim.config.get(
+ 'allow_hide_roster')):
self.tooltip.hide_tooltip()
self.window.hide()
elif event.state & gtk.gdk.CONTROL_MASK and event.keyval == \