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