summaryrefslogtreecommitdiff
path: root/src/gtkext/gtkbufferdisplay.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-07-26 18:52:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-07-26 18:52:15 (GMT)
commita6c46fc296db67321db3d4bb586346998de90422 (patch)
tree042cd0fd89fd1f1c8943b3aefd2b50585f461f58 /src/gtkext/gtkbufferdisplay.c
parent19516ffcca14abb082c5109125b7249bdc7fc199 (diff)
Reduced the quantity of arguments used to deal with lines.
Diffstat (limited to 'src/gtkext/gtkbufferdisplay.c')
-rw-r--r--src/gtkext/gtkbufferdisplay.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/gtkext/gtkbufferdisplay.c b/src/gtkext/gtkbufferdisplay.c
index eec0e5b..e419125 100644
--- a/src/gtkext/gtkbufferdisplay.c
+++ b/src/gtkext/gtkbufferdisplay.c
@@ -28,8 +28,6 @@
#include "gtkbufferdisplay-int.h"
-
-
#include "../core/params.h"
#include "../glibext/gbinarycursor.h" // REMME
@@ -215,13 +213,6 @@ static void gtk_buffer_display_class_init(GtkBufferDisplayClass *class)
static void gtk_buffer_display_init(GtkBufferDisplay *display)
{
- int offset; /* Décalage des étiquettes */
-
- memset(&display->offsets, 0, sizeof(line_width_summary));
-
- g_generic_config_get_value(get_main_configuration(), MPK_LABEL_OFFSET, &offset);
- display->offsets.max_widths[BLC_ASSEMBLY_LABEL] = offset;
-
display->cursor = NULL;
}
@@ -522,7 +513,7 @@ static gboolean gtk_buffer_display_draw(GtkWidget *widget, cairo_t *cr)
area.x -= virt_x;
virt_y += area.y;
- g_buffer_view_draw(display->view, cr, virt_y, &area, parent->options, &display->offsets,
+ g_buffer_view_draw(display->view, cr, virt_y, &area, parent->options,
selected, parent->scale, parent->export);
}
@@ -613,8 +604,7 @@ static gboolean gtk_buffer_display_key_press(GtkWidget *widget, GdkEventKey *eve
ctrl = (event->state & GDK_CONTROL_MASK);
area = display->caret;
- status = g_buffer_view_move_caret(display->view, ctrl, dir, panel->options, &display->offsets,
- &area, &cursor);
+ status = g_buffer_view_move_caret(display->view, ctrl, dir, panel->options, &area, &cursor);
if (status)
{
@@ -828,8 +818,7 @@ GObject *gtk_buffer_display_get_active_object(const GtkBufferDisplay *display)
else
result = g_buffer_view_find_creator(display->view,
display->caret.x, display->caret.y,
- GTK_DISPLAY_PANEL(display)->options,
- &display->offsets);
+ GTK_DISPLAY_PANEL(display)->options);
return result;
@@ -996,8 +985,7 @@ static bool _gtk_buffer_display_move_caret_to(GtkBufferDisplay *display, gint x,
panel = GTK_DISPLAY_PANEL(display);
- result = g_buffer_view_compute_caret_full(display->view, x, y, panel->options, &display->offsets,
- &new, &cursor);
+ result = g_buffer_view_compute_caret_full(display->view, x, y, panel->options, &new, &cursor);
if (result)
gtk_buffer_display_relocate_caret(display, &new, cursor);