Added projects, updated names
1
Python Projects/cli/Keyboard Mouse
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 7a07627baa33c98800523d29138e211acfbbdb5b
|
51
Python Projects/gtk/Chronos Browser/ChronosBrowser.py
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
# Gtk imports
|
||||||
|
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
|
||||||
|
import inspect, faulthandler
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from utils import Settings
|
||||||
|
from signal_classes import CrossClassSignals, WebviewSignals
|
||||||
|
|
||||||
|
|
||||||
|
class Main:
|
||||||
|
def __init__(self):
|
||||||
|
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, gtk.main_quit)
|
||||||
|
faulthandler.enable() # For better debug info
|
||||||
|
webkit.WebView() # Need one initialized for webview to work from glade file
|
||||||
|
|
||||||
|
builder = gtk.Builder()
|
||||||
|
settings = Settings()
|
||||||
|
settings.attachBuilder(builder)
|
||||||
|
|
||||||
|
# Gets the methods from the classes and sets to handler.
|
||||||
|
# Then, builder connects to any signals it needs.
|
||||||
|
classes = [CrossClassSignals(settings),
|
||||||
|
WebviewSignals(settings)]
|
||||||
|
|
||||||
|
handlers = {}
|
||||||
|
for c in classes:
|
||||||
|
methods = inspect.getmembers(c, predicate=inspect.ismethod)
|
||||||
|
handlers.update(methods)
|
||||||
|
|
||||||
|
builder.connect_signals(handlers)
|
||||||
|
window = settings.createWindow()
|
||||||
|
window.show_all()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
try:
|
||||||
|
main = Main()
|
||||||
|
gtk.main()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
12
Python Projects/gtk/Chronos Browser/ChronosBrowser.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/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 ./ChronosBrowser.py
|
||||||
|
python3 ./ChronosBrowser.py
|
||||||
|
}
|
||||||
|
main $@;
|
1
Python Projects/gtk/Chronos Browser/dependencies.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
sudo apt-get -y install python3 pygobject3-devel webkitgtk3-devel ubuntu-restricted-extras gstreamer1.0-gtk3
|
@ -0,0 +1,39 @@
|
|||||||
|
# Gtk imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('WebKit2', '4.0')
|
||||||
|
|
||||||
|
from gi.repository import WebKit2 as webkit
|
||||||
|
|
||||||
|
|
||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
class WebviewFactory:
|
||||||
|
def __init__(self):
|
||||||
|
self.index = -1
|
||||||
|
self.view_collection = []
|
||||||
|
|
||||||
|
def createWebview(self):
|
||||||
|
view = webkit.WebView()
|
||||||
|
self.view_collection.append(view)
|
||||||
|
self.index += 1
|
||||||
|
return view
|
||||||
|
|
||||||
|
def deleteWebview(self, index):
|
||||||
|
if (len(self.view_collection) - 1) > 0:
|
||||||
|
self.view_collection.pop(index)
|
||||||
|
self.index -= 1
|
||||||
|
return 0
|
||||||
|
else:
|
||||||
|
return 1
|
||||||
|
|
||||||
|
def get_index(self, index):
|
||||||
|
val = index
|
||||||
|
if val >= 0 and val < len(self.view_collection):
|
||||||
|
self.index = index
|
||||||
|
return self.view_collection[self.index]
|
||||||
|
|
||||||
|
def returnNotebookSize(self,):
|
||||||
|
return len(self.view_collection)
|
1
Python Projects/gtk/Chronos Browser/factory/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from factory.WebviewFactory import WebviewFactory
|
@ -0,0 +1,164 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.22.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.20"/>
|
||||||
|
<object class="GtkImage" id="addImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-add</property>
|
||||||
|
<property name="icon_size">3</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="deleteImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-delete</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="homeImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Home</property>
|
||||||
|
<property name="stock">gtk-home</property>
|
||||||
|
<property name="icon_size">3</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="refreshImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-refresh</property>
|
||||||
|
<property name="icon_size">3</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkWindow" id="Window">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="title" translatable="yes">Chronos Browser</property>
|
||||||
|
<property name="window_position">center</property>
|
||||||
|
<property name="default_width">800</property>
|
||||||
|
<property name="default_height">600</property>
|
||||||
|
<property name="gravity">center</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="menuBar1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">homeImage</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
|
<signal name="clicked" handler="loadHome" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Refresh...</property>
|
||||||
|
<property name="image">refreshImage</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
|
<signal name="clicked" handler="refreshPage" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSearchEntry" id="webview_search">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Search...</property>
|
||||||
|
<property name="primary_icon_name">edit-find-symbolic</property>
|
||||||
|
<property name="primary_icon_activatable">False</property>
|
||||||
|
<property name="primary_icon_sensitive">False</property>
|
||||||
|
<signal name="key-release-event" handler="runSearchWebview" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkNotebook" id="notebook">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="show_border">False</property>
|
||||||
|
<property name="scrollable">True</property>
|
||||||
|
<property name="enable_popup">True</property>
|
||||||
|
<signal name="switch-page" handler="selecte_view" swapped="no"/>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child type="action-start">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">deleteImage</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
|
<signal name="clicked" handler="delTab" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="tab_fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child type="action-end">
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">addImage</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
|
<signal name="clicked" handler="addTab" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="tab_fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
@ -0,0 +1,3 @@
|
|||||||
|
window {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
# Gtk imports
|
||||||
|
|
||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
class CrossClassSignals:
|
||||||
|
def __init__(self, settings):
|
||||||
|
self.settings = settings
|
||||||
|
self.builder = self.settings.returnBuilder()
|
||||||
|
|
||||||
|
|
||||||
|
def closePopup(self, widget, data=None):
|
||||||
|
widget.hide()
|
@ -0,0 +1,98 @@
|
|||||||
|
# Gtk imports
|
||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
|
||||||
|
from gi.repository import Gtk as gtk
|
||||||
|
|
||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
from factory import WebviewFactory
|
||||||
|
|
||||||
|
|
||||||
|
class WebviewSignals:
|
||||||
|
def __init__(self, settings):
|
||||||
|
self.webviewFactory = WebviewFactory()
|
||||||
|
self.settings = settings
|
||||||
|
builder = settings.returnBuilder()
|
||||||
|
|
||||||
|
self.home_page = settings.returnWebHome()
|
||||||
|
self.webview_search = builder.get_object("webview_search")
|
||||||
|
self.notebook = builder.get_object("notebook")
|
||||||
|
self.page = None
|
||||||
|
self.index = 0
|
||||||
|
self.labelLen = settings.returnLabelLen()
|
||||||
|
|
||||||
|
self.addTab()
|
||||||
|
self.page = self.notebook.get_nth_page(0)
|
||||||
|
|
||||||
|
|
||||||
|
def addTab(self, widget=None, uri=None):
|
||||||
|
self.current_webview = self.createWebview()
|
||||||
|
self.addToNotebook(self.current_webview, uri)
|
||||||
|
|
||||||
|
def delTab(self, widget):
|
||||||
|
state = self.webviewFactory.deleteWebview(self.index)
|
||||||
|
if state == 0:
|
||||||
|
self.notebook.remove_page(self.index)
|
||||||
|
|
||||||
|
def selecte_view(self, widget, page, index):
|
||||||
|
self.current_webview = self.webviewFactory.get_index(index)
|
||||||
|
self.webview_search.set_text(self.current_webview.get_uri())
|
||||||
|
self.page = page
|
||||||
|
self.index = index
|
||||||
|
|
||||||
|
def createWebview(self):
|
||||||
|
webview = self.webviewFactory.createWebview()
|
||||||
|
webview.connect("create", self.webviewCreateSignal)
|
||||||
|
self.set_webview_settings(webview)
|
||||||
|
webview.load_uri(self.home_page)
|
||||||
|
webview.connect("load-changed", self.setUrlBar)
|
||||||
|
return webview
|
||||||
|
|
||||||
|
def runSearchWebview(self, widget, data=None):
|
||||||
|
query = widget.get_text().strip()
|
||||||
|
if data.keyval == 65293: # If enter key pressed
|
||||||
|
if "http://" in query or "https://" in query or "file://" in query:
|
||||||
|
self.current_webview.load_uri(query)
|
||||||
|
else:
|
||||||
|
query = '+'.join(query.split())
|
||||||
|
query = "http://www.google.com/search?q=" + query
|
||||||
|
self.current_webview.load_uri(query)
|
||||||
|
|
||||||
|
self.notebook.get_tab_label(self.page).set_text(query)
|
||||||
|
|
||||||
|
def refreshPage(self, widget, data=None):
|
||||||
|
self.current_webview.load_uri(self.current_webview.get_uri())
|
||||||
|
|
||||||
|
def loadHome(self, widget):
|
||||||
|
self.current_webview.load_uri(self.home_page)
|
||||||
|
|
||||||
|
def setUrlBar(self, widget, data=None):
|
||||||
|
uri = widget.get_uri()
|
||||||
|
self.webview_search.set_text(uri)
|
||||||
|
label = uri[0: self.labelLen] + "..."
|
||||||
|
self.notebook.get_tab_label(self.page).set_text(label)
|
||||||
|
|
||||||
|
def webviewCreateSignal(self, widget, eve):
|
||||||
|
uri = eve.get_request()
|
||||||
|
type = eve.get_navigation_type()
|
||||||
|
isRedirect = eve.is_redirect()
|
||||||
|
|
||||||
|
if isRedirect == False and type == 5: # Open in new tab
|
||||||
|
self.addTab(None, uri.get_uri())
|
||||||
|
|
||||||
|
|
||||||
|
def addToNotebook(self, view, uri=None):
|
||||||
|
webview_box = gtk.Box()
|
||||||
|
webview_box.pack_start(view, expand = True, fill = True, padding = 0)
|
||||||
|
webview_box.show_all()
|
||||||
|
|
||||||
|
if uri:
|
||||||
|
self.notebook.append_page(webview_box, gtk.Label(uri))
|
||||||
|
view.load_uri(uri)
|
||||||
|
else:
|
||||||
|
self.notebook.append_page(webview_box, gtk.Label(view.get_uri()))
|
||||||
|
|
||||||
|
def set_webview_settings(self, view):
|
||||||
|
self.settings.setDefaultWebviewSettings(view, view.get_settings())
|
@ -0,0 +1,2 @@
|
|||||||
|
from signal_classes.CrossClassSignals import CrossClassSignals
|
||||||
|
from signal_classes.WebviewSignals import WebviewSignals
|
125
Python Projects/gtk/Chronos Browser/utils/Settings.py
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
# Gtk imports
|
||||||
|
import gi, cairo
|
||||||
|
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
|
||||||
|
|
||||||
|
# Python imports
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Application imports
|
||||||
|
|
||||||
|
|
||||||
|
class Settings:
|
||||||
|
def __init__(self):
|
||||||
|
self.builder = None
|
||||||
|
|
||||||
|
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.webHome = 'http://webfm.com/'
|
||||||
|
self.labelLength = 25 - 3
|
||||||
|
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/ChronosBrowser.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)
|
||||||
|
|
||||||
|
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 returnWebHome(self): return self.webHome
|
||||||
|
def returnVidsExtensionList(self): return self.vidsExtensionList
|
||||||
|
def returnImagesExtensionList(self): return self.imagesExtensionList
|
||||||
|
def returnLabelLen(self): return self.labelLength
|
||||||
|
|
||||||
|
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', True)
|
||||||
|
settings.set_property('enable-html5-local-storage', True)
|
||||||
|
settings.set_property('enable-html5-database', True)
|
||||||
|
settings.set_property('allow-file-access-from-file-urls', True)
|
||||||
|
settings.set_property('allow-universal-access-from-file-urls', False)
|
||||||
|
settings.set_property('enable-dns-prefetching', False)
|
||||||
|
|
||||||
|
# Media stuff
|
||||||
|
settings.set_hardware_acceleration_policy(0)
|
||||||
|
# settings.set_property('hardware-acceleration-policy', 'on-demand')
|
||||||
|
settings.set_property('enable-webgl', True)
|
||||||
|
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)
|
1
Python Projects/gtk/Chronos Browser/utils/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from utils.Settings import Settings
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 5.1 MiB After Width: | Height: | Size: 5.1 MiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 415 KiB After Width: | Height: | Size: 415 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 966 KiB After Width: | Height: | Size: 966 KiB |
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 743 KiB After Width: | Height: | Size: 743 KiB |
Before Width: | Height: | Size: 993 KiB After Width: | Height: | Size: 993 KiB |
Before Width: | Height: | Size: 716 KiB After Width: | Height: | Size: 716 KiB |
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 481 KiB After Width: | Height: | Size: 481 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 540 KiB After Width: | Height: | Size: 540 KiB |
Before Width: | Height: | Size: 472 KiB After Width: | Height: | Size: 472 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |