mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-20 15:18:20 +00:00
Rename Statistics tab to Status
This commit is contained in:
parent
3dce47d1f0
commit
1b8efd5d10
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# statistics_tab.py
|
# status_tab.py
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
|
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
|
||||||
#
|
#
|
||||||
@ -52,16 +52,16 @@ def fspeed(value, max_value=-1):
|
|||||||
else:
|
else:
|
||||||
return deluge.common.fspeed(value)
|
return deluge.common.fspeed(value)
|
||||||
|
|
||||||
class StatisticsTab(Tab):
|
class StatusTab(Tab):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
Tab.__init__(self)
|
Tab.__init__(self)
|
||||||
# Get the labels we need to update.
|
# Get the labels we need to update.
|
||||||
# widgetname, modifier function, status keys
|
# widgetname, modifier function, status keys
|
||||||
glade = component.get("MainWindow").main_glade
|
glade = component.get("MainWindow").main_glade
|
||||||
|
|
||||||
self._name = "Statistics"
|
self._name = "Status"
|
||||||
self._child_widget = glade.get_widget("statistics_tab")
|
self._child_widget = glade.get_widget("status_tab")
|
||||||
self._tab_label = glade.get_widget("statistics_tab_label")
|
self._tab_label = glade.get_widget("status_tab_label")
|
||||||
|
|
||||||
self.label_widgets = [
|
self.label_widgets = [
|
||||||
(glade.get_widget("summary_pieces"), fpeer_size_second, ("num_pieces", "piece_length")),
|
(glade.get_widget("summary_pieces"), fpeer_size_second, ("num_pieces", "piece_length")),
|
@ -77,14 +77,14 @@ class TorrentDetails(component.Component):
|
|||||||
self.tabs = {}
|
self.tabs = {}
|
||||||
|
|
||||||
# Add the default tabs
|
# Add the default tabs
|
||||||
from statistics_tab import StatisticsTab
|
from status_tab import StatusTab
|
||||||
from details_tab import DetailsTab
|
from details_tab import DetailsTab
|
||||||
from files_tab import FilesTab
|
from files_tab import FilesTab
|
||||||
from peers_tab import PeersTab
|
from peers_tab import PeersTab
|
||||||
from options_tab import OptionsTab
|
from options_tab import OptionsTab
|
||||||
|
|
||||||
default_tabs = {
|
default_tabs = {
|
||||||
"Statistics": StatisticsTab,
|
"Status": StatusTab,
|
||||||
"Details": DetailsTab,
|
"Details": DetailsTab,
|
||||||
"Files": FilesTab,
|
"Files": FilesTab,
|
||||||
"Peers": PeersTab,
|
"Peers": PeersTab,
|
||||||
@ -93,7 +93,7 @@ class TorrentDetails(component.Component):
|
|||||||
|
|
||||||
# tab_name, visible
|
# tab_name, visible
|
||||||
default_order = [
|
default_order = [
|
||||||
("Statistics", True),
|
("Status", True),
|
||||||
("Details", True),
|
("Details", True),
|
||||||
("Files", True),
|
("Files", True),
|
||||||
("Peers", True),
|
("Peers", True),
|
||||||
@ -117,6 +117,8 @@ class TorrentDetails(component.Component):
|
|||||||
|
|
||||||
# Add the tabs in the order from the state
|
# Add the tabs in the order from the state
|
||||||
for tab_name, visible in state:
|
for tab_name, visible in state:
|
||||||
|
# We need to rename the tab in the state for backwards compat
|
||||||
|
tab_name = tab_name.replace("Statistics", "Status")
|
||||||
self.add_tab(default_tabs[tab_name]())
|
self.add_tab(default_tabs[tab_name]())
|
||||||
|
|
||||||
# Hide any of the non-visible ones
|
# Hide any of the non-visible ones
|
||||||
|
Loading…
x
Reference in New Issue
Block a user