diff options
author | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-10-29 16:08:41 +0300 |
---|---|---|
committer | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-10-29 16:08:41 +0300 |
commit | 453ef54ad588a4fd074424d21574f82ce0d9605b (patch) | |
tree | 8f8903bf94f1c043f4006e57f5cf633cf242461a | |
parent | 15148bfef09542d3f85980c6b83670dceb718b74 (diff) | |
parent | 332ac1618ccc03514b1e711b521afb7858f7a715 (diff) |
Merge branch 'Rem-2782' into 'master'
[Rem-2782] Display protocol name in tooltip for connections in the ... menu...
See merge request Remmina/Remmina!2436
-rw-r--r-- | src/remmina_applet_menu_item.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/remmina_applet_menu_item.c b/src/remmina_applet_menu_item.c index f7f87d153..2c49f0789 100644 --- a/src/remmina_applet_menu_item.c +++ b/src/remmina_applet_menu_item.c @@ -135,8 +135,17 @@ GtkWidget* remmina_applet_menu_item_new(RemminaAppletMenuItemType item_type, ... gtk_widget_set_halign(widget, GTK_ALIGN_START); gtk_container_add(GTK_CONTAINER(item), widget); + /* Add server and protocol to tooltip text */ if (item->server) { - gtk_widget_set_tooltip_text(GTK_WIDGET(item), item->server); + if (item->protocol){ + gchar buff[200]; + g_snprintf(buff, 200, "%s (%s)", item->server, item->protocol); + gtk_widget_set_tooltip_text(GTK_WIDGET(item), buff); + } else { + gtk_widget_set_tooltip_text(GTK_WIDGET(item), item->server); + } + } else if (item->protocol) { + gtk_widget_set_tooltip_text(GTK_WIDGET(item), item->protocol); } return GTK_WIDGET(item); |