summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-05-06 00:19:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-05-06 00:19:51 (GMT)
commitc5a2674cd52e4eea66154c6fea931d5cc5c1852e (patch)
treee2d5a66af15e32db2b545e917284ae64cdf876ab
parentd76e89e102aacfe945b44eb3150cb9f4bbf7b613 (diff)
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
-rw-r--r--ChangeLog7
-rw-r--r--src/core/params.c3
-rw-r--r--src/core/params.h1
-rw-r--r--src/gtkext/gtkbufferview.c2
4 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9137274..05bee49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
15-05-06 Cyrille Bagard <nocbos@gmail.com>
+ * 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 <nocbos@gmail.com>
+
* 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, "<Shift>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;