[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.component as component
|
||||
from deluge.core.preferencesmanager import DEFAULT_PREFS
|
||||
from deluge.ui.client import client
|
||||
|
||||
DEFAULT_DAEMON_PORT = 58846
|
||||
|
||||
|
||||
class StatusBars(component.Component):
|
||||
def __init__(self):
|
||||
|
@ -76,7 +77,7 @@ class StatusBars(component.Component):
|
|||
connection_info += '{!white,blue,bold!}@{!red,blue,bold!}%s'
|
||||
|
||||
# Port
|
||||
if info[1] == DEFAULT_PREFS['daemon_port']:
|
||||
if info[1] == DEFAULT_DAEMON_PORT:
|
||||
connection_info += '{!white,blue!}:%s'
|
||||
else:
|
||||
connection_info += '{!status!}:%s'
|
||||
|
|
Loading…
Reference in New Issue