mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 23:20:34 +01:00
tui: fix setting Clone MAC Address properties
NmtMacEntry wasn't notifying its mac-address property when it changed, so the change never got saved to the NMSetting. https://bugzilla.gnome.org/show_bug.cgi?id=731160
This commit is contained in:
parent
92898e84d6
commit
5ee85fe46e
1 changed files with 14 additions and 0 deletions
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <dbus/dbus-glib.h>
|
||||
#include <nm-utils.h>
|
||||
|
||||
|
|
@ -128,6 +130,17 @@ nmt_mac_entry_init (NmtMacEntry *entry)
|
|||
nmt_newt_entry_set_validator (NMT_NEWT_ENTRY (entry), mac_validator, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
nmt_mac_entry_notify (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
if (G_OBJECT_CLASS (nmt_mac_entry_parent_class)->notify)
|
||||
G_OBJECT_CLASS (nmt_mac_entry_parent_class)->notify (object, pspec);
|
||||
|
||||
if (pspec->owner_type == NMT_TYPE_NEWT_ENTRY && !strcmp (pspec->name, "text"))
|
||||
g_object_notify (object, "mac-address");
|
||||
}
|
||||
|
||||
static void
|
||||
nmt_mac_entry_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
|
|
@ -189,6 +202,7 @@ nmt_mac_entry_class_init (NmtMacEntryClass *entry_class)
|
|||
g_type_class_add_private (entry_class, sizeof (NmtMacEntryPrivate));
|
||||
|
||||
/* virtual methods */
|
||||
object_class->notify = nmt_mac_entry_notify;
|
||||
object_class->set_property = nmt_mac_entry_set_property;
|
||||
object_class->get_property = nmt_mac_entry_get_property;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue