7

I am displaying a UI in a rust based application using gtk3. I am parsing the arguments in the main method for a --config argument in order to find a custom configuration file. The gtk::Application object also does some command line processing and is complaining of

Unknown option --config

How do I prevent gtk from processing the command line or exclude config from gtk command line processing?

ferd tomale
  • 845
  • 7
  • 20
  • Same question here. It's an annoyance for Rust applications because it's customary to use `clap` instead. – cyqsimon Oct 24 '21 at 19:11

1 Answers1

6

gtk::Application has both a run and run_with_args command (src). If you pass an empty array into run_with_args then gtk won't have any arguments to complain about and you can parse them yourself however you like.

loremdipso
  • 398
  • 3
  • 8