summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2011-10-18 16:00:16 -0400
committerShaun McCance <shaunm@gnome.org>2011-10-21 16:12:56 -0400
commit96d73923b175054f98caeeef8ad74727ac2704a0 (patch)
tree5eae1bd992ec02e440ea292915547ececde67c29
parentf0d8ebbdf4e883379be680c0143f3161fae1f2b8 (diff)
downloadyelp-96d73923b175054f98caeeef8ad74727ac2704a0.tar.gz
yelp-view: Set right-click menu for install links
-rw-r--r--libyelp/yelp-view.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index b02d890e..24af96bb 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;