replaced deprecated g_strcasecmp()

This commit is contained in:
Martin Willi
2009-05-19 12:23:21 +02:00
parent 9e2d7f962f
commit f920bd1861
@@ -21,10 +21,8 @@
#include <config.h> #include <config.h>
#endif #endif
#include <errno.h> #include <glib.h>
#include <stdlib.h>
#include <glib/gi18n-lib.h> #include <glib/gi18n-lib.h>
#include <string.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glade/glade.h> #include <glade/glade.h>
@@ -175,7 +173,6 @@ init_plugin_ui (StrongswanPluginUiWidget *self, NMConnection *connection, GError
NMSettingVPN *settings; NMSettingVPN *settings;
GtkWidget *widget; GtkWidget *widget;
const char *value; const char *value;
gboolean active;
settings = NM_SETTING_VPN(nm_connection_get_setting(connection, NM_TYPE_SETTING_VPN)); settings = NM_SETTING_VPN(nm_connection_get_setting(connection, NM_TYPE_SETTING_VPN));
widget = glade_xml_get_widget (priv->xml, "address-entry"); widget = glade_xml_get_widget (priv->xml, "address-entry");
@@ -205,13 +202,13 @@ init_plugin_ui (StrongswanPluginUiWidget *self, NMConnection *connection, GError
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("EAP")); gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("EAP"));
value = nm_setting_vpn_get_data_item (settings, "method"); value = nm_setting_vpn_get_data_item (settings, "method");
if (value) { if (value) {
if (g_strcasecmp (value, "key") == 0) { if (g_strcmp0 (value, "key") == 0) {
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
} }
if (g_strcasecmp (value, "agent") == 0) { if (g_strcmp0 (value, "agent") == 0) {
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1);
} }
if (g_strcasecmp (value, "eap") == 0) { if (g_strcmp0 (value, "eap") == 0) {
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2);
} }
} }
@@ -285,11 +282,8 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
NMSettingVPN *settings; NMSettingVPN *settings;
GtkWidget *widget; GtkWidget *widget;
GValue *value;
gboolean active; gboolean active;
char *str; char *str;
GtkTreeModel *model;
GtkTreeIter iter;
if (!check_validity (self, error)) if (!check_validity (self, error))
return FALSE; return FALSE;