[network-manager-applet] editor: when no VPN plugin is installed, indicate that in the tooltip of "Add" button (bgo #625160)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] editor: when no VPN plugin is installed, indicate that in the tooltip of "Add" button (bgo #625160)
- Date: Thu, 9 Dec 2010 08:30:16 +0000 (UTC)
commit 91bfc960f70fd2245a36a9fbed8f140154a8ce14
Author: JiÅ?à KlimeÅ¡ <jklimes redhat com>
Date: Thu Dec 9 09:15:42 2010 +0100
editor: when no VPN plugin is installed, indicate that in the tooltip of "Add" button (bgo #625160)
src/connection-editor/nm-connection-list.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index 54a3a2f..44b7510 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -1272,10 +1272,14 @@ add_connection_buttons (NMConnectionList *self,
g_signal_connect (button, "clicked", G_CALLBACK (add_clicked), info);
if (ctype == NM_TYPE_SETTING_VPN) {
GHashTable *plugins;
+ gboolean have_plugins;
/* disable the "Add..." button if there aren't any VPN plugins */
plugins = vpn_get_plugins (NULL);
- gtk_widget_set_sensitive (button, (plugins && g_hash_table_size (plugins)));
+ have_plugins = plugins && g_hash_table_size (plugins);
+ gtk_widget_set_sensitive (button, have_plugins);
+ if (!have_plugins)
+ gtk_widget_set_tooltip_text (button, _("No VPN plugin available. Please install one to enable this button."));
}
if (new_func)
action_info_set_new_func (info, new_func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]