Skip to content
Snippets Groups Projects
Commit 266cff9d authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

do not ask the offline status message when we quit Gajim if all accounts are already offline

parent 4f9c6165
No related branches found
No related tags found
No related merge requests found
......@@ -932,12 +932,18 @@ class roster_window:
self.window.hide()
else:
accounts = self.plugin.accounts.keys()
message = self.get_status_message('offline')
if message == -1:
message = ''
get_msg = False
for acct in accounts:
if self.plugin.connected[acct]:
self.send_status(acct, 'offline', message)
get_msg = True
break
if get_msg:
message = self.get_status_message('offline')
if message == -1:
message = ''
for acct in accounts:
if self.plugin.connected[acct]:
self.send_status(acct, 'offline', message)
self.quit_gtkgui_plugin()
return 1
......@@ -961,12 +967,18 @@ class roster_window:
def on_quit_menuitem_activate(self, widget):
accounts = self.plugin.accounts.keys()
message = self.get_status_message('offline')
if message == -1:
message = ''
get_msg = False
for acct in accounts:
if self.plugin.connected[acct]:
self.send_status(acct, 'offline', message)
get_msg = True
break
if get_msg:
message = self.get_status_message('offline')
if message == -1:
message = ''
for acct in accounts:
if self.plugin.connected[acct]:
self.send_status(acct, 'offline', message)
self.quit_gtkgui_plugin()
def on_roster_treeview_row_activated(self, widget, path, col=0):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment