# 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
from gi.repository import Gtk
from fstimer.gui.util_classes import GtkStockButton
        hbox1 = Gtk.HBox(False, 10)
        hbox1.pack_start(label1, False, False, 0)
        hbox1.pack_start(self.entryid, False, False, 0)
        label2 = Gtk.Label(label='Time:')
        self.entrytime = Gtk.Entry()
        self.entrytime.set_max_length(25)
        self.entrytime.set_text(old_time)
        hbox2 = Gtk.HBox(False, 10)
        hbox2.pack_start(label2, False, False, 0)
        hbox2.pack_start(self.entrytime, False, False, 0)
        btnOK = GtkStockButton('ok',"OK")
        btnOK.connect('clicked', self.winedittimeOK)
        btnCANCEL = GtkStockButton('close',"Cancel")
        btnCANCEL.connect('clicked', lambda b: self.hide())
        cancel_algn = Gtk.Alignment.new(0, 0, 0, 0)
        cancel_algn.add(btnCANCEL)
        hbox3 = Gtk.HBox(False, 10)
        hbox3.pack_start(cancel_algn, True, True, 0)
        hbox3.pack_start(btnOK, False, False, 0)
        vbox = Gtk.VBox(False, 10)
        vbox.pack_start(label0, False, False, 10)
        vbox.pack_start(hbox1, False, False, 0)
        vbox.pack_start(hbox2, False, False, 0)
        vbox.pack_start(hbox3, False, False, 0)
        self.add(vbox)
        self.show_all()

    def winedittimeOK(self, jnk_unused):
        '''Handles click on OK button
           Stores times that have been modified'''

# 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/edittime.py
import gi
import fstimer.gui
from gi.repository import Gtk
from fstimer.gui.util_classes import GtkStockButton

        hbox1 = Gtk.HBox(False, 10)
        hbox1.pack_start(label1, False, False, 0)
        hbox1.pack_start(self.entryid, False, False, 0)
        label2 = Gtk.Label(label='Time:')
        self.entrytime = Gtk.Entry()
        self.entrytime.set_max_length(25)
        self.entrytime.set_text(old_time)
        hbox2 = Gtk.HBox(False, 10)
        hbox2.pack_start(label2, False, False, 0)
        hbox2.pack_start(self.entrytime, False, False, 0)
        btnOK = GtkStockButton('ok',"OK")
        btnOK.connect('clicked', self.winedittimeOK)
        btnCANCEL = GtkStockButton('close',"Cancel")
        btnCANCEL.connect('clicked', lambda b: self.hide())
        cancel_algn = Gtk.Alignment.new(0, 0, 0, 0)
        cancel_algn.add(btnCANCEL)
        hbox3 = Gtk.HBox(False, 10)
        hbox3.pack_start(cancel_algn, True, True, 0)
        hbox3.pack_start(btnOK, False, False, 0)
        vbox = Gtk.VBox(False, 10)
        vbox.pack_start(label0, False, False, 10)
        vbox.pack_start(hbox1, False, False, 0)
        vbox.pack_start(hbox2, False, False, 0)
        vbox.pack_start(hbox3, False, False, 0)
        self.add(vbox)
        self.show_all()

    def winedittimeOK(self, jnk_unused):
        '''Handles click on OK button
           Stores times that have been modified'''

        new_id = self.entryid.get_text()