[libpeas] Show tooltip for available plugins
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Show tooltip for available plugins
- Date: Thu, 8 Dec 2011 16:23:20 +0000 (UTC)
commit 7c3a39a988f78c9b317760a271f4962b6d36de2a
Author: Garrett Regier <garrettregier gmail com>
Date: Wed Dec 7 21:35:02 2011 -0800
Show tooltip for available plugins
http://bugzilla.gnome.org/show_bug.cgi?id=630252
libpeas-gtk/peas-gtk-plugin-manager-view.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/libpeas-gtk/peas-gtk-plugin-manager-view.c b/libpeas-gtk/peas-gtk-plugin-manager-view.c
index 5f8f55f..ce393a4 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager-view.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager-view.c
@@ -592,6 +592,7 @@ peas_gtk_plugin_manager_view_query_tooltip (GtkWidget *widget,
gboolean is_row;
GtkTreeIter iter;
PeasPluginInfo *info;
+ gchar *message;
GError *error = NULL;
is_row = gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (widget),
@@ -605,24 +606,26 @@ peas_gtk_plugin_manager_view_query_tooltip (GtkWidget *widget,
info = peas_gtk_plugin_manager_store_get_plugin (view->priv->store, &iter);
- if (!peas_plugin_info_is_available (info, &error))
+ if (peas_plugin_info_is_available (info, &error))
+ {
+ gtk_tree_model_get (GTK_TREE_MODEL (view->priv->store), &iter,
+ PEAS_GTK_PLUGIN_MANAGER_STORE_INFO_COLUMN, &message,
+ -1);
+ }
+ else
{
- gchar *message;
-
message = g_markup_printf_escaped (_("<b>The plugin '%s' could not be "
"loaded</b>\nAn error occurred: %s"),
peas_plugin_info_get_name (info),
error->message);
-
- gtk_tooltip_set_markup (tooltip, message);
-
- g_free (message);
g_error_free (error);
-
- return TRUE;
}
- return FALSE;
+ gtk_tooltip_set_markup (tooltip, message);
+
+ g_free (message);
+
+ return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]