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 9f3608f..0000000 Binary files a/src/debs/pytop-0-0-1-x64/bin/pytop and /dev/null differ 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 7943e4e..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/archive.png and /dev/null differ 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 c010134..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/audio.png and /dev/null differ diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/bin.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/bin.png deleted file mode 100644 index d6954e3..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/bin.png and /dev/null differ diff --git a/src/versions/pytop-0.0.1/Pytop/resources/icons/dir.png b/src/versions/pytop-0.0.1/Pytop/resources/icons/dir.png deleted file mode 100644 index a9b5e9f..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/dir.png and /dev/null differ 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 f838826..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/doc.png and /dev/null differ 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 9f40122..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/pdf.png and /dev/null differ 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 3a339af..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/presentation.png and /dev/null differ 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 710efa6..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/spreadsheet.png and /dev/null differ 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 2546fcd..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/text.png and /dev/null differ 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 55afa98..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/video.png and /dev/null differ 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 17017ce..0000000 Binary files a/src/versions/pytop-0.0.1/Pytop/resources/icons/web.png and /dev/null differ diff --git a/src/versions/pytop-0.0.1/Pytop/resources/stylesheet.css b/src/versions/pytop-0.0.1/Pytop/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