From c5a2674cd52e4eea66154c6fea931d5cc5c1852e Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Wed, 6 May 2015 00:19:51 +0000 Subject: Allowed to customize the size of tooltips over buffer views. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@531 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 7 +++++++ src/core/params.c | 3 +++ src/core/params.h | 1 + src/gtkext/gtkbufferview.c | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9137274..05bee49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 15-05-06 Cyrille Bagard + * src/core/params.c: + * src/core/params.h: + * src/gtkext/gtkbufferview.c: + Allow to customize the size of tooltips over buffer views. + +15-05-06 Cyrille Bagard + * plugins/pychrysa/glibext/codebuffer.c: * src/analysis/binary.c: Update code. diff --git a/src/core/params.c b/src/core/params.c index 779bb38..799798d 100644 --- a/src/core/params.c +++ b/src/core/params.c @@ -159,6 +159,9 @@ bool load_main_config_parameters(void) param = g_generic_config_create_param(config, MPK_SELECTION_LINE, CPT_BOOLEAN, true); if (param == NULL) return false; + param = g_generic_config_create_param(config, MPK_TOOLTIP_SIZE, CPT_INTEGER, 8); + if (param == NULL) return false; + param = g_generic_config_create_param(config, MPK_KEYBINDINGS_EDIT, CPT_STRING, "F2"); if (param == NULL) return false; diff --git a/src/core/params.h b/src/core/params.h index 6598c00..53f7483 100644 --- a/src/core/params.h +++ b/src/core/params.h @@ -47,6 +47,7 @@ #define MPK_ELLIPSIS_TAB "gui.editor.panels.ellipsis_tab" #define MPK_DISPLAY_ON_SEL "gui.editor.panels.display_on_selection" #define MPK_SELECTION_LINE "gui.editor.views.selection_line" +#define MPK_TOOLTIP_SIZE "gui.editor.views.tooltip_max_size" #define MPK_KEYBINDINGS_EDIT "gui.key_bindings.global.edit" #define MPK_AUTO_SAVE "project.autosave" diff --git a/src/gtkext/gtkbufferview.c b/src/gtkext/gtkbufferview.c index 8e4ffd4..1b57341 100644 --- a/src/gtkext/gtkbufferview.c +++ b/src/gtkext/gtkbufferview.c @@ -587,7 +587,7 @@ static gboolean gtk_buffer_view_query_tooltip(GtkWidget *widget, gint x, gint y, if (g_binary_format_find_next_symbol_at(format, &addr, &next_sym)) stop_addr = get_mrange_addr(g_binary_symbol_get_range(next_sym)); - count = 4; + g_generic_config_get_value(get_main_configuration(), MPK_TOOLTIP_SIZE, &count); markup = NULL; -- cgit v0.11.2-87-g4458