network: Hide edit connection buttons if nm-connection-editor not installed
This commit is contained in:
parent
b5ff6d1b21
commit
d61d13d4e3
2 changed files with 3 additions and 1 deletions
|
@ -979,4 +979,5 @@ net_device_mobile_init (NetDeviceMobile *self)
|
|||
|
||||
g_signal_connect_swapped (self->options_button, "clicked",
|
||||
G_CALLBACK (edit_connection), self);
|
||||
gtk_widget_set_visible (self->options_button, g_find_program_in_path ("nm-connection-editor") != NULL);
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ nm_device_simple_refresh_ui (NetDeviceSimple *self)
|
|||
update_off_switch_from_device_state (priv->device_off_switch, state, self);
|
||||
|
||||
/* set up the Options button */
|
||||
gtk_widget_set_visible (GTK_WIDGET (priv->options_button), state != NM_DEVICE_STATE_UNMANAGED);
|
||||
gtk_widget_set_visible (GTK_WIDGET (priv->options_button), state != NM_DEVICE_STATE_UNMANAGED && g_find_program_in_path ("nm-connection-editor") != NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -250,6 +250,7 @@ net_device_simple_init (NetDeviceSimple *self)
|
|||
|
||||
g_signal_connect_swapped (priv->options_button, "clicked",
|
||||
G_CALLBACK (edit_connection), self);
|
||||
gtk_widget_set_visible (priv->options_button, g_find_program_in_path ("nm-connection-editor") != NULL);
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
Loading…
Add table
Reference in a new issue