diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-15 01:45:32 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-15 01:45:32 +0100 |
commit | 905e69b74fe6e822e0d00245e2c210e9aadb6437 (patch) | |
tree | a41c2e3c248c81306ac5ab2b2d583e2b5efeb341 /main.cpp | |
parent | 8c264612fd7056e1d47dedc2a245e4deb83cc552 (diff) | |
download | sciteco-905e69b74fe6e822e0d00245e2c210e9aadb6437.tar.gz |
make it possible for interface classes to define a get_options() method to add an options group to the help menu
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -28,15 +28,20 @@ process_options(int &argc, char **&argv) {NULL} }; - GOptionContext *options; + GOptionContext *options; + GOptionGroup *interface_group = interface.get_options(); options = g_option_context_new("- Advanced interactive TECO"); + g_option_context_add_main_entries(options, option_entries, NULL); - g_option_context_add_group(options, gtk_get_option_group(TRUE)); + if (interface_group) + g_option_context_add_group(options, interface_group); + if (!g_option_context_parse(options, &argc, &argv, NULL)) { g_printf("Option parsing failed!\n"); exit(EXIT_FAILURE); } + g_option_context_free(options); if (mung_file) { |