diff options
Diffstat (limited to 'deluge/ui/gtk3/files_tab.py')
-rw-r--r-- | deluge/ui/gtk3/files_tab.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/deluge/ui/gtk3/files_tab.py b/deluge/ui/gtk3/files_tab.py index b3bd5b5..24c1697 100644 --- a/deluge/ui/gtk3/files_tab.py +++ b/deluge/ui/gtk3/files_tab.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com> # @@ -7,21 +6,26 @@ # See LICENSE for more details. # -from __future__ import division, unicode_literals - import json import logging import os.path +import gi # isort:skip (Required before Gtk import). + +gi.require_version('Gtk', '3.0') + +# isort:imports-thirdparty from gi.repository import Gio, Gtk from gi.repository.Gdk import DragAction, ModifierType, keyval_name from gi.repository.GObject import TYPE_UINT64 +# isort:imports-firstparty import deluge.component as component from deluge.common import open_file, show_file from deluge.ui.client import client from deluge.ui.common import FILE_PRIORITY +# isort:imports-localfolder from .common import ( listview_replace_treestore, load_pickled_state_file, @@ -77,7 +81,7 @@ def cell_progress(column, cell, model, row, data): class FilesTab(Tab): def __init__(self): - super(FilesTab, self).__init__('Files', 'files_tab', 'files_tab_label') + super().__init__('Files', 'files_tab', 'files_tab_label') self.listview = self.main_builder.get_object('files_listview') # filename, size, progress string, progress value, priority, file index, icon id @@ -442,7 +446,7 @@ class FilesTab(Tab): try: value = completed_bytes / self.treestore[parent][1] * 100 except ZeroDivisionError: - # Catch the unusal error found when moving folders around + # Catch the unusual error found when moving folders around value = 0 self.treestore[parent][3] = value self.treestore[parent][2] = '%i%%' % value |