diff options
author | myheroyuki <myheroyuki@outlook.com> | 2022-10-29 14:57:05 +0300 |
---|---|---|
committer | myheroyuki <myheroyuki@outlook.com> | 2022-10-29 14:57:05 +0300 |
commit | 332ac1618ccc03514b1e711b521afb7858f7a715 (patch) | |
tree | 8f8903bf94f1c043f4006e57f5cf633cf242461a /src | |
parent | 15148bfef09542d3f85980c6b83670dceb718b74 (diff) |
[Rem-2782] Display protocol name in tooltip for connections in the ... menu when in an existing connection's window
Diffstat (limited to 'src')
-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); |