network: Remove net_object_emit_changed
Turns out nothing was actually listening to it.
This commit is contained in:
parent
a39ebd5bda
commit
7e84af0d6d
7 changed files with 5 additions and 64 deletions
|
@ -103,13 +103,6 @@ nm_device_bluetooth_refresh_ui (NetDeviceBluetooth *self)
|
|||
gtk_widget_set_visible (GTK_WIDGET (self->options_button), state != NM_DEVICE_STATE_UNMANAGED && g_find_program_in_path ("nm-connection-editor") != NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
device_state_changed_cb (NetDeviceBluetooth *self)
|
||||
{
|
||||
net_object_emit_changed (NET_OBJECT (self));
|
||||
nm_device_bluetooth_refresh_ui (self);
|
||||
}
|
||||
|
||||
static void
|
||||
device_off_toggled (NetDeviceBluetooth *self)
|
||||
{
|
||||
|
@ -222,7 +215,7 @@ net_device_bluetooth_new (NMClient *client, NMDevice *device)
|
|||
self->client = g_object_ref (client);
|
||||
self->device = g_object_ref (device);
|
||||
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (device_state_changed_cb), self, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (nm_device_bluetooth_refresh_ui), self, G_CONNECT_SWAPPED);
|
||||
|
||||
nm_device_bluetooth_refresh_ui (self);
|
||||
|
||||
|
|
|
@ -397,13 +397,6 @@ client_connection_added_cb (NetDeviceEthernet *self)
|
|||
device_ethernet_refresh_ui (self);
|
||||
}
|
||||
|
||||
static void
|
||||
device_state_changed_cb (NetDeviceEthernet *self)
|
||||
{
|
||||
net_object_emit_changed (NET_OBJECT (self));
|
||||
device_ethernet_refresh_ui (self);
|
||||
}
|
||||
|
||||
static void
|
||||
add_profile (NetDeviceEthernet *self)
|
||||
{
|
||||
|
@ -558,7 +551,7 @@ net_device_ethernet_new (NMClient *client, NMDevice *device)
|
|||
g_signal_connect_object (client, NM_CLIENT_CONNECTION_REMOVED,
|
||||
G_CALLBACK (connection_removed), self, G_CONNECT_SWAPPED);
|
||||
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (device_state_changed_cb), self, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (device_ethernet_refresh_ui), self, G_CONNECT_SWAPPED);
|
||||
|
||||
device_ethernet_refresh_ui (self);
|
||||
|
||||
|
|
|
@ -452,13 +452,6 @@ nm_device_mobile_refresh_ui (NetDeviceMobile *self)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
device_state_changed_cb (NetDeviceMobile *self)
|
||||
{
|
||||
net_object_emit_changed (NET_OBJECT (self));
|
||||
nm_device_mobile_refresh_ui (self);
|
||||
}
|
||||
|
||||
static void
|
||||
device_off_toggled (NetDeviceMobile *self)
|
||||
{
|
||||
|
@ -833,7 +826,7 @@ net_device_mobile_new (NMClient *client, NMDevice *device, GDBusObject *modem)
|
|||
self->client = g_object_ref (client);
|
||||
self->device = g_object_ref (device);
|
||||
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (device_state_changed_cb), self, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (nm_device_mobile_refresh_ui), self, G_CONNECT_SWAPPED);
|
||||
|
||||
if (modem != NULL) {
|
||||
MMModem3gpp *modem_3gpp;
|
||||
|
|
|
@ -389,13 +389,6 @@ nm_device_wifi_refresh_ui (NetDeviceWifi *self)
|
|||
show_wifi_list (self);
|
||||
}
|
||||
|
||||
static void
|
||||
device_state_changed_cb (NetDeviceWifi *self)
|
||||
{
|
||||
net_object_emit_changed (NET_OBJECT (self));
|
||||
nm_device_wifi_refresh_ui (self);
|
||||
}
|
||||
|
||||
static void
|
||||
device_off_toggled (NetDeviceWifi *self)
|
||||
{
|
||||
|
@ -1289,7 +1282,7 @@ net_device_wifi_new (CcPanel *panel, NMClient *client, NMDevice *device)
|
|||
g_signal_connect_object (client, "notify::wireless-enabled",
|
||||
G_CALLBACK (wireless_enabled_toggled), self, G_CONNECT_SWAPPED);
|
||||
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (device_state_changed_cb), self, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (device, "state-changed", G_CALLBACK (nm_device_wifi_refresh_ui), self, G_CONNECT_SWAPPED);
|
||||
|
||||
list = GTK_WIDGET (cc_wifi_connection_list_new (client, NM_DEVICE_WIFI (device), TRUE, TRUE, FALSE));
|
||||
gtk_widget_show (list);
|
||||
|
|
|
@ -26,21 +26,8 @@
|
|||
|
||||
#include "net-object.h"
|
||||
|
||||
enum {
|
||||
SIGNAL_CHANGED,
|
||||
SIGNAL_LAST
|
||||
};
|
||||
|
||||
static guint signals[SIGNAL_LAST] = { 0 };
|
||||
G_DEFINE_TYPE (NetObject, net_object, G_TYPE_OBJECT)
|
||||
|
||||
void
|
||||
net_object_emit_changed (NetObject *self)
|
||||
{
|
||||
g_return_if_fail (NET_IS_OBJECT (self));
|
||||
g_signal_emit (self, signals[SIGNAL_CHANGED], 0);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
net_object_get_widget (NetObject *self,
|
||||
GtkSizeGroup *heading_size_group)
|
||||
|
@ -53,14 +40,6 @@ net_object_get_widget (NetObject *self,
|
|||
static void
|
||||
net_object_class_init (NetObjectClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
signals[SIGNAL_CHANGED] =
|
||||
g_signal_new ("changed",
|
||||
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -42,7 +42,6 @@ struct _NetObjectClass
|
|||
GtkSizeGroup *heading_size_group);
|
||||
};
|
||||
|
||||
void net_object_emit_changed (NetObject *object);
|
||||
GtkWidget *net_object_get_widget (NetObject *object,
|
||||
GtkSizeGroup *heading_size_group);
|
||||
|
||||
|
|
|
@ -51,15 +51,6 @@ struct _NetVpn
|
|||
|
||||
G_DEFINE_TYPE (NetVpn, net_vpn, NET_TYPE_OBJECT)
|
||||
|
||||
static void nm_device_refresh_vpn_ui (NetVpn *self);
|
||||
|
||||
static void
|
||||
connection_changed_cb (NetVpn *self)
|
||||
{
|
||||
net_object_emit_changed (NET_OBJECT (self));
|
||||
nm_device_refresh_vpn_ui (self);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
vpn_proxy_get_widget (NetObject *object,
|
||||
GtkSizeGroup *heading_size_group)
|
||||
|
@ -255,7 +246,7 @@ net_vpn_new (NMConnection *connection,
|
|||
|
||||
g_signal_connect_object (connection,
|
||||
NM_CONNECTION_CHANGED,
|
||||
G_CALLBACK (connection_changed_cb),
|
||||
G_CALLBACK (nm_device_refresh_vpn_ui),
|
||||
self, G_CONNECT_SWAPPED);
|
||||
|
||||
nm_device_refresh_vpn_ui (self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue