[network-manager-applet] editor: don't desensitize dialog if connection isn't valid
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-applet] editor: don't desensitize dialog if connection isn't valid
- Date: Wed, 16 Sep 2009 21:06:36 +0000 (UTC)
commit 49ce747fc6f5aa87be3de364dc188ffc3d5e8324
Author: Dan Williams <dcbw redhat com>
Date: Wed Sep 16 14:05:30 2009 -0700
editor: don't desensitize dialog if connection isn't valid
Dialog sensitivity should be desensitized if a system connection is invalid,
otherwise the user wouldn't be able to fix the connection to make it valid
again. For system connections, dialog should be insensitive only when the
user is (a) not authorized to edit the connection, or (b) the connection is
read-only.
src/connection-editor/nm-connection-editor.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c
index b647b58..f1eec5f 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -152,14 +152,14 @@ update_sensitivity (NMConnectionEditor *editor)
if (!nm_setting_connection_get_read_only (s_con) && editor->initialized) {
if (editor->system_settings_can_modify) {
actionable = ce_polkit_button_get_actionable (CE_POLKIT_BUTTON (editor->ok_button));
- authorized = actionable && ce_polkit_button_get_authorized (CE_POLKIT_BUTTON (editor->ok_button));
+ authorized = ce_polkit_button_get_authorized (CE_POLKIT_BUTTON (editor->ok_button));
}
if (editor->orig_scope == NM_CONNECTION_SCOPE_SYSTEM) {
/* If the user cannot ever be authorized to change system connections, and
* the connection is a system connection, we desensitize the entire dialog.
*/
- sensitive = actionable;
+ sensitive = authorized;
} else {
/* Otherwise, if the connection is originally a user-connection,
* then everything is sensitive except possible the system checkbutton,
@@ -170,7 +170,7 @@ update_sensitivity (NMConnectionEditor *editor)
}
}
- gtk_widget_set_sensitive (GTK_WIDGET (editor->system_checkbutton), authorized);
+ gtk_widget_set_sensitive (GTK_WIDGET (editor->system_checkbutton), actionable && authorized);
/* Cancel button is always sensitive */
gtk_widget_set_sensitive (GTK_WIDGET (editor->cancel_button), TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]