summaryrefslogtreecommitdiff
path: root/examples/options
Commit message (Collapse)AuthorAgeFilesLines
* OptionGroup: Add add_entry() that takes a slot with callback function.Kjell Ahlstedt2011-02-151-3/+91
| | | | | | | | | | | * glib/src/optiongroup.[hg|ccg]: Add add_entry() and add_entry_filename() that take a slot. Add protected option_arg_callback(). An exception thrown by on_pre_parse() or on_post_parse() is propagated to the error argument of g_callback_pre_parse() or post_parse_callback(). * glib/src/optionentry.hg: Add description of set_flags(). * examples/options/main.cc: Add more OptionEntries and callback functions for parsing command option values. Bug 589197 (Hubert Figuiere)
* Fix the make check build with --enable-warnings=fatal.Murray Cumming2011-02-081-3/+3
| | | | * examples/options/main.cc: Comment-out unused method parameters.
* OptionGroup: An on_post_parse() override need not call the base class.Kjell Ahlstedt2011-02-081-6/+7
| | | | | | | | * glib/src/optiongroup.[hg|ccg]: The C post_parse callback is a static protected member function, which performs all necessary post-parsing. OptionGroup::on_post_parse is a dummy function. * examples/options/main.cc: The on_pre_parse, on_post_parse, and on_error overrides don't call the base class functions. Bug 588988.
* Remove the reduced API options and code, as discussed on mailing list.Murray Cumming2010-05-311-9/+0
| | | | | | | | | * configure.ac: Removed the --enable-api-exceptions, --enable-api-properties, --enable-api-vfuncs and --enable-api-default-signal-handlers options. * build/reduced.m4: Removed. * tools/m4/*.m4: * tools/pm/Output.pm: Remove any use of ifdefs and auto_ptr for reduced API. * *.[hg|ccg|h|cc]: Remove the idefed code.
* Convert examples/ sub-tree to non-recursive buildDaniel Elstner2009-08-091-6/+0
| | | | | | | | | | | | * examples/Makefile.am: Rewrite to a non-recursive build of all example programs with a single control file. Hook the build of the example programs to the make check target. * examples/Makefile.am_fragment: Delete obsolete file. * examples/*/Makefile.am: Delete obsolete files. * examples/README: Delete file, as it was empty anyway apart from a single whitespace character. * configure.ac (AC_CONFIG_FILES): Remove examples/*/Makefile output files from the list.
* Change license header to mention Lesser General Public License version 2.1Deng Xiyue2009-01-191-4/+4
| | | | | | | | | | 2009-01-20 Deng Xiyue <manphiz@gmail.com> * Change license header to mention Lesser General Public License version 2.1 instead of Library General Public License, to be consistent with COPYING. svn path=/trunk/; revision=779
* set_long_name(): Do not use NULL for an empty string, because has aMurray Cumming2008-04-131-1/+16
| | | | | | | | | | | | | | 2008-04-13 Murray Cumming <murrayc@murrayc.com> * glib/src/optionentry.ccg: set_long_name(): Do not use NULL for an empty string, because has a special meaning to GOptionEntry - it is the definition of G_OPTION_REMANING. * examples/options/main.cc: Add an entry with the long name G_OPTION_REMAINING, to list additional non-named arguments. More explicit API should be added for this. Bug #526831 (Christian Lundgren). svn path=/trunk/; revision=653
* Use a default value, to show that it can be done. (This change, fromMurray Cumming2007-02-101-0/+5
| | | | | | | | | | | | | | | | | | 2007-02-10 Murray Cumming <murrayc@murrayc.com> * examples/options/main.cc: Use a default value, to show that it can be done. (This change, from 2006-03-30 was restored after being accidentally lost on Apr 12 2006) 2007-02-10 Armin Burgmeier <armin@arbur.net> * glib/src/optiongroup.ccg: default_c_arg(): Set the initial value of the C argument to the value the C++ argument has, to avoid that glibmm resets arguments to zero that were not given on the command line. (This change, from 2006-03-30 was restored after being accidentally lost on Apr 12 2006) svn path=/trunk/; revision=378
* Remove .cvsignore files.Daniel Elstner2007-01-201-5/+0
| | | | svn path=/trunk/; revision=367
* Merged changes from glibmm-2-10 branch.Murray Cumming2006-05-121-0/+9
|
* Copy constructor: Copy the short name form the src, not from itself. BugMurray Cumming2005-01-091-1/+0
| | | | | | | 2005-01-09 Murray Cumming <murrayc@murrayc.com> * glib/src/optionentry.ccg: Copy constructor: Copy the short name form the src, not from itself. Bug #16331 from Daniel Holbach.
* Add add_entry(entry, bool&), to wrap use of G_OPTION_ARG_NONE. Bug #163325Murray Cumming2005-01-091-5/+13
| | | | | | | | 2005-01-09 Murray Cumming <murrayc@murrayc.com> * glib/src/optionentry.[hg|cc]: Add add_entry(entry, bool&), to wrap use of G_OPTION_ARG_NONE. Bug #163325 from Daniel Holbach. * examples/options/main.cc: Use the new add_entry() overload.
* Added add_entry() for vector<ustring> and add_entry_filename() forMurray Cumming2004-11-011-11/+25
| | | | | | | | 2004-11-01 Murray Cumming <murrayc@murrayc.com> * glib/src/optiongroup.[hg|ccg]: Added add_entry() for vector<ustring> and add_entry_filename() for std::string and vector<std::string>. * examples/options/main.cc: Test these new methods.
* Remove accessors for arg and arg_data. add_entry(): Remove arg_typeMurray Cumming2004-10-261-15/+33
| | | | | | | | | | | | 2004-10-26 Murray Cumming <murrayc@murrayc.com> * glib/src/optionentry.hg: Remove accessors for arg and arg_data. * glib/src/optiongroup.[hg|ccg]: add_entry(): Remove arg_type parameter and instead add overrides which take specific C++ value types. Add CppOptionEntry inner class to hold information about each entry and its dynamically allocated C value. Add map_entries_ map to store them, so we can iterate over them during post_parse.
* add_entry(): Fixed crash by creating a temporary array, with a nulled lastMurray Cumming2004-10-171-3/+5
| | | | | | | | | | | | 2004-10-17 Murray Cumming <murrayc@murrayc.com> * glib/src/optioncontext.[hg|ccg]: add_entry(): Fixed crash by creating a temporary array, with a nulled last item, which is what the C function wants. In callbacks, ignore the group parameter because our option group in the data parameter is the same, and does not require construction of a second C++ wrapper instance for the same C instance. * glib/src/optiongroup.[hg|ccg]: Removed the cast constructor, because it is not needed anymore, and there is no clear way to implement it.
* Rethought the structure now that I see how the parts work together.Murray Cumming2004-10-101-10/+55
| | | | | | | | | | | | 2004-10-01 Murray Cumming <murrayc@murrayc.com> * glib/src/option*.[hg|ccg], examples/options/main.cc: Rethought the structure now that I see how the parts work together. Rearranged the example to show how the parsing can fill values in member variables of a derived OptionGroup class. However, 1. it crashes now, 2. we need extra code to map the GOption C types to suitable C++ types, probably by doing pre and post parsing to create temporary C types for the C++ types.
* Wrapped more methods, but I have still not finished. Started an example.Murray Cumming2004-09-273-0/+57
2004-09-27 Murray Cumming <murrayc@murrayc.com> * glib/src/option*.[hg|ccg]: Wrapped more methods, but I have still not finished. * examples/options/: Started an example.