Commit 6937c9fb authored by Beniamino Galvani's avatar Beniamino Galvani

editor: remove @ifname_first argument from ce_page_setup_device_combo()

It's always TRUE.
parent 2ab0d344
......@@ -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);
......
......@@ -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,
......
......@@ -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);
}
......
......@@ -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 */
......
......@@ -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 */
......
......@@ -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)
......
......@@ -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 */
......
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