change var = time(NULL) to time(&var)
This commit is contained in:
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
myScreen = myPlaylist;
|
myScreen = myPlaylist;
|
||||||
|
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
|
|
||||||
Mpd->SetStatusUpdater(NcmpcppStatusChanged, NULL);
|
Mpd->SetStatusUpdater(NcmpcppStatusChanged, NULL);
|
||||||
Mpd->SetErrorHandler(NcmpcppErrorCallback, NULL);
|
Mpd->SetErrorHandler(NcmpcppErrorCallback, NULL);
|
||||||
@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
|
|||||||
if (!title_allowed)
|
if (!title_allowed)
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
title_allowed = 1;
|
title_allowed = 1;
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
|
|
||||||
if (myScreen == myPlaylist)
|
if (myScreen == myPlaylist)
|
||||||
{
|
{
|
||||||
@@ -462,7 +462,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
size_t id = myPlaylist->Main()->Choice();
|
size_t id = myPlaylist->Main()->Choice();
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
if (myPlaylist->NowPlaying > myPlaylist->CurrentSong()->GetPosition()) // needed for keeping proper
|
if (myPlaylist->NowPlaying > myPlaylist->CurrentSong()->GetPosition()) // needed for keeping proper
|
||||||
myPlaylist->NowPlaying--; // position of now playing song.
|
myPlaylist->NowPlaying--; // position of now playing song.
|
||||||
Mpd->QueueDeleteSongId(myPlaylist->CurrentSong()->GetID());
|
Mpd->QueueDeleteSongId(myPlaylist->CurrentSong()->GetID());
|
||||||
@@ -526,7 +526,7 @@ int main(int argc, char *argv[])
|
|||||||
while (!myPlaylistEditor->Content->Empty() && Keypressed(input, Key.Delete))
|
while (!myPlaylistEditor->Content->Empty() && Keypressed(input, Key.Delete))
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
Mpd->QueueDeleteFromPlaylist(myPlaylistEditor->Playlists->Current(), myPlaylistEditor->Content->Choice());
|
Mpd->QueueDeleteFromPlaylist(myPlaylistEditor->Playlists->Current(), myPlaylistEditor->Content->Choice());
|
||||||
myPlaylistEditor->Content->DeleteOption(myPlaylistEditor->Content->Choice());
|
myPlaylistEditor->Content->DeleteOption(myPlaylistEditor->Content->Choice());
|
||||||
myPlaylistEditor->Content->Refresh();
|
myPlaylistEditor->Content->Refresh();
|
||||||
@@ -630,7 +630,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongUp) && list.front() > 0)
|
while (Keypressed(input, Key.MvSongUp) && list.front() > 0)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
for (vector<size_t>::iterator it = list.begin(); it != list.end(); it++)
|
for (vector<size_t>::iterator it = list.begin(); it != list.end(); it++)
|
||||||
{
|
{
|
||||||
(*it)--;
|
(*it)--;
|
||||||
@@ -654,7 +654,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongUp) && to > 0)
|
while (Keypressed(input, Key.MvSongUp) && to > 0)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
to--;
|
to--;
|
||||||
myPlaylist->Main()->Swap(to, to+1);
|
myPlaylist->Main()->Swap(to, to+1);
|
||||||
myPlaylist->Main()->Scroll(wUp);
|
myPlaylist->Main()->Scroll(wUp);
|
||||||
@@ -678,7 +678,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongUp) && list.front() > 0)
|
while (Keypressed(input, Key.MvSongUp) && list.front() > 0)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
for (vector<size_t>::iterator it = list.begin(); it != list.end(); it++)
|
for (vector<size_t>::iterator it = list.begin(); it != list.end(); it++)
|
||||||
{
|
{
|
||||||
(*it)--;
|
(*it)--;
|
||||||
@@ -700,7 +700,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongUp) && to > 0)
|
while (Keypressed(input, Key.MvSongUp) && to > 0)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
to--;
|
to--;
|
||||||
myPlaylistEditor->Content->Swap(to, to+1);
|
myPlaylistEditor->Content->Swap(to, to+1);
|
||||||
myPlaylistEditor->Content->Scroll(wUp);
|
myPlaylistEditor->Content->Scroll(wUp);
|
||||||
@@ -739,7 +739,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongDown) && list.back() < myPlaylist->Main()->Size()-1)
|
while (Keypressed(input, Key.MvSongDown) && list.back() < myPlaylist->Main()->Size()-1)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
for (vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); it++)
|
for (vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); it++)
|
||||||
{
|
{
|
||||||
(*it)++;
|
(*it)++;
|
||||||
@@ -763,7 +763,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongDown) && to < myPlaylist->Main()->Size()-1)
|
while (Keypressed(input, Key.MvSongDown) && to < myPlaylist->Main()->Size()-1)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
to++;
|
to++;
|
||||||
myPlaylist->Main()->Swap(to, to-1);
|
myPlaylist->Main()->Swap(to, to-1);
|
||||||
myPlaylist->Main()->Scroll(wDown);
|
myPlaylist->Main()->Scroll(wDown);
|
||||||
@@ -788,7 +788,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongDown) && list.back() < myPlaylistEditor->Content->Size()-1)
|
while (Keypressed(input, Key.MvSongDown) && list.back() < myPlaylistEditor->Content->Size()-1)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
for (vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); it++)
|
for (vector<size_t>::reverse_iterator it = list.rbegin(); it != list.rend(); it++)
|
||||||
{
|
{
|
||||||
(*it)++;
|
(*it)++;
|
||||||
@@ -810,7 +810,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.MvSongDown) && to < myPlaylistEditor->Content->Size()-1)
|
while (Keypressed(input, Key.MvSongDown) && to < myPlaylistEditor->Content->Size()-1)
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
to++;
|
to++;
|
||||||
myPlaylistEditor->Content->Swap(to, to-1);
|
myPlaylistEditor->Content->Swap(to, to-1);
|
||||||
myPlaylistEditor->Content->Scroll(wDown);
|
myPlaylistEditor->Content->Scroll(wDown);
|
||||||
@@ -872,7 +872,7 @@ int main(int argc, char *argv[])
|
|||||||
while (Keypressed(input, Key.SeekForward) || Keypressed(input, Key.SeekBackward))
|
while (Keypressed(input, Key.SeekForward) || Keypressed(input, Key.SeekBackward))
|
||||||
{
|
{
|
||||||
TraceMpdStatus();
|
TraceMpdStatus();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
myPlaylist->Main()->ReadKey(input);
|
myPlaylist->Main()->ReadKey(input);
|
||||||
|
|
||||||
int howmuch = Config.incremental_seeking ? (timer-t)/2+Config.seek_time : Config.seek_time;
|
int howmuch = Config.incremental_seeking ? (timer-t)/2+Config.seek_time : Config.seek_time;
|
||||||
@@ -1361,7 +1361,7 @@ int main(int argc, char *argv[])
|
|||||||
myBrowser->GetDirectory("/");
|
myBrowser->GetDirectory("/");
|
||||||
myPlaylistEditor->Playlists->Clear(0); // make playlist editor update itself
|
myPlaylistEditor->Playlists->Clear(0); // make playlist editor update itself
|
||||||
}
|
}
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
delete mDialog;
|
delete mDialog;
|
||||||
FreeSongList(result);
|
FreeSongList(result);
|
||||||
}
|
}
|
||||||
@@ -1438,7 +1438,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (myScreen == myPlaylist)
|
if (myScreen == myPlaylist)
|
||||||
{
|
{
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
myPlaylist->Main()->Highlighting(1);
|
myPlaylist->Main()->Highlighting(1);
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
}
|
}
|
||||||
@@ -1455,7 +1455,7 @@ int main(int argc, char *argv[])
|
|||||||
Statusbar() << "Find " << how << ": ";
|
Statusbar() << "Find " << how << ": ";
|
||||||
string findme = wFooter->GetString();
|
string findme = wFooter->GetString();
|
||||||
UnlockStatusbar();
|
UnlockStatusbar();
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
if (findme.empty())
|
if (findme.empty())
|
||||||
continue;
|
continue;
|
||||||
ToLower(findme);
|
ToLower(findme);
|
||||||
@@ -1491,7 +1491,7 @@ int main(int argc, char *argv[])
|
|||||||
mList->Highlight(vFoundPositions[found_pos < 0 ? 0 : found_pos]);
|
mList->Highlight(vFoundPositions[found_pos < 0 ? 0 : found_pos]);
|
||||||
if (myScreen == myPlaylist)
|
if (myScreen == myPlaylist)
|
||||||
{
|
{
|
||||||
timer = time(NULL);
|
time(&timer);
|
||||||
myPlaylist->Main()->Highlighting(1);
|
myPlaylist->Main()->Highlighting(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -487,7 +487,7 @@ void ShowMessage(const char *format, ...)
|
|||||||
{
|
{
|
||||||
if (messages_allowed)
|
if (messages_allowed)
|
||||||
{
|
{
|
||||||
time_of_statusbar_lock = time(NULL);
|
time(&time_of_statusbar_lock);
|
||||||
lock_statusbar_delay = Config.message_delay_time;
|
lock_statusbar_delay = Config.message_delay_time;
|
||||||
if (Config.statusbar_visibility)
|
if (Config.statusbar_visibility)
|
||||||
block_statusbar_update = 1;
|
block_statusbar_update = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user