summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-01-03 16:42:28 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2017-01-03 23:20:06 +0100
commit6937c9fbc892f6d6633faa054d780e62cf6f8227 (patch)
tree490b72a66e79c051f3172696fb1881e6f911df8d
parent2ab0d34497cabe35a350ee72c46266c8046fffea (diff)
downloadnetwork-manager-applet-6937c9fbc892f6d6633faa054d780e62cf6f8227.tar.gz
editor: remove @ifname_first argument from ce_page_setup_device_combo()
It's always TRUE.
-rw-r--r--src/connection-editor/ce-page.c17
-rw-r--r--src/connection-editor/ce-page.h3
-rw-r--r--src/connection-editor/page-bluetooth.c2
-rw-r--r--src/connection-editor/page-ethernet.c2
-rw-r--r--src/connection-editor/page-infiniband.c2
-rw-r--r--src/connection-editor/page-ip-tunnel.c2
-rw-r--r--src/connection-editor/page-wifi.c2
7 files changed, 12 insertions, 18 deletions
diff --git a/src/connection-editor/ce-page.c b/src/connection-editor/ce-page.c
index 6a5b21bb..2e9e1307 100644
--- a/src/connection-editor/ce-page.c
+++ b/src/connection-editor/ce-page.c
@@ -339,8 +339,7 @@ static char **
_get_device_list (CEPage *self,
GType device_type,
gboolean set_ifname,
- const char *mac_property,
- gboolean ifname_first)
+ const char *mac_property)
{
const GPtrArray *devices;
GPtrArray *interfaces;
@@ -371,12 +370,9 @@ _get_device_list (CEPage *self,
if (mac_property)
g_object_get (G_OBJECT (dev), mac_property, &mac, NULL);
- if (set_ifname && mac_property) {
- if (ifname_first)
- item = g_strdup_printf ("%s (%s)", ifname, mac);
- else
- item = g_strdup_printf ("%s (%s)", mac, ifname);
- } else
+ if (set_ifname && mac_property)
+ item = g_strdup_printf ("%s (%s)", ifname, mac);
+ else
item = g_strdup (set_ifname ? ifname : mac);
g_ptr_array_add (interfaces, item);
@@ -460,15 +456,14 @@ ce_page_setup_device_combo (CEPage *self,
GType device_type,
const char *ifname,
const char *mac,
- const char *mac_property,
- gboolean ifname_first)
+ const char *mac_property)
{
char **iter, *active_item = NULL;
int i, active_idx = -1;
char **device_list;
char *item;
- device_list = _get_device_list (self, device_type, TRUE, mac_property, ifname_first);
+ device_list = _get_device_list (self, device_type, TRUE, mac_property);
if (ifname && mac)
item = g_strdup_printf ("%s (%s)", ifname, mac);
diff --git a/src/connection-editor/ce-page.h b/src/connection-editor/ce-page.h
index 537f4687..85acdf6f 100644
--- a/src/connection-editor/ce-page.h
+++ b/src/connection-editor/ce-page.h
@@ -142,8 +142,7 @@ void ce_page_setup_device_combo (CEPage *self,
GType device_type,
const char *ifname,
const char *mac,
- const char *mac_property,
- gboolean ifname_first);
+ const char *mac_property);
gboolean ce_page_mac_entry_valid (GtkEntry *entry, int type, const char *property_name, GError **error);
gboolean ce_page_interface_name_valid (const char *iface, const char *property_name, GError **error);
gboolean ce_page_device_entry_get (GtkEntry *entry, int type,
diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c
index b1c41bdf..65eed707 100644
--- a/src/connection-editor/page-bluetooth.c
+++ b/src/connection-editor/page-bluetooth.c
@@ -78,7 +78,7 @@ populate_ui (CEPageBluetooth *self, NMConnection *connection)
bdaddr = nm_setting_bluetooth_get_bdaddr (setting);
ce_page_setup_device_combo (CE_PAGE (self), GTK_COMBO_BOX (priv->bdaddr),
NM_TYPE_DEVICE_BT, NULL,
- bdaddr, NM_DEVICE_BT_HW_ADDRESS, TRUE);
+ bdaddr, NM_DEVICE_BT_HW_ADDRESS);
g_signal_connect_swapped (priv->bdaddr, "changed", G_CALLBACK (ce_page_changed), self);
}
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index d35a0a35..e5656511 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -244,7 +244,7 @@ populate_ui (CEPageEthernet *self)
s_mac = nm_setting_wired_get_mac_address (setting);
ce_page_setup_device_combo (CE_PAGE (self), GTK_COMBO_BOX (priv->device_combo),
NM_TYPE_DEVICE_ETHERNET, s_ifname,
- s_mac, NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS, TRUE);
+ s_mac, NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS);
g_signal_connect (priv->device_combo, "changed", G_CALLBACK (stuff_changed), self);
/* Cloned MAC address */
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index f3b98456..639b3530 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -103,7 +103,7 @@ populate_ui (CEPageInfiniband *self)
s_mac = nm_setting_infiniband_get_mac_address (setting);
ce_page_setup_device_combo (CE_PAGE (self), GTK_COMBO_BOX (priv->device_combo),
NM_TYPE_DEVICE_INFINIBAND, s_ifname,
- s_mac, NM_DEVICE_INFINIBAND_HW_ADDRESS, TRUE);
+ s_mac, NM_DEVICE_INFINIBAND_HW_ADDRESS);
g_signal_connect (priv->device_combo, "changed", G_CALLBACK (stuff_changed), self);
/* MTU */
diff --git a/src/connection-editor/page-ip-tunnel.c b/src/connection-editor/page-ip-tunnel.c
index d326f833..eca3a0c7 100644
--- a/src/connection-editor/page-ip-tunnel.c
+++ b/src/connection-editor/page-ip-tunnel.c
@@ -96,7 +96,7 @@ populate_ui (CEPageIPTunnel *self, NMConnection *connection)
str = nm_setting_ip_tunnel_get_parent (setting);
ce_page_setup_device_combo (CE_PAGE (self), GTK_COMBO_BOX (priv->parent),
G_TYPE_NONE, str,
- NULL, NULL, TRUE);
+ NULL, NULL);
mode = nm_setting_ip_tunnel_get_mode (setting);
if (mode >= NM_IP_TUNNEL_MODE_IPIP && mode <= NM_IP_TUNNEL_MODE_VTI6)
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index 871f4514..e0a460ff 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -382,7 +382,7 @@ populate_ui (CEPageWifi *self)
s_mac = nm_setting_wireless_get_mac_address (setting);
ce_page_setup_device_combo (CE_PAGE (self), GTK_COMBO_BOX (priv->device_combo),
NM_TYPE_DEVICE_WIFI, s_ifname,
- s_mac, NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS, TRUE);
+ s_mac, NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS);
g_signal_connect_swapped (priv->device_combo, "changed", G_CALLBACK (ce_page_changed), self);
/* Cloned MAC address */