# Path: conf.py
# CONF_FILE = os.path.join(urk.userpath,'urk.conf')
# def pprint(obj, depth=-2):
# def save(*args):


import sys #only needed for the stupid workaround
import os
import thread
import socket
import signal
import commands
import gobject
import gtk
import irc
import events
    import remote
import widgets
import windows
from conf import conf
            
        if is_stopped.enabled:
            def callback():           
                if is_stopped.enabled:
                    cb(result, error)

            register_idle(callback)

    thread.start_new_thread(thread_func, ())
    return is_stopped

set_style = widgets.set_style

#open_file(filename)
#opens a file or url using the "right" program
if hasattr(os,'startfile'):
    open_file = os.startfile
else:
    open_file_cmd = "" #cache results of searching for the os program
    os_commands = ( #list of commands to search for for opening files
        ('xdg-open', ('xdg-open',)),
        ('/usr/bin/open', ('/usr/bin/open',)),
        ('gnome-open', ('gnome-open',)),
        ('kfmclient', ('kfmclient','exec')),
        ('sensible-browser', ('sensible-browser')),
        )
    def open_file(filename):
        flags = gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN | gobject.SPAWN_SEARCH_PATH
        filename = str(filename) #gobject won't accept unicode strings
        if conf.get('open-file-command'):

# Path: conf.py
# CONF_FILE = os.path.join(urk.userpath,'urk.conf')
# def pprint(obj, depth=-2):
# def save(*args):


# Path: platform/gtk/ui.py
import sys #only needed for the stupid workaround
import os
import thread
import socket
import signal
import commands
import gobject
import gtk
import irc
import events
    import remote
import widgets
import windows
from conf import conf

            
        if is_stopped.enabled:
            def callback():           
                if is_stopped.enabled:
                    cb(result, error)

            register_idle(callback)

    thread.start_new_thread(thread_func, ())
    return is_stopped

set_style = widgets.set_style

#open_file(filename)
#opens a file or url using the "right" program
if hasattr(os,'startfile'):
    open_file = os.startfile
else:
    open_file_cmd = "" #cache results of searching for the os program
    os_commands = ( #list of commands to search for for opening files
        ('xdg-open', ('xdg-open',)),
        ('/usr/bin/open', ('/usr/bin/open',)),
        ('gnome-open', ('gnome-open',)),
        ('kfmclient', ('kfmclient','exec')),
        ('sensible-browser', ('sensible-browser')),
        )
    def open_file(filename):
        flags = gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN | gobject.SPAWN_SEARCH_PATH
        filename = str(filename) #gobject won't accept unicode strings
        if conf.get('open-file-command'):

            command = conf['open-file-command'].split(' ') + [filename]