add basic vista support
This commit is contained in:
parent
c1e4364c1d
commit
47cac3dc4a
2
setup.py
2
setup.py
|
@ -58,7 +58,7 @@ elif platform.system() == "Darwin" :
|
||||||
elif platform.system() == "FreeBSD" :
|
elif platform.system() == "FreeBSD" :
|
||||||
print "FreeBSD operating system detected"
|
print "FreeBSD operating system detected"
|
||||||
OS = "freebsd"
|
OS = "freebsd"
|
||||||
elif platform.system() == "Windows":
|
elif platform.system() in ('Windows', 'Microsoft'):
|
||||||
print "Windows system detected"
|
print "Windows system detected"
|
||||||
OS = "win"
|
OS = "win"
|
||||||
elif os.name == "posix":
|
elif os.name == "posix":
|
||||||
|
|
|
@ -39,7 +39,7 @@ from common import INSTALL_PREFIX
|
||||||
|
|
||||||
APP = 'deluge'
|
APP = 'deluge'
|
||||||
DIR = os.path.join(INSTALL_PREFIX, 'share', 'locale')
|
DIR = os.path.join(INSTALL_PREFIX, 'share', 'locale')
|
||||||
if platform.system() != "Windows":
|
if not platform.system() in ('Windows', 'Microsoft'):
|
||||||
locale.setlocale(locale.LC_MESSAGES, '')
|
locale.setlocale(locale.LC_MESSAGES, '')
|
||||||
locale.bindtextdomain(APP, DIR)
|
locale.bindtextdomain(APP, DIR)
|
||||||
locale.textdomain(APP)
|
locale.textdomain(APP)
|
||||||
|
|
|
@ -37,7 +37,7 @@ PROGRAM_VERSION = "0.5.5.95"
|
||||||
CLIENT_CODE = "DE"
|
CLIENT_CODE = "DE"
|
||||||
CLIENT_VERSION = "".join(PROGRAM_VERSION.split('.'))+"0"*(4 - len(PROGRAM_VERSION.split('.')))
|
CLIENT_VERSION = "".join(PROGRAM_VERSION.split('.'))+"0"*(4 - len(PROGRAM_VERSION.split('.')))
|
||||||
import platform
|
import platform
|
||||||
if platform.system() == "Windows":
|
if platform.system() in ('Windows', 'Microsoft'):
|
||||||
CONFIG_DIR = os.path.join(os.path.expanduser("~\\"), 'deluge')
|
CONFIG_DIR = os.path.join(os.path.expanduser("~\\"), 'deluge')
|
||||||
if not os.path.exists(CONFIG_DIR):
|
if not os.path.exists(CONFIG_DIR):
|
||||||
os.mkdir(CONFIG_DIR)
|
os.mkdir(CONFIG_DIR)
|
||||||
|
@ -136,7 +136,7 @@ def get_pixmap(fname):
|
||||||
def get_logo(size):
|
def get_logo(size):
|
||||||
import gtk
|
import gtk
|
||||||
import platform
|
import platform
|
||||||
if platform.system() == "Windows":
|
if platform.system() in ('Windows', 'Microsoft'):
|
||||||
return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.png"), \
|
return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.png"), \
|
||||||
size, size)
|
size, size)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -53,7 +53,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import platform
|
import platform
|
||||||
if platform.system() != "Windows":
|
if not platform.system() in ('Windows', 'Microsoft'):
|
||||||
import statvfs
|
import statvfs
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ class Manager:
|
||||||
deluge_core.quit()
|
deluge_core.quit()
|
||||||
|
|
||||||
#kill dbus on windows
|
#kill dbus on windows
|
||||||
if platform.system() == "Windows":
|
if platform.system() in ('Windows', 'Microsoft'):
|
||||||
import os
|
import os
|
||||||
os.popen4('tskill.exe dbus-daemon-deluge')
|
os.popen4('tskill.exe dbus-daemon-deluge')
|
||||||
|
|
||||||
|
@ -798,7 +798,7 @@ class Manager:
|
||||||
# Functions for checking if enough space is available
|
# Functions for checking if enough space is available
|
||||||
|
|
||||||
def calc_free_space(self, directory):
|
def calc_free_space(self, directory):
|
||||||
if platform.system() != "Windows":
|
if not platform.system() in ('Windows', 'Microsoft'):
|
||||||
dir_stats = os.statvfs(directory)
|
dir_stats = os.statvfs(directory)
|
||||||
block_size = dir_stats[statvfs.F_BSIZE]
|
block_size = dir_stats[statvfs.F_BSIZE]
|
||||||
avail_blocks = dir_stats[statvfs.F_BAVAIL]
|
avail_blocks = dir_stats[statvfs.F_BAVAIL]
|
||||||
|
|
|
@ -147,7 +147,7 @@ class DelugeGTK:
|
||||||
signal.signal(signal.SIGINT, self.manager.quit)
|
signal.signal(signal.SIGINT, self.manager.quit)
|
||||||
signal.signal(signal.SIGTERM, self.manager.quit)
|
signal.signal(signal.SIGTERM, self.manager.quit)
|
||||||
import platform
|
import platform
|
||||||
if platform.system() != "Windows":
|
if not platform.system() in ('Windows', 'Microsoft'):
|
||||||
signal.signal(signal.SIGHUP, self.manager.quit)
|
signal.signal(signal.SIGHUP, self.manager.quit)
|
||||||
self.dht_timer = 0
|
self.dht_timer = 0
|
||||||
self.dht_skip = False
|
self.dht_skip = False
|
||||||
|
|
Loading…
Reference in New Issue