removed is_initial in 'enable_dbus'
This commit is contained in:
parent
0314a99347
commit
c503bb7227
11
src/gajim.py
11
src/gajim.py
|
@ -859,23 +859,16 @@ class Interface:
|
||||||
def save_config(self):
|
def save_config(self):
|
||||||
parser.write()
|
parser.write()
|
||||||
|
|
||||||
def enable_dbus(self, is_initial = False):
|
def enable_dbus(self):
|
||||||
if 'remote_control' not in globals():
|
if 'remote_control' not in globals():
|
||||||
import remote_control
|
import remote_control
|
||||||
if not hasattr(self, 'remote') or not self.remote:
|
if not hasattr(self, 'remote') or not self.remote:
|
||||||
try:
|
try:
|
||||||
self.remote = remote_control.Remote(self)
|
self.remote = remote_control.Remote(self)
|
||||||
except remote_control.DbusNotSupported:
|
except remote_control.DbusNotSupported:
|
||||||
if not is_initial: # show only the first time
|
|
||||||
dialog = dialogs.ErrorDialog(
|
|
||||||
_('D-Bus is not present on this machine'),
|
|
||||||
_('Please install D-Bus if you want to use remote control.')).get_response()
|
|
||||||
self.remote = None
|
self.remote = None
|
||||||
return False
|
return False
|
||||||
except remote_control.SessionBusNotPresent:
|
except remote_control.SessionBusNotPresent:
|
||||||
if not is_initial: # show only the first time
|
|
||||||
dialog = dialogs.ErrorDialog(_('Session bus is not started'),
|
|
||||||
_('Your system is running without session bus daemon. \n See: http://trac.gajim.org/wiki/GajimDBus for instructions on how to enable it.')).get_response()
|
|
||||||
self.remote = None
|
self.remote = None
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
@ -949,7 +942,7 @@ _('Your system is running without session bus daemon. \n See: http://trac.gajim.
|
||||||
|
|
||||||
self.roster = roster_window.RosterWindow(self)
|
self.roster = roster_window.RosterWindow(self)
|
||||||
if gajim.config.get('use_dbus'):
|
if gajim.config.get('use_dbus'):
|
||||||
self.enable_dbus(True)
|
self.enable_dbus()
|
||||||
else:
|
else:
|
||||||
self.disable_dbus()
|
self.disable_dbus()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue