Skip to content

Commit

Permalink
Gtk UI: Fix listing of big files on Windows (bug 1562)
Browse files Browse the repository at this point in the history
For files > 2GB, the list store couldn't handle the
long integer values. Fix this by using a different data
type in the ListStore.

Also fixed a bug that used the wrong units when showing
the file size in the main window (use_si_units was 1).
  • Loading branch information
thp committed Feb 11, 2012
1 parent 411d702 commit d0eaccb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gpodder/gtkui/model.py
Expand Up @@ -38,6 +38,7 @@

import os
import gtk
import gobject
import cgi
import re

Expand Down Expand Up @@ -122,7 +123,7 @@ class EpisodeListModel(gtk.ListStore):
def __init__(self, on_filter_changed=lambda has_episodes: None):
gtk.ListStore.__init__(self, str, str, str, object, \
str, str, str, str, bool, bool, bool, \
int, int, str, bool, int, bool)
gobject.TYPE_INT64, int, str, bool, int, bool)

# Callback for when the filter / list changes, gets one parameter
# (has_episodes) that is True if the list has any episodes
Expand Down Expand Up @@ -155,7 +156,7 @@ def __init__(self, on_filter_changed=lambda has_episodes: None):

def _format_filesize(self, episode):
if episode.file_size > 0:
return util.format_filesize(episode.file_size, 1)
return util.format_filesize(episode.file_size, digits=1)
else:
return None

Expand Down

0 comments on commit d0eaccb

Please sign in to comment.