aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_play.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-10-02removed the debugging function D()Max Kellermann1-5/+0
gdb is for debugging. We don't need D() calls littered all over.
2008-10-02screen_lyrics: add screen_lyrics_switch()Max Kellermann1-0/+11
screen_lyrics_switch() opens the lyrics screen and displays the lyrics of the specified song. This way, the user may view the lyrics of any song in the database browser.
2008-09-28screen_play: no song means id=-1Max Kellermann1-3/+3
"prev_song_id" and "current_song_id" had value 0 if MPD was not playing at all. This way, ncmpc cannot see the difference between "song 0 playing" and "not playing". Change "not playing" to -1.
2008-09-28screen_play: repaint highlight when mpd starts playingMax Kellermann1-1/+2
When deciding whether to repaint the current highlight, test if MPD is actually playing. If MPD starts playing, repaint.
2008-09-26screen_play: repaint if current song has changedMax Kellermann1-8/+10
The play_update() function was reduced too much: it didn't repaint the screen when the current song changed. Add check for that. Don't repaint the screen in center_playing_item(), make the caller do it.
2008-09-25screen: replaced get_cur_mode_id() with screen_is_visible()Max Kellermann1-1/+1
Screen code shouldn't know anything about the screen ids (which will be eliminated completely later). Instead of comparing ids, compare the screen_functions pointer.
2008-09-25screen: don't pass screen pointer to method update()Max Kellermann1-2/+4
play_update() is the only update() implementation left, and it does not use the screen pointer. Remove it from the method signature.
2008-09-25screen_play: hide cursor with a timerMax Kellermann1-20/+45
Instead of hiding the cursor in the update() callback, hide it with a glib main loop timeout.
2008-09-25screen_playlist: don't repaint in update()Max Kellermann1-17/+45
Repaint the playlist window on demand. Don't repaint it unconditionally in play_update().
2008-09-25screen: don't pass screen pointer to method paint()Max Kellermann1-3/+3
None of the paint() implementations actually use the screen pointer - remove it from the method signature.
2008-09-25screen: don't call wrefresh() in methods paint() and update()Max Kellermann1-2/+0
screen_paint() and screen_update() are responsible for refreshing the screen. We can remove all wrefresh() and wnoutrefresh() invocations from all paint() and update() method implementations.
2008-09-25list_window: removed property "clear"Max Kellermann1-10/+3
Without clearing previous screen contents, there may be corruptions, make this mandatory and optimize screen clearing.
2008-09-25code style, indent with tabs XMax Kellermann1-166/+161
Follow the same code style als MPD itself.
2008-09-23screen_play: use list_window_check_selected()Max Kellermann1-5/+1
Instead of manually adjusting the selection, let list_window.c do it.
2008-09-22screen: simplified CMD_SCREEN_UPDATE handlersMax Kellermann1-3/+2
Since screen.c has default code for CMD_SCREEN_UPDATE, return 0 from the command handlers and let screen.c do the rest.
2008-09-22screen: don't set list_window->repaintMax Kellermann1-6/+1
Several screens ignore the attribute list_window->repaint. Don't set it there. It will be replaced with a more intelligent repaint algorithm later.
2008-09-22screen: moved input_timestamp to screen_play.cMax Kellermann1-1/+6
Since the input_timestamp is only used by screen_play, move it there.
2008-09-22screen: moved list_window mouse code to list_window.cMax Kellermann1-1/+2
Move the portion of screen_get_mouse_event() which handles list_window clicks to list_window.c. The code contained a NULL pointer dereference, which is now fixed.
2008-09-18playlist: removed "updated" flagMax Kellermann1-2/+3
The caller may check the playlist.id instead of checking the old "updated" flag.
2008-09-18screen: check MPD status only if connectedMax Kellermann1-4/+7
Fix several segmentation faults: when the connection to the MPD server is lost, there were NULL pointer dereferences because client->status==NULL. Check before accessing it.
2008-09-18screen: removed NULL checkMax Kellermann1-2/+1
Since the screen's initialization is guaranteed, we can remove the NULL check in center_playing_item().
2008-09-17make several functions return voidMax Kellermann1-4/+4
2008-09-17playlist: use playlist_get() instead of playlist_get_song()Max Kellermann1-2/+3
2008-09-17list_window: don't reset *highlight to 0Max Kellermann1-1/+0
Since the list_window code sets highlight to 0 before it calls the list_callback, the callback itself doesn't have to reset the flag.
2008-09-17list_window: added list_window_center()Max Kellermann1-8/+3
Merge code which used to be duplicated in the screens "play", "help", "lyrics".
2008-09-17screen: removed screen_functions.get_lw()Max Kellermann1-7/+0
If it is really important to set the curser, we should think of a better way, instead of exporting one non-generic method. For now, just set the cursor to the origin.
2008-09-17replaced get_screen_X() with static screen_functions variableMax Kellermann1-19/+12
Compile time initialization saves resources, compared to run-time initialization. Declare all screen_function structs as global variables, and remove all get functions.
2008-09-15use GArray for playlist instead of GListMax Kellermann1-10/+10
Using a doubly linked list for the local playlist copy is a huge waste of both memory and CPU cycles. Use GArray instead of GList, which is much faster in this case.
2008-09-15fix unused parameter warningsMax Kellermann1-9/+10
Add the "unused" attribute to all function parameters which are indeed going to be ignored.
2008-09-15use size_t and unsigned integersMax Kellermann1-9/+10
2008-09-15fix shadow warningsMax Kellermann1-6/+6
Rename local variables and function parameters, so they don't shadow global variables.
2008-09-15include cleanupMax Kellermann1-7/+7
A header should include all headers which he needs. Move local includes on top, and let foo.c include foo.h in the first line, to automatically test its dependencies.
2008-09-15fix function prototypesMax Kellermann1-8/+11
Add missing prototypes, and fix wrong prototypes. Convert lots of functions to "static" when they are only used within the current source file.
2008-09-15const pointersMax Kellermann1-2/+2
Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
2008-09-15code style, indent with tabsMax Kellermann1-208/+184
Follow the same code style als MPD itself. This patch only fixes parts of the code which are going to be touched in the following bunch of patches, i.e. there will be more "code style" patches in the future.
2008-09-15remove unused static functionsMax Kellermann1-1/+1
Also remove some commented code and unused function parameters.
2007-08-26Removed nested functionsAndreas Obergrusberger1-66/+112
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@6811 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-06-14Dont include panel.hKalle Wallin1-1/+0
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3354 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-06-03Added a "hide cursor" feature #0000417Kalle Wallin1-0/+13
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3307 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-02-13Enable playlist saving on the browse screenKalle Wallin1-5/+6
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2949 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-12-13Fixed abort (Ctrl-G) handling in the save playlist promptKalle Wallin1-1/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2794 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-15Added a search screenKalle Wallin1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2668 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-13Use glib's str functions (g_strlcat, g_strlcpy, g_snprintf, g_strdup_vprintf)Kalle Wallin1-3/+4
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1868 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-02Added basic ncurses mouse supportKalle Wallin1-0/+43
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1770 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-02Make shure the list scrolls when moving a songKalle Wallin1-0/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1767 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-01Removed the trim() function, using glib's g_strstrip() insteadKalle Wallin1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1751 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-22Clear the main window on CMD_SCREEN_UPDATEKalle Wallin1-0/+3
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1617 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-20Added _utf8 suffix to all functions that take utf8 arguments.Kalle Wallin1-5/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1587 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-19Make shure the list window is repainted after a completion list is displayedKalle Wallin1-6/+11
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1569 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-19added type argument to gcmp_list_from_path()Kalle Wallin1-7/+47
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1567 09075e82-0dd4-0310-85a5-a0d7c8717e4f