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


import codecs
import gobject
import gtk
import gtk.gdk
import pango
import events
import parse_mirc
import urk
import windows
from conf import conf

    def __len__(self):
        return len(self.get_model())
    
    def index(self, item):
        for i, x in enumerate(self):
            if x == item:
                return i
                
        return -1
        
    def append(self, realname, markedupname, sortkey):
        self.get_model().append((realname, markedupname, sortkey))
 
    def insert(self, pos, realname, markedupname, sortkey):
        self.get_model().insert(pos, (realname, markedupname, sortkey))
        
    def replace(self, names):
        self.set_model(gtk.ListStore(str, str, str))
        
        self.insert_column_with_attributes(
            0, '', gtk.CellRendererText(), markup=1
            ).set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)

        for name in names:
            self.append(*name)
        
        self.get_model().set_sort_column_id(2, gtk.SORT_ASCENDING)

    def remove(self, realname):

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


# Path: platform/gtk/widgets.py
import codecs
import gobject
import gtk
import gtk.gdk
import pango
import events
import parse_mirc
import urk
import windows
from conf import conf


    def __len__(self):
        return len(self.get_model())
    
    def index(self, item):
        for i, x in enumerate(self):
            if x == item:
                return i
                
        return -1
        
    def append(self, realname, markedupname, sortkey):
        self.get_model().append((realname, markedupname, sortkey))
 
    def insert(self, pos, realname, markedupname, sortkey):
        self.get_model().insert(pos, (realname, markedupname, sortkey))
        
    def replace(self, names):
        self.set_model(gtk.ListStore(str, str, str))
        
        self.insert_column_with_attributes(
            0, '', gtk.CellRendererText(), markup=1
            ).set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)

        for name in names:
            self.append(*name)
        
        self.get_model().set_sort_column_id(2, gtk.SORT_ASCENDING)

    def remove(self, realname):

        index = self.index(realname)