Added Glade gui builder file

This commit is contained in:
2018-02-21 18:51:23 +01:00
parent 0a3a0105fe
commit 0b63d4edc4
4 changed files with 406 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ class h2incGUI(Gtk.Window):
Gtk.Window.__init__(self)
self.set_title('Translate C-header files to Nasm include files!')
self.set_default_size(200, 200)
self.set_border_width(5)
self.set_border_width(10)
self.connect("destroy", Gtk.main_quit)
self.sourcedir = 'Select source directory!'
@@ -37,32 +37,37 @@ class h2incGUI(Gtk.Window):
self.maingrid.add(self.frame)
self.framegrid = Gtk.Grid()
self.framegrid.set_border_width(5)
self.frame.add(self.framegrid)
self.sourcebox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6)
self.framegrid.attach(self.sourcebox, 0, 0, 5, 1)
self.sourcelabel = Gtk.Label(label='Source: ')
self.framegrid.attach(self.sourcelabel, 1, 1, 1, 1)
self.sourcelabel.set_justify(Gtk.Justification.RIGHT)
self.sourcebox.add(self.sourcelabel)
self.sourceentry = Gtk.Entry()
self.sourceentry.set_text(self.sourcedir)
self.framegrid.attach(self.sourceentry, 2, 1, 1, 1)
self.sourcebox.add(self.sourceentry)
self.sourcedir_button = Gtk.Button(label="Source directory...")
#self.sourcedir_button.connect('clicked', self.select_sourcedir(self.sourcedir))
self.framegrid.attach(self.sourcedir_button, 3, 1, 1, 1)
self.sourcebox.add(self.sourcedir_button)
self.destbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6)
self.framegrid.attach(self.destbox, 1, 2, 1, 1)
self.framegrid.attach(self.destbox, 0, 1, 5, 1)
self.destlabel = Gtk.Label(label='Destination: ')
self.framegrid.attach(self.destlabel, 2, 2, 1, 1)
self.destbox.add(self.destlabel)
self.destentry = Gtk.Entry()
self.destentry.set_text(self.destdir)
#self.destbox.add(self.destentry)
self.destbox.add(self.destentry)
self.destdir_button = Gtk.Button(label="Destination directory...")
#self.destdir_button.connect('clicked', self.select_destdir(self.destdir))
#self.destbox.add(self.destdir_button)
self.destbox.add(self.destdir_button)
self.incchkbox = Gtk.CheckButton('Create "include" folder if it does not exist.')
self.incchkbox.set_active(False)