Update imports to match new qubes global settings layout

This commit is contained in:
Marek Marczykowski 2013-03-16 21:07:53 +01:00
parent ff15208e8f
commit bc485d2928
5 changed files with 8 additions and 16 deletions

View File

@ -27,11 +27,8 @@ from PyQt4.QtGui import *
from qubes.qubes import QubesVmCollection
from qubes.qubes import QubesException
from qubes.qubes import qubes_appmenu_create_cmd
from qubes.qubes import qubes_appmenu_remove_cmd
from qubes.qubes import QubesDaemonPidfile
from qubes.qubes import QubesHost
from qubes.qubes import qrexec_client_path
import qubesmanager.resources_rc

View File

@ -30,7 +30,7 @@ from qubes.qubes import QubesVmCollection
from qubes.qubes import QubesException
from qubes.qubes import QubesDaemonPidfile
from qubes.qubes import QubesHost
from qubes.qubes import qubes_kernels_base_dir
from qubes.qubes import system_path
import qubesmanager.resources_rc
@ -169,7 +169,7 @@ class GlobalSettingsWindow(Ui_GlobalSettings, QDialog):
def __init_kernel_defaults__(self):
kernel_list = []
for k in os.listdir(qubes_kernels_base_dir):
for k in os.listdir(system_path["qubes_kernels_base_dir"]):
kernel_list.append(k)
self.kernel_idx = 0

View File

@ -33,7 +33,7 @@ from PyQt4.QtGui import *
from qubes.qubes import QubesVmCollection
from qubes.qubes import QubesException
from qubes.qubes import qubes_store_filename
from qubes.qubes import system_path,vm_files
from qubes.qubes import QubesVmLabels
from qubes.qubes import dry_run
from qubes.qubes import QubesDaemonPidfile
@ -57,7 +57,6 @@ from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, Pro
import subprocess
import time
from datetime import datetime,timedelta
from qubes.qubes import updates_stat_file
qubes_dom0_updates_stat_file = '/var/lib/qubes/updates/dom0-updates-available'
qubes_clipboard_info_file = "/var/run/qubes/qubes_clipboard.bin.source"
@ -77,7 +76,7 @@ class QubesManagerFileWatcher(ProcessEvent):
self.update_func = update_func
def process_IN_MODIFY (self, event):
if event.path == qubes_store_filename:
if event.path == system_path["qubes_store_filename"]:
self.update_func()
def process_IN_CLOSE_WRITE (self, event):
@ -527,7 +526,7 @@ class VmUpdateInfoWidget(QWidget):
else:
update_recommended = self.previous_update_recommended
stat_file_path = vm.dir_path + '/' + updates_stat_file
stat_file_path = vm.dir_path + '/' + vm_files["updates_stat_file"]
if not os.path.exists(stat_file_path):
update_recommended = False
else:
@ -2178,7 +2177,7 @@ def main():
global notifier
notifier = ThreadedNotifier(wm, QubesManagerFileWatcher(manager_window.mark_table_for_update))
notifier.start()
wm.add_watch(qubes_store_filename, EventsCodes.OP_FLAGS.get('IN_MODIFY'))
wm.add_watch(system_path["qubes_store_filename"], EventsCodes.OP_FLAGS.get('IN_MODIFY'))
wm.add_watch(qubes_clipboard_info_file, EventsCodes.OP_FLAGS.get('IN_CLOSE_WRITE'))
global system_bus

View File

@ -30,7 +30,6 @@ from qubes.qubes import QubesVmCollection
from qubes.qubes import QubesException
from qubes.qubes import QubesDaemonPidfile
from qubes.qubes import QubesHost
from qubes.qubes import qubes_base_dir
import qubesmanager.resources_rc
from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, ProcessEvent

View File

@ -29,12 +29,9 @@ from PyQt4.QtGui import *
from qubes.qubes import QubesVmCollection
from qubes.qubes import QubesVmLabels
from qubes.qubes import QubesException
from qubes.qubes import qubes_appmenu_create_cmd
from qubes.qubes import qubes_appmenu_remove_cmd
from qubes.qubes import QubesDaemonPidfile
from qubes.qubes import QubesHost
from qubes.qubes import qrexec_client_path
from qubes.qubes import qubes_kernels_base_dir
from qubes.qubes import system_path
import qubesmanager.resources_rc
@ -460,7 +457,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
# construct available kernels list
text = "default (" + self.qvm_collection.get_default_kernel() +")"
kernel_list = [text]
for k in os.listdir(qubes_kernels_base_dir):
for k in os.listdir(system_path["qubes_kernels_base_dir"]):
kernel_list.append(k)
kernel_list.append("none")