2006-05-28 Dan Williams <dcbw@redhat.com>

Patch from Christian Persch <chpe@gnome.org>
	* configure.in
	  gnome/vpn-properties/nm-vpn-properties.c
	  	- (main): Fix option parsing.  Gnome.org #336847


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1778 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2006-05-28 21:30:33 +00:00
parent 2747ae8b75
commit dcf4fe30d8
3 changed files with 27 additions and 10 deletions

View file

@ -1,3 +1,10 @@
2006-05-28 Dan Williams <dcbw@redhat.com>
Patch from Christian Persch <chpe@gnome.org>
* configure.in
gnome/vpn-properties/nm-vpn-properties.c
- (main): Fix option parsing. Gnome.org #336847
2006-05-28 Dan Williams <dcbw@redhat.com>
* gnome/vpn-properties/nm-vpn-properties.c

View file

@ -215,6 +215,11 @@ if test x"$with_gnome" != xno; then
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
AC_SUBST(LIBGNOMEUI_CFLAGS) # is this even needed? it was typed incorrectly before
AC_SUBST(LIBGNOMEUI_LIBS)
PKG_CHECK_EXISTS([libgnome-2.0 >= 2.14.0],[have_libgnome_2_14=yes],[have_libgnome_2_14=no])
if test "$have_libgnome_2_14" = "yes"; then
AC_DEFINE([HAVE_LIBGNOME_2_14],[1],[Define if we have libgnome 2.14])
fi
fi
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`

View file

@ -39,7 +39,7 @@
#include <gtk/gtkwindow.h>
#include <glade/glade.h>
#include <gconf/gconf-client.h>
#include <glib/gi18n-lib.h>
#include <glib/gi18n.h>
#define NM_VPN_API_SUBJECT_TO_CHANGE
#include "nm-vpn-ui-interface.h"
@ -1082,13 +1082,12 @@ main (int argc, char *argv[])
int ret;
gboolean bad_opts;
gboolean do_import;
GError *error = NULL;
gchar *import_svc = NULL;
gchar *import_file = NULL;
GOptionEntry entries[] = {
{ "import-service", 's', 0, G_OPTION_ARG_STRING, &import_svc, "VPN Service for importing", NULL},
{ "import-file", 'f', 0, G_OPTION_ARG_STRING, &import_file, "File to import", NULL},
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
{ "import-service", 's', 0, G_OPTION_ARG_STRING, &import_svc, "VPN Service for importing", NULL},
{ "import-file", 'f', 0, G_OPTION_ARG_FILENAME, &import_file, "File to import", NULL},
{ NULL }
};
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
@ -1097,8 +1096,19 @@ main (int argc, char *argv[])
context = g_option_context_new ("- NetworkManager VPN properties");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
#ifdef HAVE_LIBGNOME_2_14
gnome_program_init ("nm-vpn-properties", VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PARAM_GOPTION_CONTEXT, context,
GNOME_PARAM_NONE);
#else
g_option_context_add_group (context, gtk_get_option_group (TRUE));
g_option_context_parse (context, &argc, &argv, &error);
g_option_context_free (context);
gnome_program_init ("nm-vpn-properties", VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PARAM_NONE, GNOME_PARAM_NONE);
#endif
bad_opts = FALSE;
do_import = FALSE;
@ -1116,11 +1126,6 @@ main (int argc, char *argv[])
goto out;
}
gnome_program_init ("nm-vpn-properties", VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PARAM_NONE, GNOME_PARAM_NONE);
glade_gnome_init ();
if (init_app () == FALSE) {
ret = EXIT_FAILURE;
goto out;