summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64e5b56)
raw | patch | inline | side by side (parent: 64e5b56)
author | Max Kellermann <max@duempel.org> | |
Sat, 3 Oct 2009 19:44:22 +0000 (21:44 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 3 Oct 2009 19:44:22 +0000 (21:44 +0200) |
src/hscroll.h | patch | blob | history | |
src/screen_play.c | patch | blob | history |
diff --git a/src/hscroll.h b/src/hscroll.h
index 8b643830de5dca63fccc3f9622f6b7c0669d2295..cad3f17ddae93404c79774a9a4e4a76feafd607a 100644 (file)
--- a/src/hscroll.h
+++ b/src/hscroll.h
GTime t; /* GTime is equivalent to time_t */
};
+static inline void
+hscroll_reset(struct hscroll *hscroll)
+{
+ hscroll->offset = 0;
+}
+
char *
strscroll(struct hscroll *hscroll, char *str, char *separator, unsigned width);
diff --git a/src/screen_play.c b/src/screen_play.c
index 3690dd341e3c84dbc2dee34a2918398ad19b6e3b..96c295633b85245a7ce5fda542da0d29d5a979a9 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
@@ -155,7 +155,7 @@ list_callback(unsigned idx, bool *highlight, char **second_column, G_GNUC_UNUSED
must_scroll = true;
if (current_song != lw->selected) {
- hscroll.offset = 0;
+ hscroll_reset(&hscroll);
current_song = lw->selected;
}
@@ -165,7 +165,7 @@ list_callback(unsigned idx, bool *highlight, char **second_column, G_GNUC_UNUSED
g_free(tmp);
}
else
- hscroll.offset = 0;
+ hscroll_reset(&hscroll);
}
#else
(void)second_column;