add an option to allow hidding roster even if systray is not shown. Fixes #6930
This commit is contained in:
parent
9308d3af17
commit
611eb69e73
|
@ -86,7 +86,8 @@ class Config:
|
||||||
'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.') ],
|
'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_online_status': [ opt_bool, False ],
|
||||||
'ask_offline_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 ],
|
'iconset': [ opt_str, DEFAULT_ICONSET, '', True ],
|
||||||
'mood_iconset': [ opt_str, DEFAULT_MOOD_ICONSET, '', True ],
|
'mood_iconset': [ opt_str, DEFAULT_MOOD_ICONSET, '', True ],
|
||||||
'activity_iconset': [ opt_str, DEFAULT_ACTIVITY_ICONSET, '', True ],
|
'activity_iconset': [ opt_str, DEFAULT_ACTIVITY_ICONSET, '', True ],
|
||||||
|
|
|
@ -2310,9 +2310,9 @@ class RosterWindow:
|
||||||
"""
|
"""
|
||||||
Main window X button was clicked
|
Main window X button was clicked
|
||||||
"""
|
"""
|
||||||
if gajim.interface.systray_enabled and not gajim.config.get(
|
if not gajim.config.get('quit_on_roster_x_button') and (
|
||||||
'quit_on_roster_x_button') and gajim.config.get('trayicon') != \
|
(gajim.interface.systray_enabled and gajim.config.get('trayicon') != \
|
||||||
'on_event':
|
'on_event') or gajim.config.get('allow_hide_roster')):
|
||||||
self.tooltip.hide_tooltip()
|
self.tooltip.hide_tooltip()
|
||||||
if gajim.config.get('save-roster-position'):
|
if gajim.config.get('save-roster-position'):
|
||||||
x, y = self.window.get_position()
|
x, y = self.window.get_position()
|
||||||
|
@ -3878,8 +3878,10 @@ class RosterWindow:
|
||||||
# let message window close the tab
|
# let message window close the tab
|
||||||
return
|
return
|
||||||
list_of_paths = self.tree.get_selection().get_selected_rows()[1]
|
list_of_paths = self.tree.get_selection().get_selected_rows()[1]
|
||||||
if not len(list_of_paths) and gajim.interface.systray_enabled and \
|
if not len(list_of_paths) and not gajim.config.get(
|
||||||
not gajim.config.get('quit_on_roster_x_button'):
|
'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.tooltip.hide_tooltip()
|
||||||
self.window.hide()
|
self.window.hide()
|
||||||
elif event.state & gtk.gdk.CONTROL_MASK and event.keyval == \
|
elif event.state & gtk.gdk.CONTROL_MASK and event.keyval == \
|
||||||
|
|
Loading…
Reference in New Issue