network-manager-pptp r12 - in branches/NETWORKMANAGER_0_7: . auth-dialog
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-pptp r12 - in branches/NETWORKMANAGER_0_7: . auth-dialog
- Date: Sat, 20 Dec 2008 14:06:19 +0000 (UTC)
Author: dcbw
Date: Sat Dec 20 14:06:18 2008
New Revision: 12
URL: http://svn.gnome.org/viewvc/network-manager-pptp?rev=12&view=rev
Log:
Remove libgnomeui dependency. Use plain gtk/gconf. (mbiebl)
Modified:
branches/NETWORKMANAGER_0_7/auth-dialog/Makefile.am
branches/NETWORKMANAGER_0_7/auth-dialog/main.c
branches/NETWORKMANAGER_0_7/configure.in
Modified: branches/NETWORKMANAGER_0_7/auth-dialog/Makefile.am
==============================================================================
--- branches/NETWORKMANAGER_0_7/auth-dialog/Makefile.am (original)
+++ branches/NETWORKMANAGER_0_7/auth-dialog/Makefile.am Sat Dec 20 14:06:18 2008
@@ -6,7 +6,7 @@
$(NM_UTILS_CFLAGS) \
$(GTHREAD_CFLAGS) \
$(GTK_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
+ $(GCONF_CFLAGS) \
$(GNOMEKEYRING_CFLAGS) \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DGLADEDIR=\""$(gladedir)"\" \
@@ -27,7 +27,7 @@
nm_pptp_auth_dialog_LDADD = \
$(GTK_LIBS) \
- $(LIBGNOMEUI_LIBS) \
+ $(GCONF_LIBS) \
$(top_builddir)/common-gnome/libnm-pptp-common-gnome.la \
$(NULL)
Modified: branches/NETWORKMANAGER_0_7/auth-dialog/main.c
==============================================================================
--- branches/NETWORKMANAGER_0_7/auth-dialog/main.c (original)
+++ branches/NETWORKMANAGER_0_7/auth-dialog/main.c Sat Dec 20 14:06:18 2008
@@ -25,9 +25,9 @@
#endif
#include <string.h>
+#include <stdlib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <libgnomeui/libgnomeui.h>
#include <nm-setting-vpn.h>
@@ -128,9 +128,8 @@
gchar *vpn_service = NULL;
char *password = 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},
@@ -143,27 +142,26 @@
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+ gtk_init (&argc, &argv);
+
context = g_option_context_new ("- pptp auth dialog");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+ g_option_context_parse (context, &argc, &argv, NULL);
+ g_option_context_free (context);
- program = gnome_program_init ("nm-pptp-auth-dialog", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PARAM_NONE);
if (vpn_uuid == NULL || vpn_name == NULL || vpn_service == NULL) {
fprintf (stderr, "Have to supply UUID, name, and service\n");
- goto out;
+ return EXIT_FAILURE;
}
if (strcmp (vpn_service, NM_DBUS_SERVICE_PPTP) != 0) {
fprintf (stderr, "This dialog only works with the '%s' service\n", NM_DBUS_SERVICE_PPTP);
- goto out;
+ return EXIT_FAILURE;
}
if (!get_secrets (vpn_uuid, vpn_name, vpn_service, retry, &password))
- goto out;
+ return EXIT_FAILURE;
/* dump the passwords to stdout */
printf ("%s\n%s\n", NM_PPTP_KEY_PASSWORD, password);
@@ -173,7 +171,6 @@
memset (password, 0, strlen (password));
gnome_keyring_memory_free (password);
}
- exit_status = 0;
/* for good measure, flush stdout since Kansas is going Bye-Bye */
fflush (stdout);
@@ -181,7 +178,5 @@
/* 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: branches/NETWORKMANAGER_0_7/configure.in
==============================================================================
--- branches/NETWORKMANAGER_0_7/configure.in (original)
+++ branches/NETWORKMANAGER_0_7/configure.in Sat Dec 20 14:06:18 2008
@@ -85,10 +85,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]