network-manager-openvpn r7 - in trunk: . auth-dialog
- From: mbiebl svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-openvpn r7 - in trunk: . auth-dialog
- Date: Fri, 19 Dec 2008 15:24:12 +0000 (UTC)
Author: mbiebl
Date: Fri Dec 19 15:24:12 2008
New Revision: 7
URL: http://svn.gnome.org/viewvc/network-manager-openvpn?rev=7&view=rev
Log:
Remove libgnomeui dependency. Use plain gtk/gconf.
Modified:
trunk/auth-dialog/Makefile.am
trunk/auth-dialog/main.c
trunk/configure.in
Modified: trunk/auth-dialog/Makefile.am
==============================================================================
--- trunk/auth-dialog/Makefile.am (original)
+++ trunk/auth-dialog/Makefile.am Fri Dec 19 15:24:12 2008
@@ -3,7 +3,7 @@
nm_openvpn_auth_dialog_CPPFLAGS = \
$(GTHREAD_CFLAGS) \
$(GTK_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
+ $(GCONF_CFLAGS) \
$(NETWORK_MANAGER_CFLAGS) \
$(GNOMEKEYRING_CFLAGS) \
-I$(top_srcdir)/
@@ -26,7 +26,7 @@
nm_openvpn_auth_dialog_LDADD = \
$(GTK_LIBS) \
- $(LIBGNOMEUI_LIBS) \
+ $(GCONF_LIBS) \
$(top_builddir)/common-gnome/libnm-openvpn-common-gnome.la \
$(NULL)
Modified: trunk/auth-dialog/main.c
==============================================================================
--- trunk/auth-dialog/main.c (original)
+++ trunk/auth-dialog/main.c Fri Dec 19 15:24:12 2008
@@ -27,9 +27,9 @@
#endif
#include <string.h>
+#include <stdlib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <libgnomeui/libgnomeui.h>
#include <gconf/gconf-client.h>
#include <gnome-keyring.h>
#include <nm-setting-vpn.h>
@@ -317,9 +317,8 @@
gchar *vpn_uuid = NULL;
gchar *vpn_service = NULL;
char buf[1];
- int ret, exit_status = 1;
+ int ret;
GOptionContext *context;
- GnomeProgram *program;
GOptionEntry entries[] = {
{ "reprompt", 'r', 0, G_OPTION_ARG_NONE, &retry, "Reprompt for passwords", NULL},
{ "uuid", 'u', 0, G_OPTION_ARG_STRING, &vpn_uuid, "UUID of VPN connection", NULL},
@@ -332,23 +331,21 @@
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+ gtk_init (&argc, &argv);
+
context = g_option_context_new ("- openvpn auth dialog");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
-
- program = gnome_program_init ("nm-openvpn-auth-dialog", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PARAM_NONE);
+ g_option_context_parse (context, &argc, &argv, NULL);
+ g_option_context_free (context);
if (vpn_uuid == NULL || vpn_name == NULL || vpn_service == NULL) {
fprintf (stderr, "Have to supply ID, name, and service\n");
- goto out;
+ return EXIT_FAILURE;
}
if (strcmp (vpn_service, NM_DBUS_SERVICE_OPENVPN) != 0) {
fprintf (stderr, "This dialog only works with the '%s' service\n", NM_DBUS_SERVICE_OPENVPN);
- goto out;
+ return EXIT_FAILURE;
}
memset (&info, 0, sizeof (PasswordsInfo));
@@ -357,14 +354,12 @@
if (!get_password_types (&info)) {
fprintf (stderr, "Invalid connection");
- goto out;
+ return EXIT_FAILURE;
}
- exit_status = 0;
-
if (!info.need_password && !info.need_certpass) {
printf ("%s\n%s\n\n\n", NM_OPENVPN_KEY_NOSECRET, "true");
- goto out;
+ return EXIT_SUCCESS;
}
if (get_secrets (&info, retry)) {
@@ -383,8 +378,6 @@
/* wait for data on stdin */
ret = fread (buf, sizeof (char), sizeof (buf), stdin);
- out:
- g_object_unref (program);
- return exit_status;
+ return EXIT_SUCCESS;
}
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Dec 19 15:24:12 2008
@@ -73,10 +73,6 @@
AC_SUBST(GLADE_CFLAGS)
AC_SUBST(GLADE_LIBS)
- PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
- AC_SUBST(LIBGNOMEUI_CFLAGS)
- AC_SUBST(LIBGNOMEUI_LIBS)
-
PKG_CHECK_MODULES(GCONF, gconf-2.0)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]