removed is_initial in 'enable_dbus'
This commit is contained in:
parent
0314a99347
commit
c503bb7227
13
src/gajim.py
13
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,10 +942,10 @@ _('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()
|
||||||
|
|
||||||
path_to_file = os.path.join(gajim.DATA_DIR, 'pixmaps/gajim.png')
|
path_to_file = os.path.join(gajim.DATA_DIR, 'pixmaps/gajim.png')
|
||||||
pix = gtk.gdk.pixbuf_new_from_file(path_to_file)
|
pix = gtk.gdk.pixbuf_new_from_file(path_to_file)
|
||||||
gtk.window_set_default_icon(pix) # set the icon to all newly opened windows
|
gtk.window_set_default_icon(pix) # set the icon to all newly opened windows
|
||||||
|
|
Loading…
Reference in New Issue