mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
[Console] Removed Core dependency from Console UI
UIs should not depend on core directly, so removing the dependency in ConsoleUI. This is done by adding a hard-coded variable. Closes https://dev.deluge-torrent.org/ticket/3491 Closes: https://github.com/deluge-torrent/deluge/pull/320
This commit is contained in:
parent
88ffd1b843
commit
a2d0cb7141
@ -11,9 +11,10 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
from deluge.core.preferencesmanager import DEFAULT_PREFS
|
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
|
|
||||||
|
DEFAULT_DAEMON_PORT = 58846
|
||||||
|
|
||||||
|
|
||||||
class StatusBars(component.Component):
|
class StatusBars(component.Component):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -76,7 +77,7 @@ class StatusBars(component.Component):
|
|||||||
connection_info += '{!white,blue,bold!}@{!red,blue,bold!}%s'
|
connection_info += '{!white,blue,bold!}@{!red,blue,bold!}%s'
|
||||||
|
|
||||||
# Port
|
# Port
|
||||||
if info[1] == DEFAULT_PREFS['daemon_port']:
|
if info[1] == DEFAULT_DAEMON_PORT:
|
||||||
connection_info += '{!white,blue!}:%s'
|
connection_info += '{!white,blue!}:%s'
|
||||||
else:
|
else:
|
||||||
connection_info += '{!status!}:%s'
|
connection_info += '{!status!}:%s'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user