# Path: kano/gtk3/icons.py
# def set_from_name(name):
# 
# Path: kano/gtk3/cursor.py
# def attach_cursor_events(button):
#     button.connect('enter-notify-event', hand_cursor)
#     button.connect('leave-notify-event', arrow_cursor)
#     button.connect('button-press-event', arrow_cursor)
# 
# 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'


from gi import require_version
from gi.repository import Gtk
from kano.gtk3 import icons
from kano.gtk3.cursor import attach_cursor_events
from kano.paths import common_css_dir
import os
import sys
#
# top_bar.py
#
# Copyright (C) 2014 - 2018 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2
#
# This controls the styling of the (pretend) top window bar.
#

require_version('Gtk', '3.0')


TOP_BAR_HEIGHT = 44
HEADER_WIDTH = 100


class TopBar(Gtk.EventBox):
    def __init__(self, title, window_width=-1, has_buttons=True):

        Gtk.EventBox.__init__(self)

        self.has_buttons = has_buttons

        # Styling
        self.cssProvider = Gtk.CssProvider()

# Path: kano/gtk3/icons.py
# def set_from_name(name):
# 
# Path: kano/gtk3/cursor.py
# def attach_cursor_events(button):
#     button.connect('enter-notify-event', hand_cursor)
#     button.connect('leave-notify-event', arrow_cursor)
#     button.connect('button-press-event', arrow_cursor)
# 
# 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/top_bar.py
from gi import require_version
from gi.repository import Gtk
from kano.gtk3 import icons
from kano.gtk3.cursor import attach_cursor_events
from kano.paths import common_css_dir
import os
import sys

#
# top_bar.py
#
# Copyright (C) 2014 - 2018 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2
#
# This controls the styling of the (pretend) top window bar.
#

require_version('Gtk', '3.0')


TOP_BAR_HEIGHT = 44
HEADER_WIDTH = 100


class TopBar(Gtk.EventBox):
    def __init__(self, title, window_width=-1, has_buttons=True):

        Gtk.EventBox.__init__(self)

        self.has_buttons = has_buttons

        # Styling
        self.cssProvider = Gtk.CssProvider()

        top_bar_css = os.path.join(common_css_dir, 'top_bar.css')