コード例 #1
0
ファイル: dlgs_linux.go プロジェクト: sqweek/dialog
func closeDialog(dlg *gtk.Dialog) {
	dlg.Destroy()
	/* The Destroy call itself isn't enough to remove the dialog from the screen; apparently
	** that happens once the GTK main loop processes some further events. But if we're
	** in a non-GTK app the main loop isn't running, so we empty the event queue before
	** returning from the dialog functions.
	** Not sure how this interacts with an actual GTK app... */
	for gtk.EventsPending() {
		gtk.MainIteration()
	}
}
コード例 #2
0
ファイル: find_and_replace.go プロジェクト: udhos/tabby
func fnr_close_and_report(dialog *gtk.Dialog, fnr_cnt int) {
	dialog.Destroy()
	bump_message(strconv.Itoa(fnr_cnt) + " replacements were done.")
}