aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-08-16 17:50:07 +0200
committerThomas White <taw@bitwiz.org.uk>2015-08-16 17:50:07 +0200
commit4534e5af52a226327590b3c19a010a460212427a (patch)
treec4749cd036cdf0e1fb7d2139836b6934b5d2c239 /src/sc_editor.c
parenta54c8fae031aa34b6286e8f08fc4861681d24200 (diff)
Remove sc_block_frame() crap
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index 2845a18..95351e2 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -819,8 +819,7 @@ static gboolean button_press_sig(GtkWidget *da, GdkEventButton *event,
if ( within_frame(e->selection, x, y) ) {
clicked = e->selection;
} else {
- clicked = find_frame_at_position(sc_block_frame(e->scblocks),
- x, y);
+ clicked = find_frame_at_position(e->top, x, y);
}
/* If the user clicked the currently selected frame, position cursor
@@ -867,8 +866,7 @@ static gboolean button_press_sig(GtkWidget *da, GdkEventButton *event,
}
} else if ( (clicked == NULL)
- || ( !e->top_editable
- && (clicked == sc_block_frame(e->scblocks)) ) )
+ || ( !e->top_editable && (clicked == e->top) ) )
{
/* Clicked no object. Deselect old object and set up for
* (maybe) creating a new one. */
@@ -955,7 +953,7 @@ static struct frame *create_frame(SCEditor *e, double x, double y,
struct frame *parent;
struct frame *fr;
- parent = sc_block_frame(e->scblocks);
+ parent = e->top;
if ( w < 0.0 ) {
x += w;
@@ -972,7 +970,6 @@ static struct frame *create_frame(SCEditor *e, double x, double y,
/* Add to SC */
fr->scblocks = sc_block_append_end(e->scblocks,
"f", NULL, NULL);
- sc_block_set_frame(fr->scblocks, fr);
sc_block_append_inside(fr->scblocks, NULL, NULL, strdup(""));
fr->x = x;