Remove popt references

- popt has been replaced with the GOption infrastructure.
So there's no need to include the popt.h file.
- Also rewritten the comment that was elaborating on popt
vs GOption
- Finally removed the loglevel option (which was excluded from
the compile anyway) that still referred to popt.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18726 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2010-02-24 20:51:15 +00:00
parent 13e0eef469
commit c299f2444b

View File

@ -25,7 +25,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <popt.h>
#include <libguile.h> #include <libguile.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
@ -197,21 +196,7 @@ load_user_config(void)
try_load_config_array(stylesheet_files); try_load_config_array(stylesheet_files);
} }
/* Note: Command-line argument parsing for Gtk+ applications has /* Parse command line options, using GOption interface */
* evolved. Gtk+-2.4 and before use the "popt" method. We use that
* here for compatibility. Gnome-2.4 has a way of wrapping the "popt"
* method (using GNOME_PARAM_POPT_CONTEXT). Its advantages are that
* it adds help messages for sound and the crash-dialog. Its
* disadvantages are that it prints a rather messy usage message
* with lots of '?v's and it doesn't allow us to describe the
* [DATAFILE] argument in the usage. Weighing those factors, we're
* just going to use popt directly.
*
* Glib-2.6 introduced GOptionContext and GOptionGroup, which are
* meant to replace popt usage. In Gnome-2.14, the popt usage is
* offically deprecated, and the GNOME_PARAM_GOPTION_CONTEXT can be
* used.
*/
static void static void
gnucash_command_line(int *argc, char **argv) gnucash_command_line(int *argc, char **argv)
@ -250,17 +235,6 @@ gnucash_command_line(int *argc, char **argv)
NULL NULL
}, },
#if 0
{
"loglevel", '\0', 0, G_OPTION_ARG_INT, &loglevel,
/* Translators: This is the command line option autohelp text; see popt(3) */
_("Set the logging level from 0 (least) to 6 (most)"),
/* Translators: Argument description for autohelp; see
http://developer.gnome.org/doc/API/2.0/glib/glib-Commandline-option-parser.html */
_("LOGLEVEL")
},
#endif // 0
{ {
"nofile", '\0', 0, G_OPTION_ARG_NONE, &nofile, "nofile", '\0', 0, G_OPTION_ARG_NONE, &nofile,
_("Do not load the last file opened"), NULL _("Do not load the last file opened"), NULL