[gnome-builder] libide/gui: add tooltips for run button
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/gui: add tooltips for run button
- Date: Sat, 30 Jul 2022 22:51:18 +0000 (UTC)
commit d28b500d6b00e74e9f7f31e9c514d223ea7815ba
Author: Christian Hergert <chergert redhat com>
Date: Sat Jul 30 15:50:59 2022 -0700
libide/gui: add tooltips for run button
Can't seem to set tooltip-text on split button as it causes a crash.
src/libide/gui/ide-run-button.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/libide/gui/ide-run-button.c b/src/libide/gui/ide-run-button.c
index 204be0a8c..29cfb2cd3 100644
--- a/src/libide/gui/ide-run-button.c
+++ b/src/libide/gui/ide-run-button.c
@@ -50,6 +50,7 @@ on_icon_state_changed_cb (IdeRunButton *self,
{
const char *icon_name;
const char *action_name;
+ const char *tooltip_text;
g_assert (IDE_IS_RUN_BUTTON (self));
g_assert (IDE_IS_RUN_MANAGER (run_manager));
@@ -58,17 +59,21 @@ on_icon_state_changed_cb (IdeRunButton *self,
{
icon_name = ide_run_manager_get_icon_name (run_manager);
action_name = "context.run-manager.run";
+ tooltip_text = _("Run Project (Shift+Ctrl+Space)");
}
else
{
icon_name = "builder-run-stop-symbolic";
action_name = "context.run-manager.stop";
+ tooltip_text = _("Stop Running Project");
}
g_object_set (self->split_button,
"action-name", action_name,
"icon-name", icon_name,
NULL);
+
+ gtk_widget_set_tooltip_text (GTK_WIDGET (self), tooltip_text);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]