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