mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
2008-05-09 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c: Implement NMExportedConnection's 'update' and 'delete' and return error with descriptive message. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3648 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
0a230b98c1
commit
6ddd48f0f6
|
@ -1,3 +1,9 @@
|
||||||
|
2008-05-09 Tambet Ingo <tambet@gmail.com>
|
||||||
|
|
||||||
|
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c: Implement
|
||||||
|
NMExportedConnection's 'update' and 'delete' and return error with
|
||||||
|
descriptive message.
|
||||||
|
|
||||||
2008-05-08 Dan Williams <dcbw@redhat.com>
|
2008-05-08 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
Patch from Markus Becker <mab@comnets.uni-bremen.de>
|
Patch from Markus Becker <mab@comnets.uni-bremen.de>
|
||||||
|
|
|
@ -15,6 +15,7 @@ libnm_settings_plugin_ifcfg_suse_la_CPPFLAGS = \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
$(GMODULE_CFLAGS) \
|
$(GMODULE_CFLAGS) \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
|
$(POLKIT_CFLAGS) \
|
||||||
-DG_DISABLE_DEPRECATED \
|
-DG_DISABLE_DEPRECATED \
|
||||||
-I${top_srcdir}/system-settings/src \
|
-I${top_srcdir}/system-settings/src \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
|
@ -26,6 +27,7 @@ libnm_settings_plugin_ifcfg_suse_la_LDFLAGS = -module -avoid-version
|
||||||
libnm_settings_plugin_ifcfg_suse_la_LIBADD = \
|
libnm_settings_plugin_ifcfg_suse_la_LIBADD = \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
$(GMODULE_LIBS) \
|
$(GMODULE_LIBS) \
|
||||||
|
$(POLKIT_LIBS) \
|
||||||
$(GIO_LIBS) \
|
$(GIO_LIBS) \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm-util/libnm-util.la \
|
||||||
$(top_builddir)/libnm-glib/libnm_glib.la
|
$(top_builddir)/libnm-glib/libnm_glib.la
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <NetworkManager.h>
|
#include <NetworkManager.h>
|
||||||
#include "nm-suse-connection.h"
|
#include "nm-suse-connection.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
#include "nm-polkit-helpers.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (NMSuseConnection, nm_suse_connection, NM_TYPE_SYSCONFIG_CONNECTION)
|
G_DEFINE_TYPE (NMSuseConnection, nm_suse_connection, NM_TYPE_SYSCONFIG_CONNECTION)
|
||||||
|
|
||||||
|
@ -103,6 +104,26 @@ get_id (NMExportedConnection *exported)
|
||||||
return NM_SUSE_CONNECTION_GET_PRIVATE (exported)->filename;
|
return NM_SUSE_CONNECTION_GET_PRIVATE (exported)->filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
update (NMExportedConnection *exported,
|
||||||
|
GHashTable *new_settings,
|
||||||
|
GError **err)
|
||||||
|
{
|
||||||
|
g_set_error (err, NM_SYSCONFIG_SETTINGS_ERROR, NM_SYSCONFIG_SETTINGS_ERROR_GENERAL,
|
||||||
|
"%s", "Please use YaST to change this connection.");
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
delete (NMExportedConnection *exported, GError **err)
|
||||||
|
{
|
||||||
|
g_set_error (err, NM_SYSCONFIG_SETTINGS_ERROR, NM_SYSCONFIG_SETTINGS_ERROR_GENERAL,
|
||||||
|
"%s", "Please use YaST to remove this connection.");
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* GObject */
|
/* GObject */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -141,4 +162,6 @@ nm_suse_connection_class_init (NMSuseConnectionClass *suse_connection_class)
|
||||||
|
|
||||||
connection_class->get_settings = get_settings;
|
connection_class->get_settings = get_settings;
|
||||||
connection_class->get_id = get_id;
|
connection_class->get_id = get_id;
|
||||||
|
connection_class->update = update;
|
||||||
|
connection_class->delete = delete;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue