Fix autostarting daemon.

This commit is contained in:
Andrew Resch 2008-01-09 23:43:00 +00:00
parent 2e895795b6
commit e65d720890
2 changed files with 4 additions and 1 deletions

View File

@ -36,6 +36,7 @@ import pkg_resources
import gobject import gobject
import socket import socket
import os import os
import time
import deluge.component as component import deluge.component as component
import deluge.xmlrpclib as xmlrpclib import deluge.xmlrpclib as xmlrpclib

View File

@ -94,6 +94,9 @@ DEFAULT_PREFS = {
class GtkUI: class GtkUI:
def __init__(self, args): def __init__(self, args):
# Initialize gdk threading
gtk.gdk.threads_init()
# Initialize gettext # Initialize gettext
locale.setlocale(locale.LC_MESSAGES, '') locale.setlocale(locale.LC_MESSAGES, '')
locale.bindtextdomain("deluge", locale.bindtextdomain("deluge",
@ -143,7 +146,6 @@ class GtkUI:
self.connectionmanager.show() self.connectionmanager.show()
# Start the gtk main loop # Start the gtk main loop
gtk.gdk.threads_init()
gtk.main() gtk.main()
log.debug("gtkui shutting down..") log.debug("gtkui shutting down..")