[yelp] yelp-view: Set right-click menu for install links
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] yelp-view: Set right-click menu for install links
- Date: Fri, 21 Oct 2011 21:36:14 +0000 (UTC)
commit 96d73923b175054f98caeeef8ad74727ac2704a0
Author: Shaun McCance <shaunm gnome org>
Date: Tue Oct 18 16:00:16 2011 -0400
yelp-view: Set right-click menu for install links
libyelp/yelp-view.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index b02d890..24af96b 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -1263,18 +1263,25 @@ view_populate_popup (YelpView *view,
}
if (g_str_has_prefix (priv->popup_link_uri, "mailto:")) {
+ gchar *label = g_strdup_printf (_("Send email to %s"),
+ priv->popup_link_uri + 7);
/* Not using a mnemonic because underscores are common in email
* addresses, and we'd have to escape them. There doesn't seem
* to be a quick GTK+ function for this. In practice, there will
* probably only be one menu item for mailto link popups anyway,
* so the mnemonic's not that big of a deal.
*/
- gchar *label = g_strdup_printf (_("Send email to %s"),
- priv->popup_link_uri + 7);
item = gtk_menu_item_new_with_label (label);
g_signal_connect (item, "activate",
G_CALLBACK (popup_open_link), view);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ g_free (label);
+ }
+ else if (g_str_has_prefix (priv->popup_link_uri, "install:")) {
+ item = gtk_menu_item_new_with_mnemonic (_("_Install Packages"));
+ g_signal_connect (item, "activate",
+ G_CALLBACK (popup_open_link), view);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
else {
GSList *cur;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]