Exemplo n.º 1
0
func (w *Window) msgBoxError(primarytext string, secondarytext string) (done chan struct{}) {
	done = make(chan struct{})
	go func() {
		<-_msgBox(w, primarytext, secondarytext, C.GtkMessageType(C.GTK_MESSAGE_ERROR), C.GtkButtonsType(C.GTK_BUTTONS_OK))
		done <- struct{}{}
	}()
	return done
}
Exemplo n.º 2
0
	BUILDER_ERROR_DUPLICATE_ID           = C.GtkBuilderError(C.GTK_BUILDER_ERROR_DUPLICATE_ID)
	BUILDER_ERROR_OBJECT_TYPE_REFUSED    = C.GtkBuilderError(C.GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED)
	BUILDER_ERROR_TEMPLATE_MISMATCH      = C.GtkBuilderError(C.GTK_BUILDER_ERROR_TEMPLATE_MISMATCH)
	BUILDER_ERROR_INVALID_PROPERTY       = C.GtkBuilderError(C.GTK_BUILDER_ERROR_INVALID_PROPERTY)
	BUILDER_ERROR_INVALID_SIGNAL         = C.GtkBuilderError(C.GTK_BUILDER_ERROR_INVALID_SIGNAL)

	// ButtonBoxStyle
	BUTTONBOX_SPREAD = C.GtkButtonBoxStyle(C.GTK_BUTTONBOX_SPREAD)
	BUTTONBOX_EDGE   = C.GtkButtonBoxStyle(C.GTK_BUTTONBOX_EDGE)
	BUTTONBOX_START  = C.GtkButtonBoxStyle(C.GTK_BUTTONBOX_START)
	BUTTONBOX_END    = C.GtkButtonBoxStyle(C.GTK_BUTTONBOX_END)
	BUTTONBOX_CENTER = C.GtkButtonBoxStyle(C.GTK_BUTTONBOX_CENTER)
	BUTTONBOX_EXPAND = C.GtkButtonBoxStyle(C.GTK_BUTTONBOX_EXPAND)

	// ButtonsType
	BUTTONS_NONE      = C.GtkButtonsType(C.GTK_BUTTONS_NONE)
	BUTTONS_OK        = C.GtkButtonsType(C.GTK_BUTTONS_OK)
	BUTTONS_CLOSE     = C.GtkButtonsType(C.GTK_BUTTONS_CLOSE)
	BUTTONS_CANCEL    = C.GtkButtonsType(C.GTK_BUTTONS_CANCEL)
	BUTTONS_YES_NO    = C.GtkButtonsType(C.GTK_BUTTONS_YES_NO)
	BUTTONS_OK_CANCEL = C.GtkButtonsType(C.GTK_BUTTONS_OK_CANCEL)

	// CellRendererAccelMode
	CELL_RENDERER_ACCEL_MODE_GTK   = C.GtkCellRendererAccelMode(C.GTK_CELL_RENDERER_ACCEL_MODE_GTK)
	CELL_RENDERER_ACCEL_MODE_OTHER = C.GtkCellRendererAccelMode(C.GTK_CELL_RENDERER_ACCEL_MODE_OTHER)

	// CellRendererMode
	CELL_RENDERER_MODE_INERT       = C.GtkCellRendererMode(C.GTK_CELL_RENDERER_MODE_INERT)
	CELL_RENDERER_MODE_ACTIVATABLE = C.GtkCellRendererMode(C.GTK_CELL_RENDERER_MODE_ACTIVATABLE)
	CELL_RENDERER_MODE_EDITABLE    = C.GtkCellRendererMode(C.GTK_CELL_RENDERER_MODE_EDITABLE)
Exemplo n.º 3
0
func msgBoxError(parent *Window, primarytext string, secondarytext string) {
	_msgBox(parent, primarytext, secondarytext, C.GtkMessageType(C.GTK_MESSAGE_ERROR), C.GtkButtonsType(C.GTK_BUTTONS_OK))
}