[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 4/9] tools: delete xsview



This was apparently a Qt xenstore viewer. It hasn't been touched since it was
first committed in 2007 and I can't beleive anyone is actually using even if
it still happens to work.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/misc/Makefile                 |    2 +-
 tools/misc/xsview                   |    9 --
 tools/python/setup.py               |    1 -
 tools/python/xen/xsview/main.py     |   10 --
 tools/python/xen/xsview/xsviewer.py |  168 -----------------------------------
 5 files changed, 1 insertions(+), 189 deletions(-)
 delete mode 100644 tools/misc/xsview
 delete mode 100644 tools/python/xen/xsview/__init__.py
 delete mode 100644 tools/python/xen/xsview/main.py
 delete mode 100644 tools/python/xen/xsview/xsviewer.py

diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 73b55dd..9c69e0d 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -22,7 +22,7 @@ INSTALL_BIN-y := xencons xencov_split
 INSTALL_BIN-$(CONFIG_X86) += xen-detect
 INSTALL_BIN := $(INSTALL_BIN-y)
 
-INSTALL_SBIN-y := xen-bugtool xen-python-path xenperf xsview xenpm 
xen-tmem-list-parse gtraceview \
+INSTALL_SBIN-y := xen-bugtool xen-python-path xenperf xenpm 
xen-tmem-list-parse gtraceview \
        gtracestat xenlockprof xenwatchdogd xen-ringwatch xencov
 INSTALL_SBIN-$(CONFIG_X86) += xen-hvmctx xen-hvmcrash xen-lowmemd
 INSTALL_SBIN-$(CONFIG_MIGRATE) += xen-hptool
diff --git a/tools/misc/xsview b/tools/misc/xsview
deleted file mode 100644
index f926fe4..0000000
--- a/tools/misc/xsview
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-
-from xen.xsview import main
-
-main.main(sys.argv)
-
-
diff --git a/tools/python/setup.py b/tools/python/setup.py
index 4f66564..8e584e6 100644
--- a/tools/python/setup.py
+++ b/tools/python/setup.py
@@ -133,7 +133,6 @@ setup(name            = 'xen',
       packages        = ['xen',
                          'xen.lowlevel',
                          'xen.sv',
-                         'xen.xsview',
                          ] + xend_packages,
       ext_package = "xen.lowlevel",
       ext_modules = modules
diff --git a/tools/python/xen/xsview/__init__.py 
b/tools/python/xen/xsview/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tools/python/xen/xsview/main.py b/tools/python/xen/xsview/main.py
deleted file mode 100644
index b8d3b41..0000000
--- a/tools/python/xen/xsview/main.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from xsviewer import *
-from qt import *
-
-def main(args):
-    app = QApplication(args)
-    mainwin = XSViewer(app)
-    mainwin.show()
-    app.connect(app, SIGNAL("lastWindowClosed()"),
-                app, SLOT("quit()"))
-    app.exec_loop()
diff --git a/tools/python/xen/xsview/xsviewer.py 
b/tools/python/xen/xsview/xsviewer.py
deleted file mode 100644
index 4dbaf98..0000000
--- a/tools/python/xen/xsview/xsviewer.py
+++ /dev/null
@@ -1,168 +0,0 @@
-from qt import *
-
-import xen.lowlevel.xs
-
-class XSViewer(QMainWindow):
-    
-    def __init__(self, app):
-        apply(QMainWindow.__init__, (self,))
-        
-        self.setCaption('XenStore Viewer')
-
-        self.new_node = QAction(self, 'New Node')
-        self.new_node.setText('New Node...')
-        self.connect(self.new_node, SIGNAL('activated()'),
-                     self.do_new_node)
-        
-        self.rm_node = QAction(self, 'Remove Node')
-        self.rm_node.setText('Remove Node')
-        self.connect(self.rm_node, SIGNAL('activated()'),
-                     self.do_rm_node)
-
-        self.refresh = QAction(self, 'Refresh')
-        self.refresh.setText('Refresh')
-        self.connect(self.refresh, SIGNAL('activated()'),
-                     self.do_refresh)
- 
-        self.file_menu = QPopupMenu(self)
-        self.new_node.addTo(self.file_menu)
-        self.rm_node.addTo(self.file_menu)
-        self.refresh.addTo(self.file_menu)
-
-
-        self.about = QAction(self, 'About')
-        self.about.setText('About...')
-        self.connect(self.about, SIGNAL('activated()'),
-                     self.do_about)
-
-        self.help_menu = QPopupMenu(self)
-        self.about.addTo(self.help_menu)
-
-        self.menubar = QMenuBar(self)
-        self.menubar.insertItem('&File', self.file_menu)
-        self.menubar.insertItem('&Help', self.help_menu)
-
-        self.vbox = QVBox(self)
-        self.setCentralWidget(self.vbox)
-
-        self.xs_tree = QListView(self.vbox)
-        self.xs_tree.addColumn('Key')
-        self.xs_tree.setRootIsDecorated(1)
-        self.xs_tree.connect(self.xs_tree, 
SIGNAL('selectionChanged(QListViewItem*)'), self.showValue)
-
-        self.info_box = QHBox(self.vbox)
-        self.info_box.setMargin(2)
-        self.info_box.setSpacing(2)
-        self.info_label = QLabel(self.info_box)
-        self.info_label.setText('Value')
-        self.info = QLineEdit(self.info_box)
-        self.setval = QPushButton(self.info_box)
-        self.setval.setText('Set')
-        self.setval.connect(self.setval, SIGNAL('clicked()'), self.setValue)
-
-        self.xs_handle = xen.lowlevel.xs.xs()
-
-        self.showtree()
-
-
-    def showtree(self):
-        xstransact = self.xs_handle.transaction_start()
-        self.walktree(xstransact, '/', '/', self.xs_tree)
-        self.xs_handle.transaction_end(xstransact)
-
-    def walktree(self, trans, node, subdir_prepend, parent_widget):
-
-        ents = self.xs_handle.ls(trans, node)
-        if ents == None:
-            return
-
-        for e in ents:
-            i = QListViewItem(parent_widget, e)
-            i.full_path = subdir_prepend + e
-            self.walktree(trans, i.full_path, i.full_path + '/', i)
-
-    
-    def showValue(self, item):
-        trans = self.xs_handle.transaction_start()
-        val = self.xs_handle.read(trans, item.full_path)
-        self.info.setText(val)
-        self.xs_handle.transaction_end(trans)
-
-
-    def setValue(self):
-        trans = self.xs_handle.transaction_start()
-        item = self.xs_tree.currentItem()
-        newval = str(self.info.text())
-
-        self.xs_handle.write(trans, item.full_path, newval)
-
-        self.xs_handle.transaction_end(trans)
-
-
-    def do_refresh(self):
-        self.xs_tree.clear()
-        self.info.clear()
-        self.showtree()
-
-    def do_new_node(self):
-        dia = QDialog(self)
-        dia.setCaption('Create new node')
-
-        vbox = QVBox(dia)
-
-        setting_hbox = QHBox(vbox)
-        
-        path_label = QLabel(setting_hbox)
-        path_label.setText('Node path')
-        path = QLineEdit(setting_hbox)
-        
-        value_label = QLabel(setting_hbox)
-        value_label.setText('Node value')
-        val = QLineEdit(setting_hbox)
-
-        button_hbox = QHBox(vbox)
-
-        set = QPushButton(button_hbox)
-        set.setText('Set')
-        self.connect(set, SIGNAL('clicked()'), dia, SLOT('accept()'))
-
-        cancel = QPushButton(button_hbox)
-        cancel.setText('Cancel')
-        self.connect(cancel, SIGNAL('clicked()'), dia, SLOT('reject()'))
-
-        setting_hbox.adjustSize()
-        button_hbox.adjustSize()
-        vbox.adjustSize()
-
-        if dia.exec_loop() == QDialog.Accepted:
-            trans = self.xs_handle.transaction_start()
-            self.xs_handle.write(trans, str(path.text()), str(val.text()))
-            
-            self.xs_handle.transaction_end(trans)
-
-            self.do_refresh()
-        
-        # nothing to set.
-
-    def do_rm_node(self):
-        trans = self.xs_handle.transaction_start()
-        item = self.xs_tree.currentItem()
-        newval = str(self.info.text())
-
-        self.xs_handle.rm(trans, item.full_path)
-
-        self.xs_handle.transaction_end(trans)
-
-        self.do_refresh()
-
-    def do_about(self):
-        about_dia = QMessageBox(self)
-        about_dia.setIcon(QMessageBox.Information)
-
-        about_dia.setCaption('About XenStore Viewer')
-        about_dia.setText('XenStore Viewer\n'
-                          'by Mark Williamson <mark.williamson@xxxxxxxxxxxx>')
-
-        about_dia.exec_loop()
-        
-        
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.