From 2962a866ee6a4ce5ca029e7cf0dc79db1ede4c63 Mon Sep 17 00:00:00 2001 From: Brennan Novak Date: Fri, 6 May 2016 12:23:04 +0200 Subject: [PATCH] added Glade files and initial sketch of Overview Window QubesOS/qubes-issues#1870 --- glade/manager.glade | 558 +++++++++++++++++++++++++++++++++++++++ glade/overview.glade | 526 ++++++++++++++++++++++++++++++++++++ qubes-manager-overview | 4 + qubesmanager/handler.py | 46 ++++ qubesmanager/overview.py | 60 +++++ 5 files changed, 1194 insertions(+) create mode 100644 glade/manager.glade create mode 100644 glade/overview.glade create mode 100755 qubes-manager-overview create mode 100644 qubesmanager/handler.py create mode 100644 qubesmanager/overview.py diff --git a/glade/manager.glade b/glade/manager.glade new file mode 100644 index 0000000..9ba5053 --- /dev/null +++ b/glade/manager.glade @@ -0,0 +1,558 @@ + + + + + + + True + False + 5 + list-add + + + True + False + 0.50999999046325684 + 10 + 32 + applications-office + + + 60 + True + False + 10 + 32 + window-new + + + True + False + 10 + 32 + help-browser + + + True + False + 5 + application-x-executable + + + + True + False + 5 + audio-input-microphone + + + 800 + 25 + True + False + 15 + 15 + 10 + True + 10 + 15 + True + + + Create Qube + True + True + True + imageAdd + + + + 2 + 0 + + + + + True + False + 0 + + All + Running + Not Running + Networked + + + + + 3 + 0 + + + + + Attach Microphone + True + True + True + 5 + imageMicrophone + + + + 1 + 0 + + + + + Install Apps + True + True + True + imageInstallApps + 0.44999998807907104 + + + + 0 + 0 + + + + + True + False + 10 + 32 + network-transmit-receive + + + True + False + 10 + 32 + applications-science + + + True + False + 10 + 32 + applications-system + + + True + False + end + 10 + 10 + 18 + system-file-manager + + + True + False + 10 + 10 + 19 + utilities-terminal + + + 60 + True + False + 10 + 10 + 10 + 10 + + + True + False + System + + + + + + 0 + 0 + + + + + True + False + 10 + 10 + + + Files + True + True + True + imageSystemFiles + none + + + 0 + 0 + + + + + Terminal + True + True + True + imageSystemTerminal + none + + + 1 + 0 + + + + + 0 + 1 + + + + + True + False + 10 + 32 + preferences-desktop-wallpaper + + + 800 + 60 + True + False + both + False + 0 + + + + False + True + + + + + True + False + 15 + 15 + + + False + True + + + + + True + False + True + Show Applications qubes + False + Applications + imageApplications + True + + + + False + True + + + + + True + False + Show Networking qubes + False + Networking + imageNetworking + + + + False + True + + + + + True + False + Show Template qubes + False + Templates + imageTemplates + + + + False + True + + + + + True + False + 15 + 15 + + + False + True + + + + + True + False + Manage existing and find new Recipes + 10 + Recipes + imageRecipes + + + + False + True + + + + + True + False + Manage backups of your qubes + 10 + Backups + imageBackups + + + + False + True + + + + + True + False + Help and Troubleshooting + 10 + Help + imageHelp + + + + False + True + + + + + True + False + Global settings + 10 + Settings + imageSettings + + + + False + True + + + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + True + True + + + + + gtk-open + True + False + True + True + + + + + gtk-save + True + False + True + True + + + + + gtk-save-as + True + False + True + True + + + + + True + False + + + + + gtk-quit + True + False + True + True + + + + + + + + + True + False + _Edit + True + + + True + False + + + gtk-cut + True + False + True + True + + + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + gtk-delete + True + False + True + True + + + + + + + + + True + False + _View + True + + + + + True + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + + + + + + + + + True + False + + + True + False + 10 + 10 + + + True + False + 10 + 10 + + + True + False + + diff --git a/glade/overview.glade b/glade/overview.glade new file mode 100644 index 0000000..836dd37 --- /dev/null +++ b/glade/overview.glade @@ -0,0 +1,526 @@ + + + + + + True + False + 10 + dialog-information + + + True + False + 10 + document-save-as + + + False + True + True + Qube Settings + False + 600 + 400 + True + + + + True + False + 20 + vertical + 10 + top + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + True + True + + + + + gtk-open + True + False + True + True + + + + + gtk-save + True + False + True + True + + + + + gtk-save-as + True + False + True + True + + + + + True + False + + + + + gtk-quit + True + False + True + True + + + + + + + + + True + False + _Edit + True + + + True + False + + + gtk-cut + True + False + True + True + + + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + gtk-delete + True + False + True + True + + + + + + + + + True + False + _View + True + + + + + True + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + + + + + + + + + False + True + 0 + + + + + True + False + 15 + 15 + 15 + 15 + 20 + 10 + + + True + False + 10 + ../icons/qube-32.png + + + 0 + 0 + + + + + True + False + 10 + 15 + Email Work + + + + + + + 1 + 0 + + + + + True + True + end + 15 + + + + 2 + 0 + + + + + True + True + 1 + + + + + True + False + + + True + True + 2 + + + + + True + False + 15 + 15 + 20 + 20 + + + True + False + vertical + + + True + False + Networking + + + False + True + 0 + + + + + True + False + + Normal + Tor + VPN + None + + + + + False + True + 1 + + + + + 1 + 0 + + + + + True + False + vertical + + + True + False + Applications + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + 0 + 0 + + + + + True + True + 3 + + + + + True + False + 15 + 15 + 20 + 20 + + + True + False + Disk Space + + + 2 + 0 + + + + + True + False + 0.75 + + + 2 + 1 + + + + + Edit + True + True + True + 0.43999999761581421 + + + + 3 + 1 + + + + + True + False + 8 Updates + + + 0 + 0 + + + + + Update Now + True + True + True + 0.44999998807907104 + + + + 0 + 1 + + + + + True + False + Last Run + + + 1 + 0 + + + + + True + False + Dec 15, 2015 + + + 1 + 1 + + + + + + + + False + True + 4 + + + + + True + False + 15 + 15 + 15 + 15 + immediate + 10 + 10 + + + Delete Qube + True + True + True + imageDeleteQube + none + + + + 1 + 0 + + + + + Advanced Settings + True + True + True + imageAdvanced + none + + + 2 + 0 + + + + + Clone Qube + True + True + True + imageClone + none + + + 0 + 0 + + + + + + + + False + True + 5 + + + + + + + True + False + 10 + dialog-error + + diff --git a/qubes-manager-overview b/qubes-manager-overview new file mode 100755 index 0000000..d1f6734 --- /dev/null +++ b/qubes-manager-overview @@ -0,0 +1,4 @@ +#!/usr/bin/python +import qubesmanager.overview + +#qubesmanager.overview.run() diff --git a/qubesmanager/handler.py b/qubesmanager/handler.py new file mode 100644 index 0000000..5bb5e6b --- /dev/null +++ b/qubesmanager/handler.py @@ -0,0 +1,46 @@ +#!/usr/bin/python2 +# +# The Qubes OS Project, http://www.qubes-os.org +# +# Copyright (C) 2016 Brennan Novak + +# Gtk +import gi +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import Gio + +class ManagerHandler(): + + def launchAbout(self, button): + print "launch About window" + + def toggleQubeType(self, toggle): + print "toggle qube type" + self.current_filter_state = self.filter_states[combo.get_active()] + self.current_filter = self.current_filter_state + self.type_filter.refilter() + + def launchRecipes(self, button): + print "launch Recipes window" + + def launchBackups(self, button): + print "launch Backups window" + + def launchHelp(self, button): + print "launch Help window" + + def launchSettings(self, button): + print "launch Settings window" + + def installApps(self, button): + print "install apps" + + def attachMicrophone(self, button): + print "attach microphone" + + def createQube(self, button): + print "create Qube window" + + def toggleQubeState(self, toggle): + print "launch window" diff --git a/qubesmanager/overview.py b/qubesmanager/overview.py new file mode 100644 index 0000000..edfadc0 --- /dev/null +++ b/qubesmanager/overview.py @@ -0,0 +1,60 @@ +#!/usr/bin/python2 +# +# The Qubes OS Project, http://www.qubes-os.org +# +# Copyright (C) 2016 Brennan Novak + +import sys +import os +import os.path +import signal +import subprocess +import time +from datetime import datetime, timedelta + +# Gtk +import gi +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import Gio +from gi.repository.GdkPixbuf import Pixbuf + +# Qubes Test Data +import tests.data_vmcollection +qvm_collection = tests.data_vmcollection + +class OverviewHandler(Gtk.Window): + + def runToggle(self, toggle): + print "toggled runToggle" + + def networkManage(self, toggle): + print "toggled networkManage" + + def updateNow(self, button): + print "clicked updateNow" + + def editDiskSpace(self, button): + print "clicked editDiskSpace" + + def deleteQube(self, button): + print "clicked deleteQube" + + +# Load Glade UI +builder = Gtk.Builder() + +try: + builder.add_from_file("glade/overview.glade") +except: + print("glade file not found") + sys.exit() + +builder.connect_signals(OverviewHandler()) + +window = builder.get_object("qubeOverview") +window.show_all() +window.connect("delete-event", Gtk.main_quit) +window.show_all() + +Gtk.main()