def create(self):
    self.connect("destroy", self.destroy_cb)
    
    ClientUtil.add_updater(self)
    self.catch_event("no_credits")
    
    def on_launched(button):
      self.start()
    self._start_listening_for_event("launched", self.app, on_launched)
    
    self.popupMenu = TorrentPopupMenu(self)
      
    #everything changes in relation to this magic number
    maggicPadding = 2
    
    self.statusRow = BTUtilityStatusRow(self.app, maggicPadding)
    self.buttonRow = BTUtilityButtonRow(self.app, maggicPadding)
    self._start_listening_for_event("add_file", self.buttonRow, self._add_file_cb)
    self._start_listening_for_event("remove_file", self.buttonRow, self._remove_file_cb) 
    self._start_listening_for_event("pause_torrent", self.buttonRow, self._pause_cb) 
    self._start_listening_for_event("toggle_anonymity", self.buttonRow, self._toggle_anon_cb)
    
    self.rows = {}
    self.curDownload = None
    self.exitDialog = None
    self.trackerEditDialog = None
    
    #create a liststore with one string column to use as the model
                #COLUMNS:
                #0:  File name
    typeList = [gobject.TYPE_STRING,
                #1:  Amount done
                gobject.TYPE_FLOAT,
                #2:  Status
                gobject.TYPE_STRING,
                #3:  ETA
                gobject.TYPE_STRING,
                #4:  Peers
                gobject.TYPE_STRING,
                #5:  Seeds
                gobject.TYPE_STRING,
                #6:  Download Rate
                gobject.TYPE_STRING,
                #7:  Upload Rate
                gobject.TYPE_STRING,
                #8:  Download Amount
                gobject.TYPE_STRING,
                #9:  Upload Amount
                gobject.TYPE_STRING,
                #10:  Upload Amount
                gobject.TYPE_STRING,
                #11:  the hash for the download.  Stored hex-encoded, because nulls mess up gtk
                gobject.TYPE_STRING,
                #12:  is the row visible?
                gobject.TYPE_BOOLEAN
                ]
    self.attrIdx = {}
    self.attrIdx["name"]         = 0
    self.attrIdx["progress"]     = 1
    self.attrIdx["progressMsg"]  = 2
    self.attrIdx["status"]       = 3
    self.attrIdx["peers"]        = 4
    self.attrIdx["seeds"]        = 5
    self.attrIdx["rateUp"]       = 6
    self.attrIdx["rateDown"]     = 7
    self.attrIdx["amountUp"]     = 8
    self.attrIdx["amountDown"]   = 9
    self.attrIdx["copies"]       = 10
    self.attrIdx["hash"]         = 11
    self.attrIdx["visibility"]   = 12
    self.liststore = gtk.ListStore(*typeList)
    COLUMN_NAMES = ["Name", "Progress", "Time Left", "Peers", "Seeds", "Down Rate", "Up Rate", "Down Amt", "Up Amt", "Copies"]
    
    modelfilter, treeview = GTKUtils.make_listview(self.liststore, COLUMN_NAMES)
    GTKUtils.make_text_cell(treeview.columns[0], 0)
    GTKUtils.make_progress_cell(treeview.columns[1], 1, 2)
    for i in range (2, len(COLUMN_NAMES)):
      GTKUtils.make_text_cell(treeview.columns[i], i+1)
    
    #make treeview searchable
    treeview.set_search_column(0)
    #attach the filtermodel and treeview
    treeview.set_model(gtk.TreeModelSort(modelfilter))
    treeview.connect("cursor-changed", self.row_change_cb)
    treeview.connect("button-press-event", self.button_press_cb)
    treeview.connect("button-press-event", self.button_press_cb)
#    treeview.set_size_request(-1, 30)
    treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
    
    self.treeview, self.modelfilter = treeview, modelfilter
    self.modelfilter.set_visible_func(self.visible_cb)
    
    topBox = gtk.VBox()
    topBox.pack_start(self.buttonRow, False, False, 0)
    scrolledTorrentsBox = GTKUtils.make_scroll_box(treeview, hPolicy=gtk.POLICY_AUTOMATIC, vPolicy=gtk.POLICY_AUTOMATIC)
    scrolledTorrentsBoxAlign = gtk.Alignment(0, 0, 1, 1) 
    scrolledTorrentsBoxAlign.set_padding(0, maggicPadding, maggicPadding, maggicPadding)
    scrolledTorrentsBoxAlign.add(scrolledTorrentsBox)

    topBox.pack_start(scrolledTorrentsBoxAlign, True, True, 0)
    
    self.priorityBox = gtk.HBox()
    self.priorityBox.pack_start(gtk.Label("Select a torrent to set the priority for its files."), True, True, 0)
    self.priorityBox.set_border_width(0)
    
    self.peerBox = gtk.HBox()
    self.peerBox.pack_start(gtk.Label("Select a torrent to see your peers in the swarm."), True, True, 0)
    
    self.bwGraph = BWGraph.BWGraph(self.app, root=self)
    self.bwGraph.container.set_size_request(-1, 150)

    self.notebook = ClosableTabNotebook.ClosableTabNotebook()
    self.notebook.set_show_border(True)
    self.notebook.set_border_width(0)
    self.bwGraph.label = gtk.Label("BitTorrent Traffic")
    self.priorityBox.label = gtk.Label("Priorities")
    self.priorityBox.container = self.priorityBox
    self.peerBox.label = gtk.Label("Peers")
    self.peerBox.container = self.peerBox
    self.notebook.show_display(self.bwGraph)
    self.notebook.show_display(self.priorityBox)
    self.notebook.show_display(self.peerBox)
    self.notebook.show_display(self.bwGraph)
    
    alignBottom = gtk.Alignment(0, 0, 1, 1)
    alignBottom.set_padding(0, maggicPadding + 3, maggicPadding + 2, maggicPadding + 2)
    alignBottom.add(self.notebook)
    
    vBoxBottom = gtk.VBox()
    vBoxBottom.pack_start(alignBottom, True, True, 0)
    vBoxBottom.pack_end(self.statusRow, False, False, 0)
    
    vpane = gtk.VPaned()
    
    self.menuBar = BitTorrentMenuBar(self.controller, self)    
    
    frame = gtk.Frame()
    frame.set_shadow_type(gtk.SHADOW_OUT)
    frame.add(topBox)
    
    alignTop = gtk.Alignment(1, 1, 1, 1)
    alignTop.set_padding(10, 0, maggicPadding + 3, maggicPadding + 3)
    alignTop.add(frame)
    
    topContainer = gtk.VBox()
    topContainer.pack_start(self.menuBar.create_menus(), False, False, 0)
    topContainer.pack_start(alignTop, True, True, 0)
    
    vpane.pack1(topContainer, resize=True, shrink=False)
    vpane.pack2(vBoxBottom, resize=False, shrink=False)
    
    self.label = gtk.Label("")
    self.label.set_markup("<span size='x-large' weight='bold'>Bit Twister</span>")
    self.container = vpane
    vpane.set_position(400)
    self.add(self.container)
    self.container.show_all()
Beispiel #2
0
  def __init__(self, app, torrentHash, data):
    self.app = app
    ClientUtil.add_updater(self)
    self.torrentHash = torrentHash
    self.torrentData = data
    self.download = None
    #a mapping from peer id to row
    self.peerRows = {}
    self.attrIdx = {}
    
    self.COLUMNS = [ ("ip",           "IP",        "string"),
                     ("upRate",       "uRate",     "rate"),
                     ("downRate",     "dRate",     "rate"),
                     ("upTotal",      "uTotal",    "amount"),
                     ("downTotal",    "dTotal",    "amount"),
                     ("upChoked",     "uChoked",   "string"),
                     ("downChoked",   "dChoked",   "string"),
                     ("snub",         "Snub",      "string"),
                     ("upInterest",   "uInterest", "string"),
                     ("downInterest", "dInterest", "string"),
                     ("speed",        "Speed",     "rate"),
                     ("requests",     "Requests",  "string"),
                     ("circ",         "Circ",      "string"),
                     ("amountDone",   "Done",      "percent"),
                     ("client",       "Client",    "string"),
                     ("id",           "ID",        "string")]
    COLUMN_NAMES = [columnTuple[1] for columnTuple in self.COLUMNS]
    TYPE_LIST = []
    for columnTuple in self.COLUMNS:
      columnType = columnTuple[2]
      if columnType in ("string"):
        TYPE_LIST.append(gobject.TYPE_STRING)
      elif columnType == "amount":
        TYPE_LIST.append(gobject.TYPE_INT)
      elif columnType in ("rate", "percent"):
        TYPE_LIST.append(gobject.TYPE_FLOAT)
      else:
        raise Exception("Bad type for column:  %s" % (columnType))

    self.liststore = gtk.ListStore(*TYPE_LIST)
    modelfilter, treeview = GTKUtils.make_listview(self.liststore, COLUMN_NAMES)
    for i in range(0, len(self.COLUMNS)):
      attrName = self.COLUMNS[i][0]
      attrType = self.COLUMNS[i][2]
      self.attrIdx[attrName] = i
      if attrType == "string":
        GTKUtils.make_text_cell(treeview.columns[i], i, makeSortable=True)
      else:
        cellFunc = getattr(self, "_cell_data_" + attrType)
        self._make_number_cell(treeview.columns[i], i, cellFunc)
        
    #make treeview searchable
    treeview.set_search_column(0)
    #attach the filtermodel and treeview
    self.model = gtk.TreeModelSort(modelfilter)
    treeview.set_model(self.model)
    treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
    self.modelfilter, self.treeview = modelfilter, treeview
    scrolled_window = GTKUtils.make_scroll_box(self.treeview, hPolicy=gtk.POLICY_AUTOMATIC, vPolicy=gtk.POLICY_AUTOMATIC)
    scrolled_window.set_size_request(-1, 200)
    self.container = scrolled_window
Beispiel #3
0
    def create(self):
        self.connect("destroy", self.destroy_cb)

        ClientUtil.add_updater(self)
        self.catch_event("no_credits")

        def on_launched(button):
            self.start()

        self._start_listening_for_event("launched", self.app, on_launched)

        self.popupMenu = TorrentPopupMenu(self)

        #everything changes in relation to this magic number
        maggicPadding = 2

        self.statusRow = BTUtilityStatusRow(self.app, maggicPadding)
        self.buttonRow = BTUtilityButtonRow(self.app, maggicPadding)
        self._start_listening_for_event("add_file", self.buttonRow,
                                        self._add_file_cb)
        self._start_listening_for_event("remove_file", self.buttonRow,
                                        self._remove_file_cb)
        self._start_listening_for_event("pause_torrent", self.buttonRow,
                                        self._pause_cb)
        self._start_listening_for_event("toggle_anonymity", self.buttonRow,
                                        self._toggle_anon_cb)

        self.rows = {}
        self.curDownload = None
        self.exitDialog = None
        self.trackerEditDialog = None

        #create a liststore with one string column to use as the model
        #COLUMNS:
        #0:  File name
        typeList = [
            gobject.TYPE_STRING,
            #1:  Amount done
            gobject.TYPE_FLOAT,
            #2:  Status
            gobject.TYPE_STRING,
            #3:  ETA
            gobject.TYPE_STRING,
            #4:  Peers
            gobject.TYPE_STRING,
            #5:  Seeds
            gobject.TYPE_STRING,
            #6:  Download Rate
            gobject.TYPE_STRING,
            #7:  Upload Rate
            gobject.TYPE_STRING,
            #8:  Download Amount
            gobject.TYPE_STRING,
            #9:  Upload Amount
            gobject.TYPE_STRING,
            #10:  Upload Amount
            gobject.TYPE_STRING,
            #11:  the hash for the download.  Stored hex-encoded, because nulls mess up gtk
            gobject.TYPE_STRING,
            #12:  is the row visible?
            gobject.TYPE_BOOLEAN
        ]
        self.attrIdx = {}
        self.attrIdx["name"] = 0
        self.attrIdx["progress"] = 1
        self.attrIdx["progressMsg"] = 2
        self.attrIdx["status"] = 3
        self.attrIdx["peers"] = 4
        self.attrIdx["seeds"] = 5
        self.attrIdx["rateUp"] = 6
        self.attrIdx["rateDown"] = 7
        self.attrIdx["amountUp"] = 8
        self.attrIdx["amountDown"] = 9
        self.attrIdx["copies"] = 10
        self.attrIdx["hash"] = 11
        self.attrIdx["visibility"] = 12
        self.liststore = gtk.ListStore(*typeList)
        COLUMN_NAMES = [
            "Name", "Progress", "Time Left", "Peers", "Seeds", "Down Rate",
            "Up Rate", "Down Amt", "Up Amt", "Copies"
        ]

        modelfilter, treeview = GTKUtils.make_listview(self.liststore,
                                                       COLUMN_NAMES)
        GTKUtils.make_text_cell(treeview.columns[0], 0)
        GTKUtils.make_progress_cell(treeview.columns[1], 1, 2)
        for i in range(2, len(COLUMN_NAMES)):
            GTKUtils.make_text_cell(treeview.columns[i], i + 1)

        #make treeview searchable
        treeview.set_search_column(0)
        #attach the filtermodel and treeview
        treeview.set_model(gtk.TreeModelSort(modelfilter))
        treeview.connect("cursor-changed", self.row_change_cb)
        treeview.connect("button-press-event", self.button_press_cb)
        treeview.connect("button-press-event", self.button_press_cb)
        #    treeview.set_size_request(-1, 30)
        treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)

        self.treeview, self.modelfilter = treeview, modelfilter
        self.modelfilter.set_visible_func(self.visible_cb)

        topBox = gtk.VBox()
        topBox.pack_start(self.buttonRow, False, False, 0)
        scrolledTorrentsBox = GTKUtils.make_scroll_box(
            treeview,
            hPolicy=gtk.POLICY_AUTOMATIC,
            vPolicy=gtk.POLICY_AUTOMATIC)
        scrolledTorrentsBoxAlign = gtk.Alignment(0, 0, 1, 1)
        scrolledTorrentsBoxAlign.set_padding(0, maggicPadding, maggicPadding,
                                             maggicPadding)
        scrolledTorrentsBoxAlign.add(scrolledTorrentsBox)

        topBox.pack_start(scrolledTorrentsBoxAlign, True, True, 0)

        self.priorityBox = gtk.HBox()
        self.priorityBox.pack_start(
            gtk.Label("Select a torrent to set the priority for its files."),
            True, True, 0)
        self.priorityBox.set_border_width(0)

        self.peerBox = gtk.HBox()
        self.peerBox.pack_start(
            gtk.Label("Select a torrent to see your peers in the swarm."),
            True, True, 0)

        self.bwGraph = BWGraph.BWGraph(self.app, root=self)
        self.bwGraph.container.set_size_request(-1, 150)

        self.notebook = ClosableTabNotebook.ClosableTabNotebook()
        self.notebook.set_show_border(True)
        self.notebook.set_border_width(0)
        self.bwGraph.label = gtk.Label("BitTorrent Traffic")
        self.priorityBox.label = gtk.Label("Priorities")
        self.priorityBox.container = self.priorityBox
        self.peerBox.label = gtk.Label("Peers")
        self.peerBox.container = self.peerBox
        self.notebook.show_display(self.bwGraph)
        self.notebook.show_display(self.priorityBox)
        self.notebook.show_display(self.peerBox)
        self.notebook.show_display(self.bwGraph)

        alignBottom = gtk.Alignment(0, 0, 1, 1)
        alignBottom.set_padding(0, maggicPadding + 3, maggicPadding + 2,
                                maggicPadding + 2)
        alignBottom.add(self.notebook)

        vBoxBottom = gtk.VBox()
        vBoxBottom.pack_start(alignBottom, True, True, 0)
        vBoxBottom.pack_end(self.statusRow, False, False, 0)

        vpane = gtk.VPaned()

        self.menuBar = BitTorrentMenuBar(self.controller, self)

        frame = gtk.Frame()
        frame.set_shadow_type(gtk.SHADOW_OUT)
        frame.add(topBox)

        alignTop = gtk.Alignment(1, 1, 1, 1)
        alignTop.set_padding(10, 0, maggicPadding + 3, maggicPadding + 3)
        alignTop.add(frame)

        topContainer = gtk.VBox()
        topContainer.pack_start(self.menuBar.create_menus(), False, False, 0)
        topContainer.pack_start(alignTop, True, True, 0)

        vpane.pack1(topContainer, resize=True, shrink=False)
        vpane.pack2(vBoxBottom, resize=False, shrink=False)

        self.label = gtk.Label("")
        self.label.set_markup(
            "<span size='x-large' weight='bold'>Bit Twister</span>")
        self.container = vpane
        vpane.set_position(400)
        self.add(self.container)
        self.container.show_all()
Beispiel #4
0
  def create(self):
    #Stores references to the program rows
    self.rows = {}
    self.selectedApp = None
    
    ClientUtil.add_updater(self)
    
    #create a liststore with one string column to use as the model
                #COLUMNS:
                #0:  Program name
    typeList = [gobject.TYPE_STRING,
                #1:  Number of hops
                gobject.TYPE_INT,
                #2:  Download Rate
                gobject.TYPE_STRING,
                #3:  Upload Rate
                gobject.TYPE_STRING,
                #4:  Coins spent
                gobject.TYPE_INT
                ]
    self.attrIdx = {}
    self.attrIdx["name"]         = 0
    self.attrIdx["numHops"]      = 1
    self.attrIdx["rateDown"]     = 2
    self.attrIdx["rateUp"]       = 3
    self.attrIdx["numCredits"]     = 4
    self.liststore = gtk.ListStore(*typeList)
    COLUMN_NAMES = ['Name','Anonymity Level', "Down Rate", "Up Rate", "Credits Used"]
    viewName = "Anonymous Programs"

    modelfilter, treeview = GTKUtils.make_listview(self.liststore, COLUMN_NAMES)
    for i in range (0, len(COLUMN_NAMES)):
      GTKUtils.make_text_cell(treeview.columns[i], i)
    
    #make treeview searchable
    treeview.set_search_column(0)
    #attach the filtermodel and treeview
    treeview.set_model(gtk.TreeModelSort(modelfilter))
#    treeview.connect("row-activated", self.row_activate_cb)
    treeview.connect("cursor-changed", self.row_change_cb)
    treeview.connect("button-press-event", self.button_press_cb)
    treeview.set_size_request(-1, 80)
    treeview.get_selection().set_mode(gtk.SELECTION_SINGLE)
      
    def make_button(text, cb, picFile):
      return GTKUtils.make_image_button(text, cb, picFile)
    
    bottomRow = gtk.HBox()
    self.removeButton = make_button('Stop', self.stop_cb, ClientUtil.get_image_file("stop.png"))
    bottomRow.pack_start(self.removeButton, False, False, 1)
    self.anonEntry = SettingsDisplay.make_entry("anonymity level", 1)
    self.anonEntry.connect_user_changed(self.toggle_anon_cb)
    bottomRow.pack_end(self.anonEntry.get_gtk_element(), False, False, 5)
    label = gtk.Label("")
    label.set_markup('<span size="large" weight="bold">Number of Hops: </span>')
    bottomRow.pack_end(label, False, False, 5)
    
    self.treeview, self.modelfilter = treeview, modelfilter
#    self.modelfilter.set_visible_func(self.visible_cb)

    self.bankDisplay = BankDisplay.BankDisplay()
    self.circuitList = CircuitList.CircuitList()
    self.console = Console.Console(Tor.get())

    self.bwGraph = BWGraph.BWGraph(BWHistory.localBandwidth, root=self)
    self.bwGraph.container.set_size_request(-1, 200)
    self.bwGraphLabel = gtk.Label("All Traffic")
    
    self.notebook = ClosableTabNotebook.ClosableTabNotebook()
    self.notebook.show_display(self.bwGraph)
    
    notebookAlign = gtk.Alignment(0, 0, 1, 1)
    notebookAlign.set_padding(5, 5, 0, 5)
    notebookAlign.add(self.notebook)
    
    self.topBox = gtk.VBox()
    self.topBox.pack_start(GTKUtils.make_scroll_box(treeview, hPolicy=gtk.POLICY_AUTOMATIC, vPolicy=gtk.POLICY_AUTOMATIC), True, True, 10)
    self.topBox.pack_start(bottomRow, False, True, 10)
    
    alignBottom = gtk.Alignment(1, 1, 1, 1)
    alignBottom.set_padding(10, 3, 1, 1)
    alignBottom.add(notebookAlign)
    vpane = gtk.VPaned()
     
    frame = gtk.Frame()
    frame.set_shadow_type(gtk.SHADOW_OUT)
    frame.add(self.topBox)
    
    alignTop = gtk.Alignment(1, 1, 1, 1)
    alignTop.set_padding(10, 10, 7, 7)
    alignTop.add(frame)
    
    topContainer = gtk.VBox()
    topContainer.pack_start(alignTop, True, True, 0)
    
    vpane.pack1(topContainer, resize=True, shrink=False)
    vpane.pack2(alignBottom, resize=True, shrink=False)
    vpane.set_position(400)
    
    self.label = gtk.Label("")
    self.label.set_markup("<span size='x-large' weight='bold'>Applications</span>")
    self.container = vpane
    
    self.catch_event("settings_changed")
    
    self.menuBar = SocksServerMenuBar(self.root, self)
    
    vbox = gtk.VBox() 
    vbox.pack_start(self.menuBar.create_menus(), False, False, 0)
    vbox.pack_start(self.container, True, True, 0)
    self.add(vbox)
    vbox.show_all()
Beispiel #5
0
    def __init__(self, app, torrentHash, data, showDoneColumn):
        self.app = app
        self.torrentHash = torrentHash
        self.torrentData = data
        self.download = None
        self.showDoneColumn = showDoneColumn
        #0:  File name
        typeList = [
            gobject.TYPE_STRING,
            #1:  Priority
            gobject.TYPE_INT,
            #2:  Size
            gobject.TYPE_INT64,
            #3:  Percent done
            gobject.TYPE_FLOAT
        ]
        self.liststore = gtk.ListStore(*typeList)
        COLUMN_NAMES = ['File', 'Size', 'Priority']
        if showDoneColumn:
            COLUMN_NAMES += ['Completion']

        def format_priority(value):
            if value == -1:
                return ""
            elif value == 0:
                return "High"
            elif value == 1:
                return "Normal"
            elif value == 2:
                return "Low"
            else:
                log_msg(
                    "Bad priority value for format_priority:  %s" % (value), 3)
                return str(value)

        def format_size(value):
            value = float(value) / (1024.0 * 1024.0)
            if value < 1.0:
                return "%.2f MB" % (value)
            return "%.0f MB" % (value)

        modelfilter, treeview = GTKUtils.make_listview(self.liststore,
                                                       COLUMN_NAMES)
        GTKUtils.make_toggle_cell(treeview.columns[0], 1)
        GTKUtils.make_text_cell(treeview.columns[0], 0)
        GTKUtils.make_text_cell(treeview.columns[1], 2, format_size)
        GTKUtils.make_text_cell(treeview.columns[2], 1, format_priority)
        if showDoneColumn:
            GTKUtils.make_progress_cell(treeview.columns[3], 3)

        #make treeview searchable
        treeview.set_search_column(0)
        #attach the filtermodel and treeview
        treeview.set_model(gtk.TreeModelSort(modelfilter))
        treeview.connect("row-activated", self.row_activate_cb)
        treeview.connect("button-press-event", self.button_press_cb)
        treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
        self.modelfilter, self.treeview = modelfilter, treeview
        scrolled_window = GTKUtils.make_scroll_box(
            self.treeview,
            hPolicy=gtk.POLICY_AUTOMATIC,
            vPolicy=gtk.POLICY_AUTOMATIC)
        scrolled_window.set_size_request(-1, 200)
        scrolled_window.set_border_width(0)
        treeview.set_border_width(0)
        self.container = scrolled_window

        #now add the actual data:
        fileList = []
        i = self.torrentData['metainfo']['info']
        if i.has_key('length'):
            fileList.append([
                self.torrentData['file'].replace(".torrent", ""),
                self.torrentData['length']
            ])
        elif i.has_key('files'):
            for entry in i['files']:
                folderList = entry['path']
                fileList.append([os.path.join(*folderList), entry['length']])
        else:
            raise Exception(
                "Cannot handle torrent without length or files keys")
        #stick it in the gui
        for fileName, size in fileList:
            #TODO:  When you try putting some torrents in here, you get this error message:
            #  C:\Projects\web\innominet\gui\BTDisplay.py:386: PangoWarning: Invalid UTF-8 string passed to pango_layout_set_text()
            #  self.dia.show_all()
            #tried these, but they didnt work:
            #fileName = fileName.encode("UTF-8")
            #fileName = unicode( fileName, "utf-8" )
            self.liststore.append([fileName, 1, size, 0.0])