GNOME Bugzilla – Bug 588990
no way to know if the option as been passed when argument is optionnal
Last modified: 2009-07-19 03:08:23 UTC
There is no way to know if the option as been passed when argument is optionnal. Pending having bug 588989 not crash, I don't find any way to check of said option has been set. Glib::ustring search; Glib::OptionEntry entry; entry.set_long_name("search"); entry.set_flags(Glib::OptionEntry::FLAG_OPTIONAL_ARG); entry.set_description("Open the search all notes window with the search text."); options.add_entry(entry, search); In the above case, if --search is passed, "search" will be empty, like if --search was NOT passed.
Actually a dupe of the other *** This bug has been marked as a duplicate of 588989 ***