From 6cc16f4c4aaa1676aaaa0c0439f2847cb2345afd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 4 May 2024 02:18:19 +0300 Subject: [PATCH 63/63] gtk: Add tooltip for pane detach buttons Requested by lilmike See osdn #48954 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/gui_main.c | 1 + client/gui-gtk-4.0/gui_main.c | 1 + client/gui-gtk-5.0/gui_main.c | 1 + 3 files changed, 3 insertions(+) diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index 6e7055b274..de1b95a817 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -889,6 +889,7 @@ static GtkWidget *detached_widget_fill(GtkWidget *tearbox) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); gtk_style_context_add_class(gtk_widget_get_style_context(b), "detach_button"); + gtk_widget_set_tooltip_text(b, _("Detach/Attach the pane.")); gtk_container_add(GTK_CONTAINER(tearbox), b); g_signal_connect(b, "toggled", G_CALLBACK(tearoff_callback), tearbox); diff --git a/client/gui-gtk-4.0/gui_main.c b/client/gui-gtk-4.0/gui_main.c index 1cc62224ca..f30c70b66e 100644 --- a/client/gui-gtk-4.0/gui_main.c +++ b/client/gui-gtk-4.0/gui_main.c @@ -868,6 +868,7 @@ static GtkWidget *detached_widget_fill(GtkWidget *tearbox) GTK_STYLE_PROVIDER(detach_button_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); gtk_widget_add_css_class(b, "detach_button"); + gtk_widget_set_tooltip_text(b, _("Detach/Attach the pane.")); gtk_box_append(GTK_BOX(tearbox), b); g_signal_connect(b, "toggled", G_CALLBACK(tearoff_callback), tearbox); diff --git a/client/gui-gtk-5.0/gui_main.c b/client/gui-gtk-5.0/gui_main.c index 71bab2f301..5fb20f7f90 100644 --- a/client/gui-gtk-5.0/gui_main.c +++ b/client/gui-gtk-5.0/gui_main.c @@ -869,6 +869,7 @@ static GtkWidget *detached_widget_fill(GtkWidget *tearbox) GTK_STYLE_PROVIDER(detach_button_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); gtk_widget_add_css_class(b, "detach_button"); + gtk_widget_set_tooltip_text(b, _("Detach/Attach the pane.")); gtk_box_append(GTK_BOX(tearbox), b); g_signal_connect(b, "toggled", G_CALLBACK(tearoff_callback), tearbox); -- 2.43.0