Commit 5ee85fe4 authored by Dan Winship's avatar Dan Winship Committed by Jiří Klimeš

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.
parent 92898e84
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment