Package: gio
Function g-application-add-option-group
Lambda Listg-application-add-option-group (application group) ArgumentsDetails Adds a g-option-group instance to the command line handling of the
application. This function is comparable to the g-option-context-add-group function. Unlike the g-application-add-main-option-entries function, this function does not deal with nil for the arg-data field and never transmits options to the primary instance. The reason for that is because, by the time the options arrive at the primary instance, it is typically too late to do anything with them. Taking the GTK option group as an example: GTK will already have been initialised by the time the "command-line" signal handler runs. In the case that this is not the first-running instance of the application, the existing instance may already have been running for a very long time. This means that the options from the g-option-group instance are only really usable in the case that the instance of the application being run is the first instance. Passing options like --display= or --gdk-debug= on future runs will have no effect on the existing primary instance. Calling this function will cause the options in the supplied option group to be parsed, but it does not cause you to be "opted in" to the new functionality whereby unrecognised options are rejected even if the :handles-command-line flag was given. | See also |
2021-9-9