# Path: kano/gtk3/cursor.py
# def hand_cursor(button, event):
# def arrow_cursor(button, event):
# def attach_cursor_events(button):
# 
# Path: kano/gtk3/apply_styles.py
# 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)
# 
# def apply_colours_to_widget(widget):
#     path = os.path.join(common_css_dir, "colours.css")
#     apply_styling_to_widget(widget, path)
# 
# 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
from kano.gtk3 import cursor
from kano.gtk3.apply_styles import apply_styling_to_widget, apply_colours_to_widget
from kano.paths import common_css_dir
        self.label.set_text(text)

    def get_label(self):
        return self.label.get_text()


class KanoButton(GenericButton):
    BUTTON_CSS = os.path.join(common_css_dir, 'kano_button.css')
    SPINNER_CSS = os.path.join(common_css_dir, 'spinner.css')

    def __init__(self, text="", color="green", icon_filename=""):

        # Keep this updated - useful for set_color function
        self.available_colors = ["orange", "green", "red", "grey", "blue"]

        # Create button
        GenericButton.__init__(self, text, icon_filename)

        style_context = self.get_style_context()
        style_context.add_class("kano_button")
        style_context.add_class("kano_button_padding")
        style_context.add_class(color + "_background")

        self.align = None
        cursor.attach_cursor_events(self)

        self.add_spinner()

        widgets = [self, self.label]
        for w in widgets:

# Path: kano/gtk3/cursor.py
# def hand_cursor(button, event):
# def arrow_cursor(button, event):
# def attach_cursor_events(button):
# 
# Path: kano/gtk3/apply_styles.py
# 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)
# 
# def apply_colours_to_widget(widget):
#     path = os.path.join(common_css_dir, "colours.css")
#     apply_styling_to_widget(widget, path)
# 
# 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/buttons.py
import os
import sys
from gi import require_version
from gi.repository import Gtk
from kano.gtk3 import cursor
from kano.gtk3.apply_styles import apply_styling_to_widget, apply_colours_to_widget
from kano.paths import common_css_dir

        self.label.set_text(text)

    def get_label(self):
        return self.label.get_text()


class KanoButton(GenericButton):
    BUTTON_CSS = os.path.join(common_css_dir, 'kano_button.css')
    SPINNER_CSS = os.path.join(common_css_dir, 'spinner.css')

    def __init__(self, text="", color="green", icon_filename=""):

        # Keep this updated - useful for set_color function
        self.available_colors = ["orange", "green", "red", "grey", "blue"]

        # Create button
        GenericButton.__init__(self, text, icon_filename)

        style_context = self.get_style_context()
        style_context.add_class("kano_button")
        style_context.add_class("kano_button_padding")
        style_context.add_class(color + "_background")

        self.align = None
        cursor.attach_cursor_events(self)

        self.add_spinner()

        widgets = [self, self.label]
        for w in widgets:

            apply_colours_to_widget(w)