summaryrefslogtreecommitdiff
path: root/src/gtkext/hexdisplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext/hexdisplay.c')
-rw-r--r--src/gtkext/hexdisplay.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gtkext/hexdisplay.c b/src/gtkext/hexdisplay.c
index 0f0bd30..cf1f600 100644
--- a/src/gtkext/hexdisplay.c
+++ b/src/gtkext/hexdisplay.c
@@ -25,6 +25,7 @@
#include "gtkbufferdisplay-int.h"
+#include "../core/params.h"
#include "../format/format.h"
#include "../glibext/generators/hex.h"
@@ -185,12 +186,20 @@ GtkWidget *gtk_hex_display_new(GBinContent *content)
{
GtkHexDisplay *result; /* Composant à retourner */
GBufferView *view; /* Vue pointée sur un tampon */
+ int padding; /* Bourrage entre colonnes */
+ GWidthTracker *tracker; /* Gestionnaire de largeurs */
result = g_object_new(GTK_TYPE_HEX_DISPLAY, NULL);
- result->cache = g_buffer_cache_new(content);
+ result->cache = g_buffer_cache_new(content, HLC_COUNT);
g_object_ref_sink(G_OBJECT(result->cache));
+ g_generic_config_get_value(get_main_configuration(), MPK_HEX_PADDING, &padding);
+
+ tracker = g_buffer_cache_get_width_tracker(result->cache);
+ g_width_tracker_set_column_min_width(tracker, HLC_PADDING, padding);
+ g_object_unref(G_OBJECT(tracker));
+
result->generator = g_hex_generator_new(content);
gtk_hex_display_populate_cache(result);