You should use Gio.Application.set_option_context_parameter_string()
:
self.set_option_context_parameter_string("FILE")
I don’t think we have many examples, mainly because it’s rare to add arguments to applications. While Gio.Application
can be used for CLI tools, it’s mainly meant to be used as a way to write complete applications, likely with a GUI.