summaryrefslogtreecommitdiff
path: root/gui/index.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-25 12:24:17 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-25 12:24:17 -0300
commit8cd2dc05b0fe2ea11ed0488d231f3086cd45b769 (patch)
tree261e52c875abf5ce01484da5bcfd3ed45c300ef6 /gui/index.c
parent705347f538ed010103b6e1757fd962ee439f393d (diff)
downloadeeshow-8cd2dc05b0fe2ea11ed0488d231f3086cd45b769.tar.gz
eeshow-8cd2dc05b0fe2ea11ed0488d231f3086cd45b769.tar.bz2
eeshow-8cd2dc05b0fe2ea11ed0488d231f3086cd45b769.zip
gui/index.c (thumbnail_pos): since we have "alloc", we don't need "gui"
Diffstat (limited to 'gui/index.c')
-rw-r--r--gui/index.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gui/index.c b/gui/index.c
index fb82ea4..7a5c925 100644
--- a/gui/index.c
+++ b/gui/index.c
@@ -43,8 +43,7 @@ static const struct gui_sheet *curr_sheet = NULL;
/* ----- Tools ------------------------------------------------------------- */
-static void thumbnail_pos(const struct gui *gui, GtkAllocation *alloc,
- unsigned n, int *ix, int *iy)
+static void thumbnail_pos(GtkAllocation *alloc, unsigned n, int *ix, int *iy)
{
*ix = alloc->width / 2 + (thumb_w + SHEET_GAP) *
(n % thumb_cols - (thumb_cols - 1) / 2.0);
@@ -81,7 +80,7 @@ void index_draw_event(const struct gui *gui, cairo_t *cr)
n = 0;
for (sheet = sheets(gui); sheet; sheet = sheet->next) {
- thumbnail_pos(sheet->gui, &alloc, n, &ix, &iy);
+ thumbnail_pos(&alloc, n, &ix, &iy);
x = ix - thumb_w / 2 - SHEET_PAD;
y = iy - thumb_h / 2 - SHEET_PAD;
@@ -94,7 +93,7 @@ void index_draw_event(const struct gui *gui, cairo_t *cr)
if (named == -1)
return;
- thumbnail_pos(curr_sheet->gui, &alloc, named, &ix, &iy);
+ thumbnail_pos(&alloc, named, &ix, &iy);
overlay_size(name_over,
gtk_widget_get_pango_context(curr_sheet->gui->da), &w, &h);
x = ix - w / 2;