diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-10-23 21:16:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-10-23 21:16:35 (GMT) |
commit | 4563123b929366e93973a1d6aa3269bd7b3f47d6 (patch) | |
tree | 0ffd8d788adb9228c137254f8817c4397a280b16 /src/gtkext | |
parent | acbd3ac3899bd1230097df2f1afea6c3690a5cb8 (diff) |
Indented code labels in the assembly views.
Diffstat (limited to 'src/gtkext')
-rw-r--r-- | src/gtkext/gtkblockdisplay.c | 2 | ||||
-rw-r--r-- | src/gtkext/gtkbufferdisplay-int.h | 1 | ||||
-rw-r--r-- | src/gtkext/gtkbufferdisplay.c | 9 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/gtkext/gtkblockdisplay.c b/src/gtkext/gtkblockdisplay.c index a6f16a5..6aaaac6 100644 --- a/src/gtkext/gtkblockdisplay.c +++ b/src/gtkext/gtkblockdisplay.c @@ -464,4 +464,6 @@ void gtk_block_display_override_view_index(GtkBlockDisplay *display, unsigned in panel->view_index = index; panel->options = g_loaded_content_get_display_options(G_LOADED_CONTENT(panel->binary), index); + GTK_BUFFER_DISPLAY(display)->offsets.max_widths[BLC_ASSEMBLY_LABEL] = 0; + } diff --git a/src/gtkext/gtkbufferdisplay-int.h b/src/gtkext/gtkbufferdisplay-int.h index 9a5980f..2d78b1d 100644 --- a/src/gtkext/gtkbufferdisplay-int.h +++ b/src/gtkext/gtkbufferdisplay-int.h @@ -42,6 +42,7 @@ struct _GtkBufferDisplay GtkDisplayPanel parent; /* A laisser en premier */ GBufferView *view; /* Vue sur le contenu affiché */ + line_width_summary offsets; /* Décalages supplémentaires */ cairo_rectangle_int_t caret; /* Emplacement du curseur #1 */ vmpa2t caret_addr; /* Position mémoire du curseur */ diff --git a/src/gtkext/gtkbufferdisplay.c b/src/gtkext/gtkbufferdisplay.c index 60b1f40..6329668 100644 --- a/src/gtkext/gtkbufferdisplay.c +++ b/src/gtkext/gtkbufferdisplay.c @@ -186,6 +186,13 @@ 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; } @@ -439,7 +446,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, selected); + g_buffer_view_draw(display->view, cr, virt_y, &area, parent->options, &display->offsets, selected); } |