Resolved command-line handling in the GTK+ backend by not doing it and documenting that we don't do it.
This commit is contained in:
parent
74c851754c
commit
f170780324
|
@ -35,7 +35,7 @@ func gtk_init() error {
|
|||
var err *C.GError = nil // redundant in Go, but let's explicitly assign it anyway
|
||||
|
||||
// gtk_init_with_args() gives us error info (thanks chpe in irc.gimp.net/#gtk+)
|
||||
// TODO allow GTK+ standard command-line argument processing?
|
||||
// don't worry about GTK+'s command-line arguments; they're also available as environment variables (thanks mclasen in irc.gimp.net/#gtk+)
|
||||
result := C.gtk_init_with_args(nil, nil, nil, nil, nil, &err)
|
||||
if result == C.FALSE {
|
||||
return fmt.Errorf("error actually initilaizing GTK+: %s", fromgstr(err.message))
|
||||
|
|
3
init.go
3
init.go
|
@ -10,6 +10,9 @@ package ui
|
|||
// It is not safe to call ui.Go() in a goroutine. It must be called directly from main().
|
||||
//
|
||||
// This model is undesirable, but Cocoa limitations require it.
|
||||
//
|
||||
// Go does not process the command line for flags (that is, it does not call flag.Parse()), nor does package ui add any of the underlying toolkit's supported command-line flags.
|
||||
// If you must, and if the toolkit also has environment variable equivalents to these flags (for instance, GTK+), use those instead.
|
||||
func Go(main func()) error {
|
||||
return ui(main)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue