diff options
Diffstat (limited to 'src/gui/menus')
-rw-r--r-- | src/gui/menus/edition.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/gui/menus/edition.c b/src/gui/menus/edition.c index 0a92e3e..f2742e6 100644 --- a/src/gui/menus/edition.c +++ b/src/gui/menus/edition.c @@ -246,7 +246,6 @@ void update_access_in_menu_edition(GObject *ref, GtkViewPanel *vpanel, const vmp bool state; /* Etat principal à considérer */ gboolean access; /* Accès à déterminer */ GBufferLine *line; /* Ligne de position courante */ - GBufferSegment *segment; /* Segment actif s'il existe */ GObject *creator; /* Créateur à l'orgine du seg. */ GtkWidget *item; /* Elément de menu à traiter */ @@ -256,15 +255,10 @@ void update_access_in_menu_edition(GObject *ref, GtkViewPanel *vpanel, const vmp { state = false; line = NULL; - segment = NULL; + creator = NULL; } else - state = gtk_view_panel_get_position(vpanel, &line, &segment); - - if (state) - creator = g_buffer_segment_get_creator(segment); - else - creator = NULL; + state = gtk_view_panel_get_position(vpanel, &line, &creator); /* Bascule des opérandes numériques */ @@ -300,8 +294,6 @@ void update_access_in_menu_edition(GObject *ref, GtkViewPanel *vpanel, const vmp /* Nettoyage et sortie finale */ if (creator != NULL) g_object_unref(G_OBJECT(creator)); - - if (segment != NULL) g_object_unref(G_OBJECT(segment)); if (line != NULL) g_object_unref(G_OBJECT(line)); } @@ -365,7 +357,6 @@ static void mcb_edition_switch_numeric_operand(GtkMenuItem *menuitem, GMenuBar * GEditorItem *editem; /* Autre version de la barre */ GtkViewPanel *vpanel; /* Afficheur effectif de code */ GBufferLine *line; /* Ligne de position courante */ - GBufferSegment *segment; /* Segment actif s'il existe */ GObject *creator; /* Créateur à l'orgine du seg. */ GDbSwitcher *switcher; /* Bascule à mettre en place */ const mrange_t *range; /* Emplacement de la ligne */ @@ -379,9 +370,8 @@ static void mcb_edition_switch_numeric_operand(GtkMenuItem *menuitem, GMenuBar * vpanel = g_editor_item_get_current_view(editem); - if (gtk_view_panel_get_position(vpanel, &line, &segment)) + if (gtk_view_panel_get_position(vpanel, &line, &creator)) { - creator = g_buffer_segment_get_creator(segment); assert(G_IS_IMM_OPERAND(creator)); range = g_buffer_line_get_range(line); @@ -399,8 +389,6 @@ static void mcb_edition_switch_numeric_operand(GtkMenuItem *menuitem, GMenuBar * g_object_unref(G_OBJECT(proc)); g_object_unref(creator); - - g_object_unref(G_OBJECT(segment)); g_object_unref(G_OBJECT(line)); } @@ -444,16 +432,14 @@ static void mcb_edition_follow_ref(GtkMenuItem *menuitem, GMenuBar *bar) { GtkViewPanel *vpanel; /* Afficheur effectif de code */ GBufferLine *line; /* Ligne de position courante */ - GBufferSegment *segment; /* Segment actif s'il existe */ GObject *creator; /* Créateur à l'orgine du seg. */ virt_t virt; /* Adresse virtuelle */ vmpa2t addr; /* Adresse de destination */ vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar)); - if (gtk_view_panel_get_position(vpanel, &line, &segment)) + if (gtk_view_panel_get_position(vpanel, &line, &creator)) { - creator = g_buffer_segment_get_creator(segment); assert(creator != NULL); /** @@ -479,8 +465,6 @@ static void mcb_edition_follow_ref(GtkMenuItem *menuitem, GMenuBar *bar) } g_object_unref(creator); - - g_object_unref(G_OBJECT(segment)); g_object_unref(G_OBJECT(line)); } |