# Path: kano/paths.py
# DNS_FILE = '/etc/resolvconf/resolv.conf.d/base'
# DNS_INTERFACES_FILE = '/etc/resolvconf/interface-order'
# DNS_INTERFACES_BACKUP_FILE = '/etc/resolvconf/interface-order.backup'
# SUPPLICANT_LOGFILE = '/var/log/kano_wpa.log'
# SUPPLICANT_CONFIG = '/etc/wpa_supplicant/wpa_supplicant.conf'
# INTERNET_UP_FILE = '/var/run/internet_monitor'
# KANO_CONNECT_PIDFILE = '/var/run/kano-connect.pid'


import os
import sys
from gi import require_version
from gi.repository import Gtk, Gdk
from kano.paths import common_css_dir
    styleContext = Gtk.StyleContext()

    if priority == "FALLBACK":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_FALLBACK
    elif priority == "THEME":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_THEME
    elif priority == "SETTINGS":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_SETTINGS
    elif priority == "APPLICATION":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
    elif priority == "USER":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_USER

    styleContext.add_provider_for_screen(screen, css, gtk_priority)


# Apply the styling from a CSS file to a specific widget
def apply_styling_to_widget(widget, path):

    if not os.path.exists(path):
        sys.exit('{} CSS file missing!'.format(path))

    provider = Gtk.CssProvider()
    provider.load_from_path(path)
    styleContext = widget.get_style_context()
    styleContext.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_USER)


# Apply the colour variable names to the widget (useful if you want to refer to kano_green)
def apply_colours_to_widget(widget):

# Path: kano/paths.py
# DNS_FILE = '/etc/resolvconf/resolv.conf.d/base'
# DNS_INTERFACES_FILE = '/etc/resolvconf/interface-order'
# DNS_INTERFACES_BACKUP_FILE = '/etc/resolvconf/interface-order.backup'
# SUPPLICANT_LOGFILE = '/var/log/kano_wpa.log'
# SUPPLICANT_CONFIG = '/etc/wpa_supplicant/wpa_supplicant.conf'
# INTERNET_UP_FILE = '/var/run/internet_monitor'
# KANO_CONNECT_PIDFILE = '/var/run/kano-connect.pid'


# Path: kano/gtk3/apply_styles.py
import os
import sys
from gi import require_version
from gi.repository import Gtk, Gdk
from kano.paths import common_css_dir

    styleContext = Gtk.StyleContext()

    if priority == "FALLBACK":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_FALLBACK
    elif priority == "THEME":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_THEME
    elif priority == "SETTINGS":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_SETTINGS
    elif priority == "APPLICATION":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
    elif priority == "USER":
        gtk_priority = Gtk.STYLE_PROVIDER_PRIORITY_USER

    styleContext.add_provider_for_screen(screen, css, gtk_priority)


# Apply the styling from a CSS file to a specific widget
def apply_styling_to_widget(widget, path):

    if not os.path.exists(path):
        sys.exit('{} CSS file missing!'.format(path))

    provider = Gtk.CssProvider()
    provider.load_from_path(path)
    styleContext = widget.get_style_context()
    styleContext.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_USER)


# Apply the colour variable names to the widget (useful if you want to refer to kano_green)
def apply_colours_to_widget(widget):

    path = os.path.join(common_css_dir, "colours.css")