summaryrefslogtreecommitdiff
path: root/gui/sheet.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-24 02:01:30 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-24 02:01:30 -0300
commitef5150170a0a26f79b2ddfed3d0815aaf48781ac (patch)
tree1f1a342e5e78f76942ce26122625194f337422b9 /gui/sheet.c
parent6e07f89c6fd2cf86e25fa245c2688d8c2e20be95 (diff)
downloadeeshow-ef5150170a0a26f79b2ddfed3d0815aaf48781ac.tar.gz
eeshow-ef5150170a0a26f79b2ddfed3d0815aaf48781ac.tar.bz2
eeshow-ef5150170a0a26f79b2ddfed3d0815aaf48781ac.zip
gui/: move resizing back to gui.c; support resizing index
Diffstat (limited to 'gui/sheet.c')
-rw-r--r--gui/sheet.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/gui/sheet.c b/gui/sheet.c
index dfd0f57..3e65f28 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -118,7 +118,7 @@ static void curr_sheet_size(struct gui_ctx *ctx, int *w, int *h)
}
-static void zoom_to_extents(struct gui_ctx *ctx)
+void zoom_to_extents(struct gui_ctx *ctx)
{
GtkAllocation alloc;
int w, h;
@@ -596,24 +596,10 @@ static const struct input_ops sheet_input_ops = {
};
-/* ----- Event handlers ---------------------------------------------------- */
-
-
-static void size_allocate_event(GtkWidget *widget, GdkRectangle *allocation,
- gpointer data)
-{
- struct gui_ctx *ctx = data;
-
- zoom_to_extents(ctx);
-}
-
-
/* ----- Initialization ---------------------------------------------------- */
void sheet_setup(struct gui_ctx *ctx)
{
- g_signal_connect(G_OBJECT(ctx->da), "size_allocate",
- G_CALLBACK(size_allocate_event), ctx);
input_push(&sheet_input_ops, ctx);
}