summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: ade1f0e)
raw | patch | inline | side by side (from parent 1: ade1f0e)
author | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 19:26:42 +0000 (20:26 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 19:26:42 +0000 (20:26 +0100) |
src/main.c | patch | blob | history | |
src/screen.c | patch | blob | history | |
src/screen_queue.c | patch | blob | history | |
src/status_bar.c | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index a8fb3b36f654a93e4157c46baa594108dbf03153..88660de05842e12fc4258c58da3a45f13547bb70 100644 (file)
--- a/src/main.c
+++ b/src/main.c
doupdate();
/* try again after 30 seconds */
- reconnect_source_id = g_timeout_add(30000,
- timer_reconnect, NULL);
+ reconnect_source_id =
+ g_timeout_add_seconds(30, timer_reconnect, NULL);
return;
}
#endif
assert(reconnect_source_id == 0);
/* try again in 5 seconds */
- reconnect_source_id = g_timeout_add(5000,
- timer_reconnect, NULL);
+ reconnect_source_id = g_timeout_add_seconds(5, timer_reconnect, NULL);
}
void
screen_update(mpd);
- reconnect_source_id = g_timeout_add(1000, timer_reconnect, NULL);
+ reconnect_source_id = g_timeout_add_seconds(1, timer_reconnect, NULL);
}
/**
auto_update_timer();
#ifndef NCMPC_MINI
- check_key_bindings_source_id = g_timeout_add(10000, timer_check_key_bindings, NULL);
+ check_key_bindings_source_id =
+ g_timeout_add_seconds(10, timer_check_key_bindings, NULL);
#endif
screen_paint(mpd);
diff --git a/src/screen.c b/src/screen.c
index 0a056a866ec29ba266711eea5bc4c7044ac44885..781b68f22eb9e99c2d06b2590dce1990548041a6 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
#ifndef NCMPC_MINI
if (options.welcome_screen_list)
screen.welcome_source_id =
- g_timeout_add(SCREEN_WELCOME_TIME * 1000,
- welcome_timer_callback, c);
+ g_timeout_add_seconds(SCREEN_WELCOME_TIME,
+ welcome_timer_callback, c);
#endif
/* create top window */
diff --git a/src/screen_queue.c b/src/screen_queue.c
index de6b2a09627f19d7781b5cece0cc225283f396b3..d364c910a5c0ae8e0c91f8ff707e1414361e305d 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
lw->hide_cursor = true;
screen_queue_repaint();
} else
- timer_hide_cursor_id = g_timeout_add(options.hide_cursor * 1000,
- timer_hide_cursor, c);
+ timer_hide_cursor_id = g_timeout_add_seconds(options.hide_cursor,
+ timer_hide_cursor, c);
return FALSE;
}
assert(timer_hide_cursor_id == 0);
if (options.hide_cursor > 0) {
lw->hide_cursor = false;
- timer_hide_cursor_id = g_timeout_add(options.hide_cursor * 1000,
- timer_hide_cursor, c);
+ timer_hide_cursor_id = g_timeout_add_seconds(options.hide_cursor,
+ timer_hide_cursor, c);
}
screen_queue_restore_selection();
if (options.hide_cursor > 0) {
if (timer_hide_cursor_id != 0)
g_source_remove(timer_hide_cursor_id);
- timer_hide_cursor_id = g_timeout_add(options.hide_cursor * 1000,
- timer_hide_cursor, c);
+ timer_hide_cursor_id = g_timeout_add_seconds(options.hide_cursor,
+ timer_hide_cursor, c);
}
if (list_window_cmd(lw, cmd)) {
diff --git a/src/status_bar.c b/src/status_bar.c
index 74f91de3a67a75baa121960e8f928484c9934714..bdf3bcd6200cb324898ba63e675be63677f9733a 100644 (file)
--- a/src/status_bar.c
+++ b/src/status_bar.c
if (p->message_source_id != 0)
g_source_remove(p->message_source_id);
- p->message_source_id = g_timeout_add(options.status_message_time * 1000,
- status_bar_clear_message_cb, p);
+ p->message_source_id = g_timeout_add_seconds(options.status_message_time,
+ status_bar_clear_message_cb, p);
}