# Path: deluge/ui/client.py
# RPC_RESPONSE = 1
# RPC_ERROR = 2
# RPC_EVENT = 3
# def format_kwargs(kwargs):
#     def __init__(self, method, args, kwargs, exception_type, exception_msg, traceback):
#     def __repr__(self):
#     def format_message(self):
#     def connectionMade(self):
#     def dataReceived(self, data):
#     def send_request(self, request):
#     def __init__(self, daemon, event_handlers):
#     def startedConnecting(self, connector):
#     def clientConnectionFailed(self, connector, reason):
#     def clientConnectionLost(self, connector, reason):
#     def __init__(self, event_handlers={}):
#     def connect(self, host, port, username, password):
#     def disconnect(self):
#     def call(self, method, *args, **kwargs):
#     def pop_deferred(self, request_id):
#     def register_event_handler(self, event, handler):
#     def deregister_event_handler(self, event, handler):
#     def __rpcError(self, error_data):
#     def __on_connect(self, result, username, password):
#     def __on_connect_fail(self, reason):
#     def __on_login(self, result, username):
#     def __on_login_fail(self, result):
#     def set_disconnect_callback(self, cb):
#     def get_bytes_recv(self):
#     def get_bytes_sent(self):
#     def __init__(self, event_handlers={}):
#     def disconnect(self):
#     def call(self, method, *args, **kwargs):
#     def register_event_handler(self, event, handler):
#     def deregister_event_handler(self, event, handler):
#     def __init__(self, daemon, method):
#     def __call__(self, *args, **kwargs):
#     def __getattr__(self, name):
#     def __call__(self, *args, **kwargs):
#     def __init__(self):
#     def connect(self, host="127.0.0.1", port=58846, username="", password=""):
#         def on_connect_fail(result):
#     def disconnect(self):
#     def start_classic_mode(self):
#     def start_daemon(self, port, config):
#     def is_localhost(self):
#     def is_classicmode(self):
#     def connected(self):
#     def connection_info(self):
#     def register_event_handler(self, event, handler):
#     def deregister_event_handler(self, event, handler):
#     def force_call(self, block=False):
#     def __getattr__(self, method):
#     def set_disconnect_callback(self, cb):
#     def __on_disconnect(self):
#     def get_bytes_recv(self):
#     def get_bytes_sent(self):
# class DelugeRPCError(object):
# class DelugeRPCRequest(object):
# class DelugeRPCProtocol(Protocol):
# class DelugeRPCClientFactory(ClientFactory):
# class DaemonProxy(object):
# class DaemonSSLProxy(DaemonProxy):
# class DaemonClassicProxy(DaemonProxy):
# class DottedObject(object):
# class RemoteMethod(DottedObject):
# class Client(object):


import pygtk
import gtk, gtk.glade
import pkg_resources
import deluge.component as component
import deluge.common
import deluge.error
import common
import deluge.configmanager
        import base64
        import shutil
        import os.path
from deluge.log import LOG as log
from deluge.ui.client import client
from deluge.configmanager import ConfigManager
            from hashlib import sha1 as sha_hash
            from sha import new as sha_hash
                "download_path_button": \
                    ("filename", self.core_config["download_location"]),
                "chk_move_completed": \
                    ("active", self.core_config["move_completed"]),
                "move_completed_path_button": \
                    ("filename", self.core_config["move_completed_path"]),
                "chk_copy_torrent_file": \
                    ("active", self.core_config["copy_torrent_file"]),
                "chk_del_copy_torrent_file": \
                    ("active", self.core_config["del_copy_torrent_file"]),
                "torrent_files_button": \
                    ("filename", self.core_config["torrentfiles_location"]),
                "chk_autoadd": \
                    ("active", self.core_config["autoadd_enable"]),
                "folder_autoadd": \
                    ("filename", self.core_config["autoadd_location"]),
                "radio_compact_allocation": \
                    ("active", self.core_config["compact_allocation"]),
                "radio_full_allocation": \
                    ("not_active", self.core_config["compact_allocation"]),
                "chk_prioritize_first_last_pieces": \
                    ("active",
                        self.core_config["prioritize_first_last_pieces"]),
                "chk_add_paused": ("active", self.core_config["add_paused"]),
                "spin_port_min": ("value", self.core_config["listen_ports"][0]),
                "spin_port_max": ("value", self.core_config["listen_ports"][1]),
                "active_port_label": ("text", str(self.active_port)),
                "chk_random_port": ("active", self.core_config["random_port"]),
                "spin_outgoing_port_min": ("value", self.core_config["outgoing_ports"][0]),
                "spin_outgoing_port_max": ("value", self.core_config["outgoing_ports"][1]),

# Path: deluge/ui/client.py
# RPC_RESPONSE = 1
# RPC_ERROR = 2
# RPC_EVENT = 3
# def format_kwargs(kwargs):
#     def __init__(self, method, args, kwargs, exception_type, exception_msg, traceback):
#     def __repr__(self):
#     def format_message(self):
#     def connectionMade(self):
#     def dataReceived(self, data):
#     def send_request(self, request):
#     def __init__(self, daemon, event_handlers):
#     def startedConnecting(self, connector):
#     def clientConnectionFailed(self, connector, reason):
#     def clientConnectionLost(self, connector, reason):
#     def __init__(self, event_handlers={}):
#     def connect(self, host, port, username, password):
#     def disconnect(self):
#     def call(self, method, *args, **kwargs):
#     def pop_deferred(self, request_id):
#     def register_event_handler(self, event, handler):
#     def deregister_event_handler(self, event, handler):
#     def __rpcError(self, error_data):
#     def __on_connect(self, result, username, password):
#     def __on_connect_fail(self, reason):
#     def __on_login(self, result, username):
#     def __on_login_fail(self, result):
#     def set_disconnect_callback(self, cb):
#     def get_bytes_recv(self):
#     def get_bytes_sent(self):
#     def __init__(self, event_handlers={}):
#     def disconnect(self):
#     def call(self, method, *args, **kwargs):
#     def register_event_handler(self, event, handler):
#     def deregister_event_handler(self, event, handler):
#     def __init__(self, daemon, method):
#     def __call__(self, *args, **kwargs):
#     def __getattr__(self, name):
#     def __call__(self, *args, **kwargs):
#     def __init__(self):
#     def connect(self, host="127.0.0.1", port=58846, username="", password=""):
#         def on_connect_fail(result):
#     def disconnect(self):
#     def start_classic_mode(self):
#     def start_daemon(self, port, config):
#     def is_localhost(self):
#     def is_classicmode(self):
#     def connected(self):
#     def connection_info(self):
#     def register_event_handler(self, event, handler):
#     def deregister_event_handler(self, event, handler):
#     def force_call(self, block=False):
#     def __getattr__(self, method):
#     def set_disconnect_callback(self, cb):
#     def __on_disconnect(self):
#     def get_bytes_recv(self):
#     def get_bytes_sent(self):
# class DelugeRPCError(object):
# class DelugeRPCRequest(object):
# class DelugeRPCProtocol(Protocol):
# class DelugeRPCClientFactory(ClientFactory):
# class DaemonProxy(object):
# class DaemonSSLProxy(DaemonProxy):
# class DaemonClassicProxy(DaemonProxy):
# class DottedObject(object):
# class RemoteMethod(DottedObject):
# class Client(object):


# Path: deluge/ui/gtkui/preferences.py
import pygtk
import gtk, gtk.glade
import pkg_resources
import deluge.component as component
import deluge.common
import deluge.error
import common
import deluge.configmanager
        import base64
        import shutil
        import os.path
from deluge.log import LOG as log
from deluge.ui.client import client
from deluge.configmanager import ConfigManager
            from hashlib import sha1 as sha_hash
            from sha import new as sha_hash

                "download_path_button": \
                    ("filename", self.core_config["download_location"]),
                "chk_move_completed": \
                    ("active", self.core_config["move_completed"]),
                "move_completed_path_button": \
                    ("filename", self.core_config["move_completed_path"]),
                "chk_copy_torrent_file": \
                    ("active", self.core_config["copy_torrent_file"]),
                "chk_del_copy_torrent_file": \
                    ("active", self.core_config["del_copy_torrent_file"]),
                "torrent_files_button": \
                    ("filename", self.core_config["torrentfiles_location"]),
                "chk_autoadd": \
                    ("active", self.core_config["autoadd_enable"]),
                "folder_autoadd": \
                    ("filename", self.core_config["autoadd_location"]),
                "radio_compact_allocation": \
                    ("active", self.core_config["compact_allocation"]),
                "radio_full_allocation": \
                    ("not_active", self.core_config["compact_allocation"]),
                "chk_prioritize_first_last_pieces": \
                    ("active",
                        self.core_config["prioritize_first_last_pieces"]),
                "chk_add_paused": ("active", self.core_config["add_paused"]),
                "spin_port_min": ("value", self.core_config["listen_ports"][0]),
                "spin_port_max": ("value", self.core_config["listen_ports"][1]),
                "active_port_label": ("text", str(self.active_port)),
                "chk_random_port": ("active", self.core_config["random_port"]),
                "spin_outgoing_port_min": ("value", self.core_config["outgoing_ports"][0]),
                "spin_outgoing_port_max": ("value", self.core_config["outgoing_ports"][1]),

                "chk_random_outgoing_ports": ("active", self.core_config["random_outgoing_ports"]),