mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-26 10:05:19 +00:00
Updates
This commit is contained in:
parent
bc39371af6
commit
49e5e9b093
@ -34,7 +34,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import xdg, xdg.BaseDirectory
|
import xdg, xdg.BaseDirectory
|
||||||
import os.path
|
import os
|
||||||
|
|
||||||
# Get the logger
|
# Get the logger
|
||||||
log = logging.getLogger("deluge")
|
log = logging.getLogger("deluge")
|
||||||
@ -44,11 +44,14 @@ def get_version():
|
|||||||
return pkg_resources.require("Deluge")[0].version
|
return pkg_resources.require("Deluge")[0].version
|
||||||
|
|
||||||
def get_config_dir(filename=None):
|
def get_config_dir(filename=None):
|
||||||
""" Returns the CONFIG_DIR path if no filename is specified
|
""" Returns the config path if no filename is specified
|
||||||
Returns the CONFIG_DIR + filename as a path if filename is specified
|
Returns the config directory + filename as a path if filename is specified
|
||||||
"""
|
"""
|
||||||
if filename != None:
|
if filename != None:
|
||||||
return os.path.join(xdg.BaseDirectory.save_config_path("deluge"), filename)
|
return os.path.join(xdg.BaseDirectory.save_config_path("deluge"), filename)
|
||||||
else:
|
else:
|
||||||
return xdg.BaseDirectory.save_config_path("deluge")
|
return xdg.BaseDirectory.save_config_path("deluge")
|
||||||
|
|
||||||
|
def get_default_download_dir():
|
||||||
|
"""Returns the default download directory"""
|
||||||
|
return os.environ.get("HOME")
|
||||||
|
@ -56,9 +56,10 @@ from deluge.core.torrent import Torrent
|
|||||||
# Get the logger
|
# Get the logger
|
||||||
log = logging.getLogger("deluge")
|
log = logging.getLogger("deluge")
|
||||||
|
|
||||||
|
#_default_download_dir = deluge.common.get_default_download_dir()
|
||||||
DEFAULT_PREFS = {
|
DEFAULT_PREFS = {
|
||||||
"listen_ports": [6881, 6891],
|
"listen_ports": [6881, 6891],
|
||||||
"download_location": "/home/andrew/Downloads",
|
"download_location": deluge.common.get_default_download_dir(),
|
||||||
"compact_allocation": True
|
"compact_allocation": True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ pygtk.require('2.0')
|
|||||||
import gtk, gtk.glade
|
import gtk, gtk.glade
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
import gtkui_mainwindow
|
from mainwindow import MainWindow
|
||||||
|
|
||||||
# Get the logger
|
# Get the logger
|
||||||
log = logging.getLogger("deluge")
|
log = logging.getLogger("deluge")
|
||||||
@ -53,7 +53,7 @@ class GtkUI:
|
|||||||
pkg_resources.resource_filename("deluge", "glade/main_window.glade"))
|
pkg_resources.resource_filename("deluge", "glade/main_window.glade"))
|
||||||
|
|
||||||
# Initialize the main window
|
# Initialize the main window
|
||||||
self.main_window = gtkui_mainwindow.GtkUIMainWindow(self.main_glade)
|
self.main_window = MainWindow(self.main_glade)
|
||||||
|
|
||||||
# Show the main window
|
# Show the main window
|
||||||
self.main_window.show()
|
self.main_window.show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user