}
} */
+func setLineText(fieldname string, buf string) {
+ obj, err := ui.GetObject(fieldname)
+ if err != nil {
+ return
+ }
+ field, ok := obj.(*gtk.Entry)
+ if !ok {
+ return
+ }
+ field.SetText(buf)
+}
+
func getLineText(fieldname string) (string, error) {
obj, err := ui.GetObject(fieldname)
if err != nil {
return wnd, nil
}
-func LoadMain() {
+func loadMain() {
gtk.Init(nil)
var err error
ui, err = gtk.BuilderNew()
edustore.SetValue(iter, 1, ed.Institution)
edustore.SetValue(iter, 2, ed.YearOfPassing)
edustore.SetValue(iter, 3, ed.GradeOrPercentage)
+
+ setLineText("QualificationTitle", "")
+ setLineText("InstitutionName", "")
+ setLineText("YearPassing", "")
+ setLineText("GradeOrPercentag", "")
}
func saveButtonClicked() {
}
func main() {
- LoadMain()
+ loadMain()
}