[geany/geany-plugins] 8f54bd: Merge pull request #617 from LarsGit223/scope-tooltips
Frank Lanitz
git-noreply at xxxxx
Sun Oct 8 11:26:51 UTC 2017
Branch: refs/heads/master
Author: Frank Lanitz <frank at frank.uvena.de>
Committer: GitHub <noreply at github.com>
Date: Sun, 08 Oct 2017 11:26:51 UTC
Commit: 8f54bdfca17a4b240fc02831183e98f009335348
https://github.com/geany/geany-plugins/commit/8f54bdfca17a4b240fc02831183e98f009335348
Log Message:
-----------
Merge pull request #617 from LarsGit223/scope-tooltips
scope: added tooltips to toolbar buttons.
Modified Paths:
--------------
scope/src/scope.c
Modified: scope/src/scope.c
18 lines changed, 10 insertions(+), 8 deletions(-)
===================================================================
@@ -153,18 +153,19 @@ typedef struct _ToolItem
gint index;
const char *icon[2];
GtkWidget *widget;
+ const char *tooltip_text;
} ToolItem;
static ToolItem toolbar_items[] =
{
- { RUN_CONTINUE_KB, { "small_run_continue_icon", "large_run_continue_icon" }, NULL },
- { GOTO_CURSOR_KB, { "small_goto_cursor_icon", "large_goto_cursor_icon" }, NULL },
- { GOTO_SOURCE_KB, { "small_goto_source_icon", "large_goto_source_icon" }, NULL },
- { STEP_INTO_KB, { "small_step_into_icon", "large_step_into_icon" }, NULL },
- { STEP_OVER_KB, { "small_step_over_icon", "large_step_over_icon" }, NULL },
- { STEP_OUT_KB, { "small_step_out_icon", "large_step_out_icon" }, NULL },
- { TERMINATE_KB, { "small_terminate_icon", "large_terminate_icon" }, NULL },
- { BREAKPOINT_KB, { "small_breakpoint_icon", "large_breakpoint_icon", }, NULL },
+ { RUN_CONTINUE_KB, { "small_run_continue_icon", "large_run_continue_icon" }, NULL, N_("Run/continue") },
+ { GOTO_CURSOR_KB, { "small_goto_cursor_icon", "large_goto_cursor_icon" }, NULL, N_("Run to cursor") },
+ { GOTO_SOURCE_KB, { "small_goto_source_icon", "large_goto_source_icon" }, NULL, N_("Run to source") },
+ { STEP_INTO_KB, { "small_step_into_icon", "large_step_into_icon" }, NULL, N_("Step into") },
+ { STEP_OVER_KB, { "small_step_over_icon", "large_step_over_icon" }, NULL, N_("Step over") },
+ { STEP_OUT_KB, { "small_step_out_icon", "large_step_out_icon" }, NULL, N_("Step out") },
+ { TERMINATE_KB, { "small_terminate_icon", "large_terminate_icon" }, NULL, N_("Terminate") },
+ { BREAKPOINT_KB, { "small_breakpoint_icon", "large_breakpoint_icon", }, NULL, N_("Toggle breakpoint") },
{ -1, { NULL, NULL }, NULL }
};
@@ -631,6 +632,7 @@ void plugin_init(G_GNUC_UNUSED GeanyData *gdata)
GtkMenuItem *menu_item = GTK_MENU_ITEM(debug_menu_items[tool_item->index].widget);
GtkToolItem *button = gtk_tool_button_new(NULL, gtk_menu_item_get_label(menu_item));
+ gtk_widget_set_tooltip_text (GTK_WIDGET (button), tool_item->tooltip_text);
gtk_tool_button_set_use_underline(GTK_TOOL_BUTTON(button),
gtk_menu_item_get_use_underline(menu_item));
g_signal_connect(button, "clicked", G_CALLBACK(on_toolbar_button_clicked),
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list