Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
network-manager-applet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
network-manager-applet
Commits
6937c9fb
Commit
6937c9fb
authored
Jan 03, 2017
by
Beniamino Galvani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
editor: remove @ifname_first argument from ce_page_setup_device_combo()
It's always TRUE.
parent
2ab0d344
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
18 deletions
+12
-18
src/connection-editor/ce-page.c
src/connection-editor/ce-page.c
+6
-11
src/connection-editor/ce-page.h
src/connection-editor/ce-page.h
+1
-2
src/connection-editor/page-bluetooth.c
src/connection-editor/page-bluetooth.c
+1
-1
src/connection-editor/page-ethernet.c
src/connection-editor/page-ethernet.c
+1
-1
src/connection-editor/page-infiniband.c
src/connection-editor/page-infiniband.c
+1
-1
src/connection-editor/page-ip-tunnel.c
src/connection-editor/page-ip-tunnel.c
+1
-1
src/connection-editor/page-wifi.c
src/connection-editor/page-wifi.c
+1
-1
No files found.
src/connection-editor/ce-page.c
View file @
6937c9fb
...
...
@@ -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
);
...
...
src/connection-editor/ce-page.h
View file @
6937c9fb
...
...
@@ -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
,
...
...
src/connection-editor/page-bluetooth.c
View file @
6937c9fb
...
...
@@ -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
);
}
...
...
src/connection-editor/page-ethernet.c
View file @
6937c9fb
...
...
@@ -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 */
...
...
src/connection-editor/page-infiniband.c
View file @
6937c9fb
...
...
@@ -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 */
...
...
src/connection-editor/page-ip-tunnel.c
View file @
6937c9fb
...
...
@@ -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
)
...
...
src/connection-editor/page-wifi.c
View file @
6937c9fb
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment