summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-06-04 04:31:33 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-06-04 04:32:30 +0200
commite808d06651d7193bd883f2b9132d9dc9473c6af9 (patch)
treea2ed6add1b2baf3d12061cf833fb0ccfcb99cd54
parent939c9e2d5ed6c3e3e3dc1daaa2ef48c8053dc851 (diff)
downloadnncmpp-e808d06651d7193bd883f2b9132d9dc9473c6af9.tar.gz
nncmpp-e808d06651d7193bd883f2b9132d9dc9473c6af9.tar.xz
nncmpp-e808d06651d7193bd883f2b9132d9dc9473c6af9.zip
Cleanup
-rw-r--r--nncmpp.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/nncmpp.c b/nncmpp.c
index 9d8cf01..1c968f1 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -1773,12 +1773,7 @@ app_process_termo_event (termo_key_t *event)
// --- Current tab -------------------------------------------------------------
-// TODO: remove the useless wrapper struct?
-static struct
-{
- struct tab super; ///< Parent class
-}
-g_current_tab;
+static struct tab g_current_tab;
static void
current_tab_on_item_draw (size_t item_index, struct row_buffer *buffer,
@@ -1841,7 +1836,7 @@ current_tab_on_action (enum action action)
static void
current_tab_update (void)
{
- g_current_tab.super.item_count = g.playlist.len;
+ g_current_tab.item_count = g.playlist.len;
app_fix_view_range ();
app_invalidate ();
}
@@ -1849,7 +1844,7 @@ current_tab_update (void)
static struct tab *
current_tab_init (void)
{
- struct tab *super = &g_current_tab.super;
+ struct tab *super = &g_current_tab;
tab_init (super, "Current");
super->on_action = current_tab_on_action;
super->on_item_draw = current_tab_on_item_draw;