# Path: fstimer/gui/util_classes.py
# class GtkStockButton(Gtk.Button):
#     
#     def __init__(self, icon_name, label_text):
#         #Init a regular Gtk.Button
#         Gtk.Button.__init__(self)
#         #Add the icon and the label.
#         fname = os.path.join(icon_path, icon_files[icon_name])
#         btnIcon = Gtk.Image.new_from_file(fname)
#         btnLabel = Gtk.Label(label_text+' ')
#         #pack 'em into an HBox
#         btnHbox = Gtk.HBox(False, 0)
#         btnHbox.pack_start(btnIcon, False, False, 0)
#         btnHbox.pack_start(btnLabel, True, True, 0)
#         self.add(btnHbox)
#         return


import gi
import fstimer.gui
import os
from gi.repository import Gtk
from fstimer.gui.util_classes import GtkStockButton
        compregsw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
        self.reglist = Gtk.ListStore(str)
        self.comptreeview = Gtk.TreeView()
        rendererText = Gtk.CellRendererText()
        column = Gtk.TreeViewColumn('Registration files', rendererText, text=0)
        column.set_sort_column_id(0)
        self.comptreeview.append_column(column)
        self.comptreeview.set_model(self.reglist)
        compregsw.add(self.comptreeview)
        # We have text below the window to explain what is happening during merging
        self.comblabel = []
        for i in range(3):
            label = Gtk.Label(label='')
            label.set_alignment(0, 0.5)
            self.comblabel.append(label)
        # Pack it all
        regvbox1 = Gtk.VBox(False, 8)
        regvbox1.pack_start(Gtk.Label('Select all of the registration files to compile', True, True, 0), False, False, 0)
        regvbox1.pack_start(compregsw, True, True, 0)
        for i in range(3):
            regvbox1.pack_start(self.comblabel[i], False, False, 0)
        vbox1align = Gtk.Alignment.new(0, 0, 1, 1)
        vbox1align.add(regvbox1)
        # The buttons in a table
        regtable = Gtk.Table(2, 1, False)
        regtable.set_row_spacings(5)
        regtable.set_col_spacings(5)
        regtable.set_border_width(5)
        btnREMOVE = GtkStockButton('remove','Remove')
        btnREMOVE.connect('clicked', self.rm_clicked)

# Path: fstimer/gui/util_classes.py
# class GtkStockButton(Gtk.Button):
#     
#     def __init__(self, icon_name, label_text):
#         #Init a regular Gtk.Button
#         Gtk.Button.__init__(self)
#         #Add the icon and the label.
#         fname = os.path.join(icon_path, icon_files[icon_name])
#         btnIcon = Gtk.Image.new_from_file(fname)
#         btnLabel = Gtk.Label(label_text+' ')
#         #pack 'em into an HBox
#         btnHbox = Gtk.HBox(False, 0)
#         btnHbox.pack_start(btnIcon, False, False, 0)
#         btnHbox.pack_start(btnLabel, True, True, 0)
#         self.add(btnHbox)
#         return


# Path: fstimer/gui/compile.py
import gi
import fstimer.gui
import os
from gi.repository import Gtk
from fstimer.gui.util_classes import GtkStockButton

        compregsw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
        self.reglist = Gtk.ListStore(str)
        self.comptreeview = Gtk.TreeView()
        rendererText = Gtk.CellRendererText()
        column = Gtk.TreeViewColumn('Registration files', rendererText, text=0)
        column.set_sort_column_id(0)
        self.comptreeview.append_column(column)
        self.comptreeview.set_model(self.reglist)
        compregsw.add(self.comptreeview)
        # We have text below the window to explain what is happening during merging
        self.comblabel = []
        for i in range(3):
            label = Gtk.Label(label='')
            label.set_alignment(0, 0.5)
            self.comblabel.append(label)
        # Pack it all
        regvbox1 = Gtk.VBox(False, 8)
        regvbox1.pack_start(Gtk.Label('Select all of the registration files to compile', True, True, 0), False, False, 0)
        regvbox1.pack_start(compregsw, True, True, 0)
        for i in range(3):
            regvbox1.pack_start(self.comblabel[i], False, False, 0)
        vbox1align = Gtk.Alignment.new(0, 0, 1, 1)
        vbox1align.add(regvbox1)
        # The buttons in a table
        regtable = Gtk.Table(2, 1, False)
        regtable.set_row_spacings(5)
        regtable.set_col_spacings(5)
        regtable.set_border_width(5)
        btnREMOVE = GtkStockButton('remove','Remove')
        btnREMOVE.connect('clicked', self.rm_clicked)

        btnADD = GtkStockButton('add','Add')