From 35c734ce0335ea9d5bc52c62b7b5a54f5bb3bc26 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 4 May 2024 02:20:45 +0300 Subject: [PATCH 22/22] gtk: Add tooltip for pane detach buttons Requested by lilmike See osdn #48954 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.0/gui_main.c | 1 + client/gui-gtk-3.22/gui_main.c | 1 + client/gui-gtk-4.0/gui_main.c | 1 + 3 files changed, 3 insertions(+) diff --git a/client/gui-gtk-3.0/gui_main.c b/client/gui-gtk-3.0/gui_main.c index dcd437e624..f1951cbcbb 100644 --- a/client/gui-gtk-3.0/gui_main.c +++ b/client/gui-gtk-3.0/gui_main.c @@ -821,6 +821,7 @@ static GtkWidget *detached_widget_fill(GtkWidget *tearbox) b = gtk_toggle_button_new(); gtk_container_add(GTK_CONTAINER(tearbox), b); g_signal_connect(b, "toggled", G_CALLBACK(tearoff_callback), tearbox); + gtk_widget_set_tooltip_text(b, _("Detach/Attach the pane.")); fillbox = gtk_grid_new(); gtk_orientable_set_orientation(GTK_ORIENTABLE(fillbox), diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index c5e702c28d..c44c2e895b 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -834,6 +834,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 48e98739c4..5fb2400e7d 100644 --- a/client/gui-gtk-4.0/gui_main.c +++ b/client/gui-gtk-4.0/gui_main.c @@ -812,6 +812,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