From 12130786fe6c5d8963804ee5ae257ce0ec24e4c5 Mon Sep 17 00:00:00 2001 From: Maxim Stewart Date: Sat, 22 Jun 2019 19:21:18 -0500 Subject: [PATCH] Changed structural stuff --- src/debs/build.sh | 34 -- src/debs/chownAll.sh | 6 - src/debs/pytop-0-0-1-x64/DEBIAN/control | 8 - src/debs/pytop-0-0-1-x64/DEBIAN/postrm | 11 - src/debs/pytop-0-0-1-x64/bin/pytop | Bin 6168 -> 0 bytes .../pytop-0-0-1-x64/opt/Pytop/utils/Events.py | 72 ----- .../pytop-0-0-1-x64/opt/Pytop/utils/Grid.py | 214 ------------ .../usr/share/doc/pytop/copyright | 22 -- .../utils => pytop-0.0.1/Pytop}/Events.py | 18 +- .../opt => pytop-0.0.1}/Pytop/PyTop.py | 7 +- .../opt => pytop-0.0.1}/Pytop/PyTop.sh | 0 src/pytop-0.0.1/Pytop/__init__.py | 0 .../Pytop/resources/PyTop.glade | 14 + .../Pytop/resources/icons/archive.png | Bin .../Pytop/resources/icons/audio.png | Bin .../Pytop/resources/icons/bin.png | Bin .../Pytop/resources/icons/dir.png | Bin .../Pytop/resources/icons/doc.png | Bin .../Pytop/resources/icons/pdf.png | Bin .../Pytop/resources/icons/presentation.png | Bin .../Pytop/resources/icons/spreadsheet.png | Bin .../Pytop/resources/icons/text.png | Bin .../Pytop/resources/icons/video.png | Bin .../Pytop/resources/icons/web.png | Bin .../Pytop/resources/stylesheet.css | 0 .../Pytop/utils/Dragging.py | 0 .../Pytop/utils/FileHandler.py | 0 .../Pytop/utils/Settings.py | 0 .../Pytop/utils/__init__.py | 3 - .../Pytop/widgets}/Grid.py | 2 +- .../Pytop/widgets}/Icon.py | 0 src/pytop-0.0.1/Pytop/widgets/__init__.py | 2 + .../pytop-0.0.1/Pytop_exec_bin.cpp | 0 src/{versions => }/pytop-0.0.1/compileBin.sh | 0 src/{versions => }/pytop-0.0.1/pytop | Bin src/versions/pytop-0.0.1/Pytop/PyTop.py | 36 --- src/versions/pytop-0.0.1/Pytop/PyTop.sh | 12 - .../pytop-0.0.1/Pytop/resources/PyTop.glade | 305 ------------------ .../Pytop/resources/icons/archive.png | Bin 1670 -> 0 bytes .../Pytop/resources/icons/audio.png | Bin 1544 -> 0 bytes .../pytop-0.0.1/Pytop/resources/icons/bin.png | Bin 858 -> 0 bytes .../pytop-0.0.1/Pytop/resources/icons/dir.png | Bin 850 -> 0 bytes .../pytop-0.0.1/Pytop/resources/icons/doc.png | Bin 702 -> 0 bytes .../pytop-0.0.1/Pytop/resources/icons/pdf.png | Bin 925 -> 0 bytes .../Pytop/resources/icons/presentation.png | Bin 882 -> 0 bytes .../Pytop/resources/icons/spreadsheet.png | Bin 707 -> 0 bytes .../Pytop/resources/icons/text.png | Bin 798 -> 0 bytes .../Pytop/resources/icons/video.png | Bin 1313 -> 0 bytes .../pytop-0.0.1/Pytop/resources/icons/web.png | Bin 1845 -> 0 bytes .../Pytop/resources/stylesheet.css | 88 ----- .../pytop-0.0.1/Pytop/utils/Dragging.py | 79 ----- .../pytop-0.0.1/Pytop/utils/FileHandler.py | 93 ------ src/versions/pytop-0.0.1/Pytop/utils/Icon.py | 167 ---------- .../pytop-0.0.1/Pytop/utils/Settings.py | 139 -------- .../pytop-0.0.1/Pytop/utils/__init__.py | 6 - 55 files changed, 38 insertions(+), 1300 deletions(-) delete mode 100644 src/debs/build.sh delete mode 100644 src/debs/chownAll.sh delete mode 100644 src/debs/pytop-0-0-1-x64/DEBIAN/control delete mode 100755 src/debs/pytop-0-0-1-x64/DEBIAN/postrm delete mode 100755 src/debs/pytop-0-0-1-x64/bin/pytop delete mode 100644 src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Events.py delete mode 100644 src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Grid.py delete mode 100644 src/debs/pytop-0-0-1-x64/usr/share/doc/pytop/copyright rename src/{versions/pytop-0.0.1/Pytop/utils => pytop-0.0.1/Pytop}/Events.py (91%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/PyTop.py (80%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/PyTop.sh (100%) create mode 100644 src/pytop-0.0.1/Pytop/__init__.py rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/PyTop.glade (96%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/archive.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/audio.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/bin.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/dir.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/doc.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/pdf.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/presentation.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/spreadsheet.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/text.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/video.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/icons/web.png (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/resources/stylesheet.css (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/utils/Dragging.py (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/utils/FileHandler.py (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/utils/Settings.py (100%) rename src/{debs/pytop-0-0-1-x64/opt => pytop-0.0.1}/Pytop/utils/__init__.py (56%) rename src/{versions/pytop-0.0.1/Pytop/utils => pytop-0.0.1/Pytop/widgets}/Grid.py (99%) rename src/{debs/pytop-0-0-1-x64/opt/Pytop/utils => pytop-0.0.1/Pytop/widgets}/Icon.py (100%) create mode 100644 src/pytop-0.0.1/Pytop/widgets/__init__.py rename src/{versions => }/pytop-0.0.1/Pytop_exec_bin.cpp (100%) rename src/{versions => }/pytop-0.0.1/compileBin.sh (100%) rename src/{versions => }/pytop-0.0.1/pytop (100%) delete mode 100755 src/versions/pytop-0.0.1/Pytop/PyTop.py delete mode 100755 src/versions/pytop-0.0.1/Pytop/PyTop.sh delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/PyTop.glade delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/archive.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/audio.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/bin.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/dir.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/doc.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/pdf.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/presentation.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/spreadsheet.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/text.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/video.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/icons/web.png delete mode 100644 src/versions/pytop-0.0.1/Pytop/resources/stylesheet.css delete mode 100644 src/versions/pytop-0.0.1/Pytop/utils/Dragging.py delete mode 100644 src/versions/pytop-0.0.1/Pytop/utils/FileHandler.py delete mode 100644 src/versions/pytop-0.0.1/Pytop/utils/Icon.py delete mode 100644 src/versions/pytop-0.0.1/Pytop/utils/Settings.py delete mode 100644 src/versions/pytop-0.0.1/Pytop/utils/__init__.py diff --git a/src/debs/build.sh b/src/debs/build.sh deleted file mode 100644 index 48e85d7..0000000 --- a/src/debs/build.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Fixes ownershp -function main() { - sudo find . -type f -exec chmod 644 {} + - sudo find . -type d -exec chmod 755 {} + - - # Set postrm permissions - for i in `find . -name postrm`; do - sudo chmod 755 "${i}" - done - - # Set pytop permissions - for i in `find . -name pytop`; do - sudo chmod 755 "${i}" - done - - sudo chown -R root:root ./*/ - - builder; - bash ./chownAll.sh -} - -#builds debs -function builder() { - for i in `ls`; do - if [[ -d "${i}" ]]; then - dpkg --build "${i}" - else - echo "Not a dir." - fi - done -} -main; diff --git a/src/debs/chownAll.sh b/src/debs/chownAll.sh deleted file mode 100644 index 44bef62..0000000 --- a/src/debs/chownAll.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -function main() { - sudo chown -R abaddon:abaddon . -} -main; diff --git a/src/debs/pytop-0-0-1-x64/DEBIAN/control b/src/debs/pytop-0-0-1-x64/DEBIAN/control deleted file mode 100644 index e22da34..0000000 --- a/src/debs/pytop-0-0-1-x64/DEBIAN/control +++ /dev/null @@ -1,8 +0,0 @@ -Package: pytop64 -Version: 0.0-1 -Section: python -Priority: optional -Architecture: amd64 -Depends: ffmpegthumbnailer (>= 2.0.10-0.1) -Maintainer: Maxim Stewart <1itdominator@gmail.com> -Description: Pytop is a custom desktop GUI. diff --git a/src/debs/pytop-0-0-1-x64/DEBIAN/postrm b/src/debs/pytop-0-0-1-x64/DEBIAN/postrm deleted file mode 100755 index 4962c4c..0000000 --- a/src/debs/pytop-0-0-1-x64/DEBIAN/postrm +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -#postrm (script executed after uninstalling the package) -#set -e - -if [ -f /bin/pytop ]; then - rm /bin/pytop -fi - -if [ -d /opt/Pytop ]; then - rm -rf /opt/Pytop -fi diff --git a/src/debs/pytop-0-0-1-x64/bin/pytop b/src/debs/pytop-0-0-1-x64/bin/pytop deleted file mode 100755 index 9f3608f2366fe79f6e308d241bae80339965a777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g7fEZIeZ^UC#d$og>%6CF}ntm5M!k1my-F; zf@5dCi}VeEc&{^`pC4{|0PypI+#j32gJ8gWmHB*s_7R_-JDflJF&+gz-uo=`{Xal_ zg#zRA%$h%`#Yt%3oHBnjPm`um;`8%{_JXZe&8@v5? diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Events.py b/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Events.py deleted file mode 100644 index fbd3962..0000000 --- a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Events.py +++ /dev/null @@ -1,72 +0,0 @@ - -# Gtk Imports - -# Python imports -from .Grid import Grid -from .Dragging import Dragging - -class Events: - def __init__(self, settings): - self.settings = settings - self.builder = self.settings.returnBuilder() - self.desktop = self.builder.get_object("Desktop") - self.webview = self.builder.get_object("webview") - self.desktopPath = self.settings.returnDesktopPath() - - self.settings.setDefaultWebviewSettings(self.webview, self.webview.get_settings()) - self.webview.load_uri(self.settings.returnWebHome()) - - # Add filter to allow only folders to be selected - selectedDirDialog = self.builder.get_object("selectedDirDialog") - filefilter = self.builder.get_object("Folders") - selectedDirDialog.add_filter(filefilter) - selectedDirDialog.set_filename(self.desktopPath) - - self.grid = None - self.setIconViewDir(selectedDirDialog) - - def setIconViewDir(self, widget, data=None): - newPath = widget.get_filename() - Grid(self.desktop, self.settings, newPath) - - - - # File control events - def createFile(self): - pass - - def updateFile(self, widget, data=None): - newName = widget.get_text().strip() - if data and data.keyval == 65293: # Enter key event - self.grid.updateFile(newName) - elif data == None: # Save button 'event' - self.grid.updateFile(newName) - - def deleteFile(self, widget, data=None): - self.grid.deleteFile() - - def copyFile(self): - pass - - def cutFile(self): - pass - - def pasteFile(self): - pass - - # Webview events - def showWebview(self, widget): - self.builder.get_object("webViewer").popup() - - def loadHome(self, widget): - self.webview.load_uri(self.settings.returnWebHome()) - - def runSearchWebview(self, widget, data=None): - if data.keyval == 65293: - self.webview.load_uri(widget.get_text().strip()) - - def refreshPage(self, widget, data=None): - self.webview.load_uri(self.webview.get_uri()) - - def setUrlBar(self, widget, data=None): - self.builder.get_object("webviewSearch").set_text(widget.get_uri()) diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Grid.py b/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Grid.py deleted file mode 100644 index 392de55..0000000 --- a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Grid.py +++ /dev/null @@ -1,214 +0,0 @@ - - -# Gtk Imports -import gi -gi.require_version('Gtk', '3.0') -gi.require_version('Gdk', '3.0') - -from gi.repository import Gtk as gtk -from gi.repository import Gdk as gdk -from gi.repository import GLib as glib -from gi.repository import GdkPixbuf - -# Python imports -import os, threading, time -from os.path import isdir, isfile, join -from os import listdir -from .Icon import Icon -from .FileHandler import FileHandler - - -def threaded(fn): - def wrapper(*args, **kwargs): - threading.Thread(target=fn, args=args, kwargs=kwargs).start() - return wrapper - -class Grid: - def __init__(self, desktop, settings, newPath): - self.desktop = desktop - self.settings = settings - self.filehandler = FileHandler() - - self.store = gtk.ListStore(GdkPixbuf.Pixbuf, str) - self.usrHome = settings.returnUserHome() - self.builder = settings.returnBuilder() - self.ColumnSize = settings.returnColumnSize() - self.currentPath = "" - self.selectedFile = "" - - self.desktop.set_model(self.store) - self.desktop.set_pixbuf_column(0) - self.desktop.set_text_column(1) - self.desktop.connect("item-activated", self.iconLeftClickEventManager) - self.desktop.connect("button_press_event", self.iconRightClickEventManager, (self.desktop,)) - self.desktop.connect("selection-changed", self.setIconSelectionArray, (self.desktop,)) - - self.vidsList = settings.returnVidsExtensionList() - self.imagesList = settings.returnImagesExtensionList() - self.gtkLock = False # Thread checks for gtkLock - self.threadLock = False # Gtk checks for thread lock - self.helperThread = None # Helper thread object - self.toWorkPool = [] # Thread fills pool and gtk empties it - self.copyCutArry = [] - - self.setIconViewDir(newPath) - - def setIconViewDir(self, path): - self.store.clear() - - self.currentPath = path - dirPaths = ['.', '..'] - vids = [] - images = [] - desktop = [] - files = [] - - for f in listdir(path): - file = join(path, f) - if self.settings.isHideHiddenFiles(): - if f.startswith('.'): - continue - if isfile(file): - if file.lower().endswith(self.vidsList): - vids.append(f) - elif file.lower().endswith(self.imagesList): - images.append(f) - elif file.lower().endswith((".desktop",)): - desktop.append(f) - else: - files.append(f) - else: - dirPaths.append(f) - - dirPaths.sort() - vids.sort() - images.sort() - desktop.sort() - files.sort() - files = dirPaths + vids + images + desktop + files - - if self.helperThread: - self.helperThread.terminate() - self.helperThread = None - - # Run helper thread... - self.threadLock = True - self.helperThread = threading.Thread(target=self.generateDirectoryGridIcon, args=(path, files)).start() - glib.idle_add(self.addToGrid, (file,)) # This must stay in the main thread b/c - # gtk isn't thread safe/aware So, we - # make a sad lil thread hot potato 'game' - # out of this process. - - - # @threaded - def generateDirectoryGridIcon(self, dirPath, files): - # NOTE: We'll be passing pixbuf after retreval to keep Icon.py file more - # universaly usable. We can just remove get_pixbuf to get a gtk.Image type - for file in files: - image = Icon(self.settings).createIcon(dirPath, file) - self.toWorkPool.append([image.get_pixbuf(), file]) - self.threadLock = False - self.gtkLock = True - - - def addToGrid(self, args): - # NOTE: Returning true tells gtk to check again in the future when idle. - # False ends checks and "continues normal flow" - files = args[0] - - if len(self.toWorkPool) > 0: - for dataSet in self.toWorkPool: - self.store.append(dataSet) - - if len(self.store) == len(files): # Confirm processed all files and cleanup - self.gtkLock = False - self.threadLock = False - self.toWorkPool.clear() - return False - # Check again when idle; If nothing else is updating, this function - # gets called immediatly. So, we play hot potato by passing lock to Thread - else: - self.toWorkPool.clear() - self.gtkLock = False - self.threadLock = True - time.sleep(.005) # Fixes refresh and up icon not being added. - return True - - def setIconSelectionArray(self, widget, data=None): - pass - # os.system('cls||clear') - # print(data) - - def iconLeftClickEventManager(self, widget, item): - try: - model = widget.get_model() - fileName = model[item][1] - dir = self.currentPath - file = dir + "/" + fileName - - if fileName == ".": - self.setIconViewDir(dir) - elif fileName == "..": - parentDir = os.path.abspath(os.path.join(dir, os.pardir)) - self.currentPath = parentDir - self.setIconViewDir(parentDir) - elif isdir(file): - self.currentPath = file - self.setIconViewDir(self.currentPath) - elif isfile(file): - self.filehandler.openFile(file) - except Exception as e: - print(e) - - def iconRightClickEventManager(self, widget, eve, params): - try: - if eve.type == gdk.EventType.BUTTON_PRESS and eve.button == 3: - popover = self.builder.get_object("iconControlsWindow") - popover.show_all() - popover.popup() - # # NOTE: Need to change name of listview box... - # children = widget.get_children()[0].get_children() - # fileName = children[1].get_text() - # dir = self.currentPath - # file = dir + "/" + fileName - # - # input = self.builder.get_object("iconRenameInput") - # popover = self.builder.get_object("iconControlsWindow") - # self.selectedFile = file # Used for return to caller - # - # input.set_text(fileName) - # popover.set_relative_to(widget) - # popover.set_position(gtk.PositionType.RIGHT) - # popover.show_all() - # popover.popup() - except Exception as e: - print(e) - - - # Passthrough file control events - def createFile(arg): - pass - - def updateFile(self, file): - newName = self.currentPath + "/" + file - status = self.filehandler.updateFile(self.selectedFile, newName) - - if status == 0: - self.selectedFile = newName - self.setIconViewDir(self.currentPath) - - def deleteFile(self): - status = self.filehandler.deleteFile(self.selectedFile) - - if status == 0: - self.selectedFile = "" - self.setIconViewDir(self.currentPath) - - def copyFile(self): - pass - - def cutFile(self): - pass - - def pasteFile(self): - pass diff --git a/src/debs/pytop-0-0-1-x64/usr/share/doc/pytop/copyright b/src/debs/pytop-0-0-1-x64/usr/share/doc/pytop/copyright deleted file mode 100644 index 04b188e..0000000 --- a/src/debs/pytop-0-0-1-x64/usr/share/doc/pytop/copyright +++ /dev/null @@ -1,22 +0,0 @@ -Pytop is copyright 2019 Maxim Stewart. -Pytop is currently developed by ITDominator <1itdominator@gmail.com>. - -License: GPLv2+ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -See /usr/share/common-licenses/GPL-2, or - for the terms of the latest version -of the GNU General Public License. diff --git a/src/versions/pytop-0.0.1/Pytop/utils/Events.py b/src/pytop-0.0.1/Pytop/Events.py similarity index 91% rename from src/versions/pytop-0.0.1/Pytop/utils/Events.py rename to src/pytop-0.0.1/Pytop/Events.py index fbd3962..f720ecb 100644 --- a/src/versions/pytop-0.0.1/Pytop/utils/Events.py +++ b/src/pytop-0.0.1/Pytop/Events.py @@ -2,8 +2,9 @@ # Gtk Imports # Python imports -from .Grid import Grid -from .Dragging import Dragging +from widgets import Grid +from utils import Dragging + class Events: def __init__(self, settings): @@ -30,6 +31,19 @@ class Events: Grid(self.desktop, self.settings, newPath) + def getWindowsOnScreen(self): + screen = self.settings.returnScren() + windowButtons = self.builder.get_object("windowButtons") + + + + + + + + + + # File control events def createFile(self): diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/PyTop.py b/src/pytop-0.0.1/Pytop/PyTop.py similarity index 80% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/PyTop.py rename to src/pytop-0.0.1/Pytop/PyTop.py index 99795ce..9fe407f 100755 --- a/src/debs/pytop-0-0-1-x64/opt/Pytop/PyTop.py +++ b/src/pytop-0.0.1/Pytop/PyTop.py @@ -1,16 +1,18 @@ #!/usr/bin/python3 # Gtk Imports -import gi, faulthandler +import gi, faulthandler, signal gi.require_version('Gtk', '3.0') gi.require_version('WebKit2', '4.0') from gi.repository import Gtk as gtk from gi.repository import Gdk as gdk from gi.repository import WebKit2 as webkit +from gi.repository import GLib # Python imports -from utils import Settings, Events +from utils import Settings +from Events import Events gdk.threads_init() class Main: @@ -21,6 +23,7 @@ class Main: self.builder = gtk.Builder() self.settings = Settings() self.settings.attachBuilder(self.builder) + GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, gtk.main_quit) self.builder.connect_signals(Events(self.settings)) window = self.settings.createWindow() diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/PyTop.sh b/src/pytop-0.0.1/Pytop/PyTop.sh similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/PyTop.sh rename to src/pytop-0.0.1/Pytop/PyTop.sh diff --git a/src/pytop-0.0.1/Pytop/__init__.py b/src/pytop-0.0.1/Pytop/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/PyTop.glade b/src/pytop-0.0.1/Pytop/resources/PyTop.glade similarity index 96% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/PyTop.glade rename to src/pytop-0.0.1/Pytop/resources/PyTop.glade index d2d2d35..c0deab2 100644 --- a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/PyTop.glade +++ b/src/pytop-0.0.1/Pytop/resources/PyTop.glade @@ -113,6 +113,20 @@ 1 + + + True + False + + + + + + False + True + 2 + + diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/archive.png b/src/pytop-0.0.1/Pytop/resources/icons/archive.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/archive.png rename to src/pytop-0.0.1/Pytop/resources/icons/archive.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/audio.png b/src/pytop-0.0.1/Pytop/resources/icons/audio.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/audio.png rename to src/pytop-0.0.1/Pytop/resources/icons/audio.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/bin.png b/src/pytop-0.0.1/Pytop/resources/icons/bin.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/bin.png rename to src/pytop-0.0.1/Pytop/resources/icons/bin.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/dir.png b/src/pytop-0.0.1/Pytop/resources/icons/dir.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/dir.png rename to src/pytop-0.0.1/Pytop/resources/icons/dir.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/doc.png b/src/pytop-0.0.1/Pytop/resources/icons/doc.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/doc.png rename to src/pytop-0.0.1/Pytop/resources/icons/doc.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/pdf.png b/src/pytop-0.0.1/Pytop/resources/icons/pdf.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/pdf.png rename to src/pytop-0.0.1/Pytop/resources/icons/pdf.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/presentation.png b/src/pytop-0.0.1/Pytop/resources/icons/presentation.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/presentation.png rename to src/pytop-0.0.1/Pytop/resources/icons/presentation.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/spreadsheet.png b/src/pytop-0.0.1/Pytop/resources/icons/spreadsheet.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/spreadsheet.png rename to src/pytop-0.0.1/Pytop/resources/icons/spreadsheet.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/text.png b/src/pytop-0.0.1/Pytop/resources/icons/text.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/text.png rename to src/pytop-0.0.1/Pytop/resources/icons/text.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/video.png b/src/pytop-0.0.1/Pytop/resources/icons/video.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/video.png rename to src/pytop-0.0.1/Pytop/resources/icons/video.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/web.png b/src/pytop-0.0.1/Pytop/resources/icons/web.png similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/icons/web.png rename to src/pytop-0.0.1/Pytop/resources/icons/web.png diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/resources/stylesheet.css b/src/pytop-0.0.1/Pytop/resources/stylesheet.css similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/resources/stylesheet.css rename to src/pytop-0.0.1/Pytop/resources/stylesheet.css diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Dragging.py b/src/pytop-0.0.1/Pytop/utils/Dragging.py similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Dragging.py rename to src/pytop-0.0.1/Pytop/utils/Dragging.py diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/FileHandler.py b/src/pytop-0.0.1/Pytop/utils/FileHandler.py similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/utils/FileHandler.py rename to src/pytop-0.0.1/Pytop/utils/FileHandler.py diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Settings.py b/src/pytop-0.0.1/Pytop/utils/Settings.py similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Settings.py rename to src/pytop-0.0.1/Pytop/utils/Settings.py diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/__init__.py b/src/pytop-0.0.1/Pytop/utils/__init__.py similarity index 56% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/utils/__init__.py rename to src/pytop-0.0.1/Pytop/utils/__init__.py index e291f0f..590b2ca 100644 --- a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/__init__.py +++ b/src/pytop-0.0.1/Pytop/utils/__init__.py @@ -1,6 +1,3 @@ from utils.Dragging import Dragging from utils.Settings import Settings -from utils.Events import Events -from utils.Grid import Grid -from utils.Icon import Icon from utils.FileHandler import FileHandler diff --git a/src/versions/pytop-0.0.1/Pytop/utils/Grid.py b/src/pytop-0.0.1/Pytop/widgets/Grid.py similarity index 99% rename from src/versions/pytop-0.0.1/Pytop/utils/Grid.py rename to src/pytop-0.0.1/Pytop/widgets/Grid.py index 392de55..e27345d 100644 --- a/src/versions/pytop-0.0.1/Pytop/utils/Grid.py +++ b/src/pytop-0.0.1/Pytop/widgets/Grid.py @@ -15,7 +15,7 @@ import os, threading, time from os.path import isdir, isfile, join from os import listdir from .Icon import Icon -from .FileHandler import FileHandler +from utils.FileHandler import FileHandler def threaded(fn): diff --git a/src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Icon.py b/src/pytop-0.0.1/Pytop/widgets/Icon.py similarity index 100% rename from src/debs/pytop-0-0-1-x64/opt/Pytop/utils/Icon.py rename to src/pytop-0.0.1/Pytop/widgets/Icon.py diff --git a/src/pytop-0.0.1/Pytop/widgets/__init__.py b/src/pytop-0.0.1/Pytop/widgets/__init__.py new file mode 100644 index 0000000..148c91c --- /dev/null +++ b/src/pytop-0.0.1/Pytop/widgets/__init__.py @@ -0,0 +1,2 @@ +from widgets.Grid import Grid +from widgets.Icon import Icon diff --git a/src/versions/pytop-0.0.1/Pytop_exec_bin.cpp b/src/pytop-0.0.1/Pytop_exec_bin.cpp similarity index 100% rename from src/versions/pytop-0.0.1/Pytop_exec_bin.cpp rename to src/pytop-0.0.1/Pytop_exec_bin.cpp diff --git a/src/versions/pytop-0.0.1/compileBin.sh b/src/pytop-0.0.1/compileBin.sh similarity index 100% rename from src/versions/pytop-0.0.1/compileBin.sh rename to src/pytop-0.0.1/compileBin.sh diff --git a/src/versions/pytop-0.0.1/pytop b/src/pytop-0.0.1/pytop similarity index 100% rename from src/versions/pytop-0.0.1/pytop rename to src/pytop-0.0.1/pytop diff --git a/src/versions/pytop-0.0.1/Pytop/PyTop.py b/src/versions/pytop-0.0.1/Pytop/PyTop.py deleted file mode 100755 index 99795ce..0000000 --- a/src/versions/pytop-0.0.1/Pytop/PyTop.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python3 - -# Gtk Imports -import gi, faulthandler -gi.require_version('Gtk', '3.0') -gi.require_version('WebKit2', '4.0') - -from gi.repository import Gtk as gtk -from gi.repository import Gdk as gdk -from gi.repository import WebKit2 as webkit - -# Python imports -from utils import Settings, Events - -gdk.threads_init() -class Main: - def __init__(self): - faulthandler.enable() - webkit.WebView() # Needed for glade file to load... - - self.builder = gtk.Builder() - self.settings = Settings() - self.settings.attachBuilder(self.builder) - self.builder.connect_signals(Events(self.settings)) - - window = self.settings.createWindow() - window.fullscreen() - window.show_all() - - -if __name__ == "__main__": - try: - main = Main() - gtk.main() - except Exception as e: - print(e) diff --git a/src/versions/pytop-0.0.1/Pytop/PyTop.sh b/src/versions/pytop-0.0.1/Pytop/PyTop.sh deleted file mode 100755 index 6cf9f3f..0000000 --- a/src/versions/pytop-0.0.1/Pytop/PyTop.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# set -o xtrace ## To debug scripts -# set -o errexit ## To exit on error -# set -o errunset ## To exit if a variable is referenced but not set - - -function main() { - # GTK_DEBUG=interactive python3 ./PyTop.py - python3 ./PyTop.py -} -main $@; diff --git a/src/versions/pytop-0.0.1/Pytop/resources/PyTop.glade b/src/versions/pytop-0.0.1/Pytop/resources/PyTop.glade deleted file mode 100644 index d2d2d35..0000000 --- a/src/versions/pytop-0.0.1/Pytop/resources/PyTop.glade +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - inode/directory - - - - True - False - Show Mini Webbrowser - gtk-go-down - 3 - - - False - 800 - 600 - desktop - False - center - - - - - - 256 - True - False - vertical - - - True - False - - - True - True - True - webDropDown - True - - - - False - True - 0 - - - - - True - False - select-folder - Folders - Directory Chooser - - - - False - True - 1 - - - - - True - True - edit-find-symbolic - False - False - - - True - True - 2 - - - - - False - True - 0 - - - - - True - True - in - - - True - False - - - True - True - 6 - multiple - 6 - - - - - - - True - True - 1 - - - - - - - False - popOutBttn - bottom - - - True - False - vertical - - - 300 - 26 - True - True - gtk-edit - - - False - True - 0 - - - - - True - False - - - gtk-copy - True - True - True - True - True - - - False - True - 0 - - - - - gtk-cut - True - True - True - True - True - - - False - True - 1 - - - - - gtk-paste - True - True - True - True - True - - - False - True - 2 - - - - - gtk-delete - True - True - True - 65 - True - True - - - False - True - end - 3 - - - - - False - True - 1 - - - - - - - False - True - True - popOutBttn - bottom - - - True - False - vertical - - - True - False - - - gtk-home - True - True - True - True - True - - - - False - True - 0 - - - - - gtk-refresh - True - True - True - True - True - - - - False - True - 1 - - - - - True - True - edit-find-symbolic - False - False - - - - True - True - 2 - - - - - False - True - 0 - - - - - True - True - - - - - - - False - True - 1 - - - - - - diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/archive.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/archive.png deleted file mode 100644 index 7943e4e39efd8fc25296d3a28da55f9919ed31a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1670 zcmX|B2~?BU68@7|3|f`OvI*4)PmiPx*dwQ<#g+iF#HTz=z$z{fF_2%fnfwq4LW0@Y zR3H!tTNZ+Vl;9%)3?QILSyd9EfQkZAx+x%vU9_b?ZBOTXckaxc@0^)CcgYG53)!%4 z%Q^r6HV{Mik>ELIb)ZqOz85T84WPII#0WGR{c!q!Q?P5x4n4{R0GGzqfjGG(-xXeT zhJubjWL6x+qj0DIkH_-_nF-uj3Y+T5;>4HD@7)5E99BsYAVjAE;c$e5CC0Lt*a#Yx zLEW);YyxJyx61HOglH@dK&CLTp;R6SK~Kb4!ElhY8VqEyQ#fEe4FUoKvHlRm0Z%1D zAd877)8NehbTEO6r9lw;b1$!04wV9dNz_;tgTZ2QR}1l?gRxX5m&)}zm4fF|y!LqR z_Bttw>Hq-5v+x5EL2#CTrK?LdY%svC`G#qz1E%~Vj*gD5t`2`Y7!1b20Tb-!OAPSq zYcuwlj05e)!S-f_ETc#&ER;KDzZKJl_SXBWVZME9A zI&Du=!$3z%8hASW3^hF=PH=`QOo$UE#0%;184MV-^Dvm8C)HU zY-;E+z|i*?^|y@rez?PJ&2ZDKckft7E%!z(_st_?7W3FB49obadBQsS@czArWA`Q} zCubf#_;&iq-1OAk%+$jC^TmaQ7mF|!mtMSBUS2K<5&s6C;)f6^j0_;&u|cnM*zUH= z1Bdtgc#qF#L?S;m^;~9FcJ_$bY_?de;}a7Tua=izyT^R;U-(V<5cl~<&>lZ8`t=yb z->FX{A`Q*IY4Rq2HE@88_5G;X{vBU@xM6*BkCn6sdpghU_C{axQp}2ZZc;*}B-9GVD?J%TMEvJ0QNS;z3fL1T~^tn!*0J{uy8e=k7>{i14rbezP8=wqL;A*ANnWp z071Uimf%6!EZlEP*zHb`?g-cw3Lt+(BG&+Q$J~rj2JkY&3GzmSUFsv+3s2k(eD7+%#EyR#PeKiIx&k$Rk3!A}W$Qv?sEa$aYMo8LUSW7C79UnlW@M(`&Yt-MR_eBnnrgtt(=QwnCUoJx+2dLXUlO6iLI z)5O<+U_(#D8#!>~+r!axy0-eb>z%E;fgu|r(Br+&cC+IS(FBUw-Skr(aG-v-_2w>Q zxs3W920)um?5wq{@BAZtTh0)kE1wJw1z+t%+ASe(*yL|mN~Q7+buG@N4FIz@Gi;Gq z(`+kf>^_W~>h-r@6Y0YqT5GixMj^4mv-jgrPCfM>;uiayb`Ulh?Yv1}UBOfw-bj-M z0wEd?=aC$dAsaEZc^K#vdYkfzT78@Pm)=+O-XiOD@qk8^YPrl)wuniPb^B zy%!jNyj9#b!`wa~m}qpu{vuY_9t#Cp#l-y^qq>Y(xTL4t^jq3)942=h=h6R*=*-)+ zjBOx_TmU8|k_e1|UKOD`x~wN=Z0FIWFK~*=C%I-Zp3!~d;FnE&yEwbnnHx(G!To}U?63HnOl`}=c@ vLkCR>kcaNm+1dL1FZ}w{WAOd{q017TgD*%|V_I@oKTu*&*gkzg%=te7aFZ2g diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/audio.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/audio.png deleted file mode 100644 index c0101346b611e7495861f4efe2c511f76b51e5e7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dJgpSz-K{;CN})=gZxe$uiHlb3Cnx_r~r6&t6n*feeBrs*p;&sep2 z#_G*8S8tiQdMnTtp!q-(xF)ho0G+E>666=mz{teP#m&ttEFvl4>6lif#XQ z8W13Ilv$zc>xRv19^Jh6-?ox*^G&|HnMr59#~t{-#It^DV2glL{i@!-kE4TcEV%OT z-p;}>w+z1?PA#6E70US!LfC%He;CD4G5_F<15KQ|YZz6wZP-1z`D{=_^8Ki6{avaJ zN7k*_@#bs#uBW^^zIST;wfe&9^4sO*Om&4j>bpKNANjrI3)7R|Q=T#KpZwhZ_*dum zPKyse-tD=U{igWAzqi#}eLQv9Y-+XEJ!hQx&W=4!!(c)y8wWhvU6w0CUnUvw{_K};>3gl1wceg9u(=*FzrTHMS*!j2>yL7`K8m_0?z;72 ikl~}S#Zrnb|3dd~^!AY~RX+CuWU8mDpUXO@geCx;cxYb$ diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/doc.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/doc.png deleted file mode 100644 index f8388267bc53ad5b95537b2977873701ac3de87b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 702 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy#>i=8|}I5;?NKlFb92xL>4nJ zNUsNB#yF{oGC)De64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U#L5e~$ zOL9^f0)R3_3ZBXNc?uyJskx~NA*s0qIf*5ykA0+kAalscA{WaJky1SjSyc%+tR zmXzFY>2w2127x4<^9w4AGSf3k7@VCI97{@yGLuS6GV}9vgEN3maLmcfPF2V#DJihh z*H11=O)SYQOHIzt&CSm%2DwN-Co?%UuQ;_>KdDl;I8onN&p zZ_9Puk?XiC-}6{u%6r8rAArhKrhnG%zo$Rxf&SbtZY#d}uKt>}<$cc94;{z8cOCoQ zef;}`Q$J^&|26ykuVq(%{r~^}l(nx4&>f;BL4LsuGV1!hQ>M<92A` za$u2V;P7(L&tTlTfNe{YTmTot0$~9MRfh(*0}QPUOht^WN18--M73=5e-P5pBywZE zqa&Bf?#D-!zU*O~{q@o;^8-1PL-!t-%^{%RaKQdUf!l(-hV)bR3I~jz$_qT0S@&69 z;D^cqV^xO-=8c(K|8@#XgfTm*UyupEDR0WO-Js**PYaPZ#^2g)85_AZEX$o=90q!r N!PC{xWt~$(69DZ(DkcB` diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/pdf.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/pdf.png deleted file mode 100644 index 9f40122a8e9ef281901e085651fa66de960cae4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 925 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy#>i=8|}I5;?NKlFb92xL>4nJ zNUsNB#yF{oGC)De64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U#L5e~$ zOL9^f0)R3_3ZBXNc?uyJskx~NA*s0qIf*5ykA0+kAalscA{WaJky1SjSyc%+tR zmXzFY>2w2127x4<^9w4AGSf3k7@VCI97{@yGLuS6GV}9vgEN3maLmcfPF2V#DJihh z*H11=O)SYQOHIzt&CSm%2DwN-Co?%UuQ;_>KdDl;I8onN&pK?PTIAN%F-q_%-x$%8-V~{Ru^Jlh}&z$X_xi~y`b$XGV{4yf+ zWn?H&`^%{CSBbH&a#P=y6~8Sj`Mhk&=VePjFJJm)Mi|9-EZE1`1tA5moJqLU6Kq8j5VGvjv*QM-d>CJKja|7`e0Z0qDT7{ z@Ue=x9@zCTit+dV|C5)xEuOis`2EaGr$@H>bMLhORy~vHEa0IcWLx}nu9@QL5C7Jh zX&z=3(1Zr%7`Gi@ z+rcECz{PMtSfD}Gfx-O%LmLBA2_x$XCeaErj?Z?Dt0hEM9Jpw!5zzSR;LT>oh)-;D z-n^G8s(8a2u>7j+ zJjt8L#OQU^+W%$ol~c1VVm|%2De->yIiSp{$#TD@bqZhb;MWIIABs=S_AyQP;aJC9 z@7=`^``2qPQ>12fE92L^Z&7o_S!&dSSYtQ+%hYC)a9y}J+~C8l_ggjg7FAu;*!ziN zM)gzP8CSILH(b-+-*8WRe#6G_PuBw(7%L7eyZw(>d&4WXDQgbA*>(Eg)|m(N)`VR6 iI#nofzso27&zyp}+m6{Mw{HSQ6oaR$pUXO@geCx$l#&Sm diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/presentation.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/presentation.png deleted file mode 100644 index 3a339af593f4932996667370db88dbdc050f86b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 882 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy#>i=8|}I5;?NKlFb92xL>4nJ zNUsNB#yF{oGC)De64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U#L5e~$ zOL9^f0)R3_3ZBXNc?uyJskx~NA*s0qIf*5ykA0+kAalscA{WaJky1SjSyc%+tR zmXzFY>2w2127x4<^9w4AGSf3k7@VCI97{@yGLuS6GV}9vgEN3maLmcfPF2V#DJihh z*H11=O)SYQOHIzt&CSm%2DwN-Co?%UuQ;_>KdDl;I8onN&pG({c6t+>by80{rP(O=NlPcPs@Hg1J-h0;pch9pXZf+o>%^PQTx|5 zr(f5ce_eC=b=?(Y$m7;ukK2AdZvXSF_s@$Ne_qZ6+WY6_>_4yO{&_X;&#U=B_xydm z2$g7u zy(C%^MBZ?E3;YYq@; zP29q_Hf(L_y2CGRR%D2_ugaMC>EHP$zLTdlCB8p;vvcF`{ZEo=ISURHn)rH$X~^?& zh(7%Ls^Ln8EX%38Wp@R3xwkT3+GD7vwS`yEq18%~fz_G)&hCqCIt-jT41yI53I>e( z4zS)}l77Hd)1b+~;P1dNje${yky(O?;{vOQ0(Zy*GuMdCoH08VIIx~u=h(<~#qWH6 zP>XN&fu|<}v#v1|hgwf#t@C7L6$x-?{LlGi@A>yXrfLN8E%<5_DY1cji=7a2S>tsN zu^0ZA7`pjycDFR@XDUo!JN7Z%Qf#;D<(k(Al4T^K>V2yp{_(l7vHrrm=jk?$lke2b zU%SUt#jfn^@|Uq(d)qEN-}U)cZ)+Sh vg(L2s-MoMEqZICF(UN^ZN^i1n34LRJ(>cXB_UJWGf@bh^^>bP0l+XkK!91hU diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/spreadsheet.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/spreadsheet.png deleted file mode 100644 index 710efa631bbe46a69e7d43808c675b0f5c2411c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 707 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy#>i=8|}I5;?NKlFb92xL>4nJ zNUsNB#yF{oGC)De64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U#L5e~$ zOL9^f0)R3_3ZBXNc?uyJskx~NA*s0qIf*5ykA0+kAalscA{WaJky1SjSyc%+tR zmXzFY>2w2127x4<^9w4AGSf3k7@VCI97{@yGLuS6GV}9vgEN3maLmcfPF2V#DJihh z*H11=O)SYQOHIzt&CSm%2DwN-Co?%UuQ;_>KdDl;I8onN&pjHh&2juQ60FprD3nqb#g8ju=dvf#l z7rV~$aGeiCp6-jiz1R4Auk{DY`fUgbSP~q(B0PLcbk?3cpyJje?d?aq=3id8;PRq{ zmlrL)wtVfa_3LhJ*nV&4|NsBZl4mjk-62{MbP0l+XkKZ6g@< diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/text.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/text.png deleted file mode 100644 index 2546fcd90b78ab5752f74234520af202a6c3987b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 798 zcmXAlYe-XJ7{}kuB}=C`tC3Uis2C#YEF(%oowrN5E?>zZM=u=!!)$Hk)mC9(O>wRa ztp}7FMumD>MN&vAS7Q~pfuQN{Z5`z>l!S*Rq_&wNlqwpPlwd-drieN{O^})_sR}Fz z8;E)wQ_-|GPasfGxSS>$aRsSXlNw#vk)VN4;2IsS6Vx?l>Ewdk>>NQ&YxNMQKNTO7 zl|i&xt#-TJ@AuEm&3V0Ehr zKmx%31Q;lRal74+_xJaM_|(*t&1RdPo}QVRnVp@TpPvUFFc5()%gf6EgXYT0%IfMW z7=Vpn07O6&L}2y7b9YXF(PUauDMg&vSYE>31A3#Wwe5Px?T3%Y#>cG-&Ly`u5Dfiv z4d-1#h`|??3T3JV|KwQ-Q^;v|mUFqm$Q!9Hd?=PZ8S}+wB(iH?XMS864LScrkDYpO zq(^b9EU(~AbKi*BvGM%Z;IrkV9%D!xcquds+dsF6t-bHn;)u?m3SshkMqElKD#~Ft zzKiPIl3TmOXR1P|+k|#8n7f&gJ6UlP(HXtG0n2bYC&ctdZXd8H6DQQ7=*u#$Gc`@j zOG)MYU~KvaIr^iozD2e@aiyOuz+~qGBf=|9EOs1rC%K82rd64gp9(Qc?ox7`qifS$ zhy@>^@%xDRdtjr6wV$w*vv`E1m^CWO4=K1F!8X=g-_0UrwK;PvXzd%yk7wArTRwcf nSXpJ**OfNuzE@@2Gn)FB={Hgt{G?7Rd?*r?RhF8IYp?zTm=%Df diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/video.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/video.png deleted file mode 100644 index 55afa98662c7439702c4391be32151b59c65e253..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1313 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGoEX7WqAsj$Z!;#Vf4nJ zNUsNB#yF{oGC)De64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1UVK#D># zOL9^f0)R3_3ZBXNc?uyJsky1DHrHsBf%ipdZ&9wFl@+Mo$;Vkcv5P@A_uQq{heETG?y0yzC9fraSuz>xc-iKB^S-C2j9}#|+2Trc2JzJRTnfTzEQIH^v=t-uh~( zxc^nT;G^AFyj-F_E#k~I^^GcclIec6N$|KDEZ^HL2yRXD%)^JLrNU0ZK4B(tA;`e?y7+bL3Cv<0)SasI_CAaj~N#c(YL7*x>s=RUEzB;@PrBh& zH)D%og8`esF@{4D4id~9$qb1+3OxwHP0QHrcBOO2*;w_|95lANuJ3MPXxI5(O|0kK zRl|QgH_Ue({_&96Vc&zq|1bC+7nk<1Yuu@Ae>qY6-K)v7Yqj^V-D!HvaJ2dMZM$~H zu!p<&;w*k~%)4!W;alV}{X=v0Uhk~<**mx5&CKevXN-+f=bm`FyWqv#SP7|{IXP;~ zcdqPSDZPH*cNRIBH>Ot885zEOeQr=yWB#r(Ve!YC*VuRDXUi=Ow$PzK?rCL+Fg2guB&_nRD$dv!BcjdVIbiOV!A>s5L(B z_M7webFwb`{Y$Vp;Qn~>iWvW|`+K5R742;lemwcu^H&o81xx0 uulP@kQGh{%aR*z&{2E6WF!;j1pYh0Ho3#3@qwc_>hQZU-&t;ucLK6Tg{6(q& diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/web.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/web.png deleted file mode 100644 index 17017ce3f5c04869fd808d91732939ea9b32b36d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1845 zcmX9-30PBC7JeZt0R&N&im4Vm5LuK(q#_nd0tCVUMu-({*@BToAxV=L*+e!GkXn@r ziUOk+5JanpgIGYI)*&h-ERqnyl7#n?m%Ok@b?nd&oyW}mzH{$?&iTLZo^$Vi%IPuT zRu-Er006L}MTEv;XY!g6@Yp_1EnQ3Cg%lctKp-eo`<0k$&W|`O1OVdwHNz!tzVs;; zbOgiV!8qPAFf&EK0x~l*JvrPH!qgN#%abQayT0({W{mXN8i~OH(^&u=%LtrksXVR| zgU!ldIWbrn{PYx%HMdbK!l)b8sALhy<_Unflnkc`Rwf4oXU~*Vv1II8GK9y^7I4zo zAP^GbLTopXZa#0EirfR|UQfRzGrPO?&Y85umTaIGS*bWSRZ zD`W}1nAtmpDPF#w-d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/resources/stylesheet.css deleted file mode 100644 index 9addcfa..0000000 --- a/src/versions/pytop-0.0.1/Pytop/resources/stylesheet.css +++ /dev/null @@ -1,88 +0,0 @@ -viewport, -treeview, -treeview > header, -notebook > stack, -notebook > header { - background-color: rgba(0, 0, 0, 0.24); -} - - -notebook > header { - background-color: rgba(0, 0, 0, 0.24); - border-color: rgba(0, 232, 255, 0.64); -} - -box, -iconview { - background-color: rgba(0, 0, 0, 0.2); - background: rgba(0, 0, 0, 0.2); -} - -treeview, -treeview.view { - background: rgba(0, 0, 0, 0.2); - background-color: rgba(0, 0, 0, 0.2); -} - -cell { - margin: 0em; - padding: 0em; - /* float: left; */ -} - -cell:focus { - outline-style: solid; - outline-color: rgba(0, 232, 255, 0.64); -} - - -/* Ivonview and children default color */ -.view { - background-color: rgba(0, 0, 0, 0.22); - color: #ebebeb; -} - - -/* Hover over color when not selected */ -.view:hover { - box-shadow: inset 0 0 0 9999px alpha(rgba(0, 232, 255, 0.64), 0.54); -} - -/* Handles the icon selection hover and selected hover color. */ -.view:selected, -.view:selected:hover { - box-shadow: inset 0 0 0 9999px rgba(15, 134, 13, 0.49); -} - -/* Rubberband coloring */ -.rubberband, -rubberband, -flowbox rubberband, -treeview.view rubberband, -.content-view rubberband, -.content-view .rubberband, -XfdesktopIconView.view .rubberband { - border: 1px solid #6c6c6c; - background-color: rgba(21, 158, 167, 0.57); -} - -XfdesktopIconView.view:active { - background-color: rgba(172, 102, 21, 1); -} - - -XfdesktopIconView.view { - border-radius: 4px; - background-color: transparent; - color: white; - text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -} - -XfdesktopIconView.view:active { - box-shadow: none; - text-shadow: none; -} - -XfdesktopIconView.view .rubberband { - border-radius: 0; -} diff --git a/src/versions/pytop-0.0.1/Pytop/utils/Dragging.py b/src/versions/pytop-0.0.1/Pytop/utils/Dragging.py deleted file mode 100644 index a0b2856..0000000 --- a/src/versions/pytop-0.0.1/Pytop/utils/Dragging.py +++ /dev/null @@ -1,79 +0,0 @@ -import os, gi - -gi.require_version('Gdk', '3.0') - -from gi.repository import Gdk -from gi.repository import GObject - - -class Dragging: - def __init__(self): - # higher values make movement more performant - # lower values make movement smoother - self.SENSITIVITY = 1 - self.desktop = None - self.EvMask = Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON1_MOTION_MASK - self.offsetx = 0 - self.offsety = 0 - self.px = 0 - self.py = 0 - self.maxx = 0 - self.maxy = 0 - - def connectEvents(self, desktop, widget): - self.desktop = desktop - widget.set_events(self.EvMask) - widget.connect("button_press_event", self.press_event) - widget.connect("motion_notify_event", self.draggingEvent) - widget.show() - - def press_event(self, w, event): - if event.button == 1: - p = w.get_parent() - # offset == distance of parent widget from edge of screen ... - self.offsetx, self.offsety = p.get_window().get_position() - # plus distance from pointer to edge of widget - self.offsetx += event.x - self.offsety += event.y - # self.maxx, self.maxy both relative to the parent - # note that we're rounding down now so that these max values don't get - # rounded upward later and push the widget off the edge of its parent. - self.maxx = self.RoundDownToMultiple(p.get_allocation().width - w.get_allocation().width, self.SENSITIVITY) - self.maxy = self.RoundDownToMultiple(p.get_allocation().height - w.get_allocation().height, self.SENSITIVITY) - - - def draggingEvent(self, widget, event): - # x_root,x_root relative to screen - # x,y relative to parent (fixed widget) - # self.px,self.py stores previous values of x,y - - # get starting values for x,y - x = event.x_root - self.offsetx - y = event.y_root - self.offsety - # make sure the potential coordinates x,y: - # 1) will not push any part of the widget outside of its parent container - # 2) is a multiple of self.SENSITIVITY - x = self.RoundToNearestMultiple(self.Max(self.Min(x, self.maxx), 0), self.SENSITIVITY) - y = self.RoundToNearestMultiple(self.Max(self.Min(y, self.maxy), 0), self.SENSITIVITY) - if x != self.px or y != self.py: - self.px = x - self.py = y - self.desktop.move(widget, x, y) - - def Min(self, a, b): - if b < a: - return b - return a - - def Max(self, a, b): - if b > a: - return b - return a - - def RoundDownToMultiple(self, i, m): - return i/m*m - - def RoundToNearestMultiple(self, i, m): - if i % m > m / 2: - return (i/m+1)*m - return i/m*m diff --git a/src/versions/pytop-0.0.1/Pytop/utils/FileHandler.py b/src/versions/pytop-0.0.1/Pytop/utils/FileHandler.py deleted file mode 100644 index c4dfa3b..0000000 --- a/src/versions/pytop-0.0.1/Pytop/utils/FileHandler.py +++ /dev/null @@ -1,93 +0,0 @@ - -import os, shutil, subprocess, threading - - -def threaded(fn): - def wrapper(*args, **kwargs): - threading.Thread(target=fn, args=args, kwargs=kwargs).start() - return wrapper - -class FileHandler: - def __init__(self): - # 'Filters' - self.office = ('.doc', '.docx', '.xls', '.xlsx', '.xlt', '.xltx' '.xlm', '.ppt', 'pptx', '.pps', '.ppsx', '.odt', '.rtf') - self.vids = ('.mkv', '.avi', '.flv', '.mov', '.m4v', '.mpg', '.wmv', '.mpeg', '.mp4', '.webm') - self.txt = ('.txt', '.text', '.sh', '.cfg', '.conf') - self.music = ('.psf', '.mp3', '.ogg' , '.flac') - self.images = ('.png', '.jpg', '.jpeg', '.gif') - self.pdf = ('.pdf') - - # Args - self.MEDIAPLAYER = "mpv"; - self.IMGVIEWER = "mirage"; - self.MUSICPLAYER = "/opt/deadbeef/bin/deadbeef"; - self.OFFICEPROG = "libreoffice"; - self.TEXTVIEWER = "leafpad"; - self.PDFVIEWER = "evince"; - self.FILEMANAGER = "spacefm"; - self.MPLAYER_WH = " -xy 1600 -geometry 50%:50% "; - self.MPV_WH = " -geometry 50%:50% "; - - @threaded - def openFile(self, file): - print("Opening: " + file) - if file.lower().endswith(self.vids): - subprocess.Popen([self.MEDIAPLAYER, self.MPV_WH, file]) - elif file.lower().endswith(self.music): - subprocess.Popen([self.MUSICPLAYER, file]) - elif file.lower().endswith(self.images): - subprocess.Popen([self.IMGVIEWER, file]) - elif file.lower().endswith(self.txt): - subprocess.Popen([self.TEXTVIEWER, file]) - elif file.lower().endswith(self.pdf): - subprocess.Popen([self.PDFVIEWER, file]) - elif file.lower().endswith(self.office): - subprocess.Popen([self.OFFICEPROG, file]) - else: - subprocess.Popen(['xdg-open', file]) - - - def createFile(self, newFileName): - pass - - def updateFile(self, oldFileName, newFileName): - try: - print("Renaming...") - print(oldFileName + " --> " + newFileName) - os.rename(oldFileName, newFileName) - return 0 - except Exception as e: - print("An error occured renaming the file:") - print(e) - return 1 - - def deleteFile(self, toDeleteFile): - try: - print("Deleting...") - print(toDeleteFile) - if os.path.exists(toDeleteFile): - if os.path.isfile(toDeleteFile): - os.remove(toDeleteFile) - elif os.path.isdir(toDeleteFile): - shutil.rmtree(toDeleteFile) - else: - print("An error occured deleting the file:") - return 1 - else: - print("The folder/file does not exist") - return 1 - except Exception as e: - print("An error occured deleting the file:") - print(e) - return 1 - - return 0 - - def copyFile(self): - pass - - def cutFile(self): - pass - - def pasteFile(self): - pass diff --git a/src/versions/pytop-0.0.1/Pytop/utils/Icon.py b/src/versions/pytop-0.0.1/Pytop/utils/Icon.py deleted file mode 100644 index 826e408..0000000 --- a/src/versions/pytop-0.0.1/Pytop/utils/Icon.py +++ /dev/null @@ -1,167 +0,0 @@ - -# Gtk Imports -import gi -gi.require_version('Gtk', '3.0') -gi.require_version('Gdk', '3.0') - -from gi.repository import Gtk as gtk -from gi.repository import Gio as gio -from gi.repository import GdkPixbuf -from xdg.DesktopEntry import DesktopEntry - -# Python Imports -import os, subprocess, hashlib, threading - -from os.path import isdir, isfile, join - - - -def threaded(fn): - def wrapper(*args, **kwargs): - threading.Thread(target=fn, args=args, kwargs=kwargs).start() - return wrapper - -class Icon: - def __init__(self, settings): - self.settings = settings - self.thubnailGen = settings.getThumbnailGenerator() - self.vidsList = settings.returnVidsExtensionList() - self.imagesList = settings.returnImagesExtensionList() - self.GTK_ORIENTATION = settings.returnIconImagePos() - self.usrHome = settings.returnUserHome() - self.iconContainerWH = settings.returnContainerWH() - self.systemIconImageWH = settings.returnSystemIconImageWH() - self.viIconWH = settings.returnVIIconWH() - - - def createIcon(self, dir, file): - fullPath = dir + "/" + file - return self.getIconImage(file, fullPath) - - - def getIconImage(self, file, fullPath): - try: - thumbnl = None - - # Video thumbnail - if file.lower().endswith(self.vidsList): - fileHash = hashlib.sha256(str.encode(fullPath)).hexdigest() - hashImgPth = self.usrHome + "/.thumbnails/normal/" + fileHash + ".png" - - if isfile(hashImgPth) == False: - self.generateVideoThumbnail(fullPath, hashImgPth) - - thumbnl = self.createIconImageBuffer(hashImgPth, self.viIconWH) - # Image Icon - elif file.lower().endswith(self.imagesList): - thumbnl = self.createIconImageBuffer(fullPath, self.viIconWH) - # .desktop file parsing - elif fullPath.lower().endswith( ('.desktop',) ): - thumbnl = self.parseDesktopFiles(fullPath) - # System icons - else: - thumbnl = self.getSystemThumbnail(fullPath, self.systemIconImageWH[0]) - - if thumbnl == None: # If no icon, try stock file icon... - thumbnl = gtk.Image.new_from_icon_name("gtk-file", gtk.IconSize.LARGE_TOOLBAR) - - if thumbnl == None: # If no icon whatsoever, return internal default - thumbnl = gtk.Image.new_from_file("resources/icons/bin.png") - - return thumbnl - except Exception as e: - print(e) - return gtk.Image.new_from_file("resources/icons/bin.png") - - - def parseDesktopFiles(self, fullPath): - try: - xdgObj = DesktopEntry(fullPath) - icon = xdgObj.getIcon() - iconsDirs = "/usr/share/icons" - altIconPath = "" - - if "steam" in icon: - steamIconsDir = self.usrHome + "/.thumbnails/steam_icons/" - name = xdgObj.getName() - fileHash = hashlib.sha256(str.encode(name)).hexdigest() - - if isdir(steamIconsDir) == False: - os.mkdir(steamIconsDir) - - hashImgPth = steamIconsDir + fileHash + ".jpg" - if isfile(hashImgPth) == True: - # Use video sizes since headers are bigger - return self.createIconImageBuffer(hashImgPth, self.viIconWH) - - execStr = xdgObj.getExec() - parts = execStr.split("steam://rungameid/") - id = parts[len(parts) - 1] - - # NOTE: Can try this logic instead... - # if command exists use it instead of header image - # if "steamcmd app_info_print id": - # proc = subprocess.Popen(["steamcmd", "app_info_print", id]) - # proc.wait() - # else: - # use the bottom logic - - imageLink = "https://steamcdn-a.akamaihd.net/steam/apps/" + id + "/header.jpg" - proc = subprocess.Popen(["wget", "-O", hashImgPth, imageLink]) - proc.wait() - - # Use video sizes since headers are bigger - return self.createIconImageBuffer(hashImgPth, self.viIconWH) - elif os.path.exists(icon): - return self.createIconImageBuffer(icon, self.systemIconImageWH) - else: - for (dirpath, dirnames, filenames) in os.walk(iconsDirs): - for file in filenames: - appNM = "application-x-" + icon - if appNM in file: - altIconPath = dirpath + "/" + file - break - - return self.createIconImageBuffer(altIconPath, self.systemIconImageWH) - except Exception as e: - print(e) - return None - - - def getSystemThumbnail(self, filename, size): - try: - iconPath = None - if os.path.exists(filename): - file = gio.File.new_for_path(filename) - info = file.query_info('standard::icon' , 0 , gio.Cancellable()) - icon = info.get_icon().get_names()[0] - iconTheme = gtk.IconTheme.get_default() - iconFile = iconTheme.lookup_icon(icon , size , 0) - - if iconFile != None: - iconPath = iconFile.get_filename() - return self.createIconImageBuffer(iconPath, self.systemIconImageWH) - else: - return None - else: - return None - except Exception as e: - print(e) - return None - - - def createIconImageBuffer(self, path, wxh): - try: - pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, wxh[0], wxh[1], False) - except Exception as e: - return None - - return gtk.Image.new_from_pixbuf(pixbuf) - - - def generateVideoThumbnail(self, fullPath, hashImgPth): - try: - proc = subprocess.Popen([self.thubnailGen, "-t", "65%", "-s", "300", "-c", "jpg", "-i", fullPath, "-o", hashImgPth]) - proc.wait() - except Exception as e: - print(e) diff --git a/src/versions/pytop-0.0.1/Pytop/utils/Settings.py b/src/versions/pytop-0.0.1/Pytop/utils/Settings.py deleted file mode 100644 index 6c612f5..0000000 --- a/src/versions/pytop-0.0.1/Pytop/utils/Settings.py +++ /dev/null @@ -1,139 +0,0 @@ - -# Gtk Imports -import gi, cairo, os -gi.require_version('Gtk', '3.0') -gi.require_version('Gdk', '3.0') - -from gi.repository import Gtk as gtk -from gi.repository import Gdk as gdk - -class Settings: - def __init__(self): - self.builder = None - self.hideHiddenFiles = True - - - self.GTK_ORIENTATION = 1 # HORIZONTAL (0) VERTICAL (1) - self.THUMB_GENERATOR = "ffmpegthumbnailer" - self.DEFAULTCOLOR = gdk.RGBA(0.0, 0.0, 0.0, 0.0) # ~#00000000 - self.MOUSEOVERCOLOR = gdk.RGBA(0.0, 0.9, 1.0, 0.64) # ~#00e8ff - self.SELECTEDCOLOR = gdk.RGBA(0.4, 0.5, 0.1, 0.84) - - self.ColumnSize = 8 - self.usrHome = os.path.expanduser('~') - self.desktopPath = self.usrHome + "/Desktop" - self.webHome = 'http://webfm.com/' - self.iconContainerWxH = [128, 128] - self.systemIconImageWxH = [72, 72] - self.viIconWxH = [256, 128] - self.vidsExtensionList = ('.mkv', '.avi', '.flv', '.mov', '.m4v', '.mpg', '.wmv', '.mpeg', '.mp4', '.webm') - self.imagesExtensionList = ('.png', '.jpg', '.jpeg', '.gif', '.ico', '.tga') - - - def attachBuilder(self, builder): - self.builder = builder - self.builder.add_from_file("resources/PyTop.glade") - - def createWindow(self): - # Get window and connect signals - window = self.builder.get_object("Window") - window.connect("delete-event", gtk.main_quit) - self.setWindowData(window) - return window - - def setWindowData(self, window): - screen = window.get_screen() - visual = screen.get_rgba_visual() - if visual != None and screen.is_composited(): - window.set_visual(visual) - - # bind css file - cssProvider = gtk.CssProvider() - cssProvider.load_from_path('resources/stylesheet.css') - screen = gdk.Screen.get_default() - styleContext = gtk.StyleContext() - styleContext.add_provider_for_screen(screen, cssProvider, gtk.STYLE_PROVIDER_PRIORITY_USER) - - window.set_app_paintable(True) - monitors = self.getMonitorData(screen) - window.resize(monitors[0].width, monitors[0].height) - - def getMonitorData(self, screen): - monitors = [] - for m in range(screen.get_n_monitors()): - monitors.append(screen.get_monitor_geometry(m)) - - for monitor in monitors: - print(str(monitor.width) + "x" + str(monitor.height) + "+" + str(monitor.x) + "+" + str(monitor.y)) - - return monitors - - - def returnBuilder(self): return self.builder - def returnUserHome(self): return self.usrHome - def returnDesktopPath(self): return self.usrHome + "/Desktop" - def returnIconImagePos(self): return self.GTK_ORIENTATION - def getThumbnailGenerator(self): return self.THUMB_GENERATOR - def returnColumnSize(self): return self.ColumnSize - def returnContainerWH(self): return self.iconContainerWxH - def returnSystemIconImageWH(self): return self.systemIconImageWxH - def returnVIIconWH(self): return self.viIconWxH - def returnWebHome(self): return self.webHome - def isHideHiddenFiles(self): return self.hideHiddenFiles - def returnVidsExtensionList(self): return self.vidsExtensionList - def returnImagesExtensionList(self): return self.imagesExtensionList - - def setDefaultWebviewSettings(self, widget, settings=None): - # Usability - settings.set_property('enable-fullscreen', True) - settings.set_property('print-backgrounds', True) - settings.set_property('enable-frame-flattening', False) - settings.set_property('enable-plugins', True) - settings.set_property('enable-java', False) - settings.set_property('enable-resizable-text-areas', True) - settings.set_property('zoom-text-only', False) - settings.set_property('enable-smooth-scrolling', True) - settings.set_property('enable-back-forward-navigation-gestures', False) - settings.set_property('media-playback-requires-user-gesture', False) - settings.set_property('enable-tabs-to-links', True) - settings.set_property('enable-caret-browsing', False) - - # Security - settings.set_property('user-agent','Mozilla/5.0 (X11; Generic; Linux x86-64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Safari/605.1.15') - settings.set_property('enable-private-browsing', False) - settings.set_property('enable-xss-auditor', True) - settings.set_property('enable-hyperlink-auditing', False) - settings.set_property('enable-site-specific-quirks', True) - settings.set_property('enable-offline-web-application-cache', True) - settings.set_property('enable-page-cache', True) - settings.set_property('allow-modal-dialogs', False) - settings.set_property('enable-html5-local-storage', True) - settings.set_property('enable-html5-database', True) - settings.set_property('allow-file-access-from-file-urls', False) - settings.set_property('allow-universal-access-from-file-urls', False) - settings.set_property('enable-dns-prefetching', False) - - # Media stuff - # settings.set_property('hardware-acceleration-policy', 'on-demand') - settings.set_property('enable-webgl', False) - settings.set_property('enable-webaudio', True) - settings.set_property('enable-accelerated-2d-canvas', True) - settings.set_property('auto-load-images', True) - settings.set_property('enable-media-capabilities', True) - settings.set_property('enable-media-stream', True) - settings.set_property('enable-mediasource', True) - settings.set_property('enable-encrypted-media', True) - settings.set_property('media-playback-allows-inline', True) - - # JS - settings.set_property('enable-javascript', True) - settings.set_property('enable-javascript-markup', True) - settings.set_property('javascript-can-access-clipboard', False) - settings.set_property('javascript-can-open-windows-automatically', False) - - # Debugging - settings.set_property('enable-developer-extras', False) - settings.set_property('enable-write-console-messages-to-stdout', False) - settings.set_property('draw-compositing-indicators', False) - settings.set_property('enable-mock-capture-devices', False) - settings.set_property('enable-spatial-navigation', False) diff --git a/src/versions/pytop-0.0.1/Pytop/utils/__init__.py b/src/versions/pytop-0.0.1/Pytop/utils/__init__.py deleted file mode 100644 index e291f0f..0000000 --- a/src/versions/pytop-0.0.1/Pytop/utils/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from utils.Dragging import Dragging -from utils.Settings import Settings -from utils.Events import Events -from utils.Grid import Grid -from utils.Icon import Icon -from utils.FileHandler import FileHandler