aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_browser.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright noticesAvuton Olrich2008-12-311-10/+10
|
* added comments for translatorsMax Kellermann2008-12-251-0/+1
| | | | Give translators hints about the meaning of some difficult messages.
* list_window: use "bool" instead of "int"Max Kellermann2008-11-271-2/+2
| | | | | For flags and return values, use the "bool" data type instead of "int".
* screen_browser.c: replaced mpd_unused by G_GNUC_UNUSEDThomas Jansen2008-11-241-2/+1
|
* screen_song: check CMD_VIEW only if song screen is enabledMax Kellermann2008-11-191-0/+2
|
* screen_song: new screen which views song informationMax Kellermann2008-11-181-0/+9
| | | | | This new screen views all information available on a song: its location, file name, and tags.
* screen_browser: always declare variable "entry"Max Kellermann2008-11-181-2/+0
| | | | | The local variable "entry" was only declared when lyrics were enabled, but it is now used by CMD_LOCATE, too.
* command: added CMD_LOCATE to locate song in databaseMax Kellermann2008-11-181-0/+9
| | | | | Pressing 'l' switches to the file browser (screen_file) and locates the previously selected song in the server's database.
* filelist: filelist_find_song() returns position instead of pointerMax Kellermann2008-11-181-2/+4
| | | | | | Making the function return the index makes it more flexible: those who want the pointer can use filelist_get(), and the others may use the index for other purposes.
* screen_browser: eliminated local variable "entity"Max Kellermann2008-11-181-2/+0
| | | | "entity" is not being used after its initial assignment.
* screen_browser: check if filelist is setMax Kellermann2008-11-181-3/+8
| | | | | | | When calling browser_change_directory() before a filelist was set, ncmpc would crash due to a NULL pointer dereference. This scenario is not possible currently, since the open() method allocates the filelist.
* screen_browser: use bool for return valuesMax Kellermann2008-11-181-22/+22
| | | | Return true/false instead of 0/-1.
* mpdclient: removed _utf8 suffix from function namesMax Kellermann2008-11-071-1/+1
| | | | | All functions must receive UTF-8 file names. Delete all which still work with locale strings, and remove the _utf8 suffix from the others.
* mpdclient: expect UTF-8 stringsMax Kellermann2008-11-071-2/+2
| | | | | | Don't convert the character set of strings to and from the current locale. This library cannot know what the strings are going to be used for, so it should not mess with them.
* screen_browser: free g_path_get_dirname() return valueMax Kellermann2008-11-071-0/+1
| | | | | The function browser_change_directory() did not free the return value of g_path_get_dirname().
* disable more features with --enable-miniMax Kellermann2008-11-071-2/+27
| | | | | | | | | | | | | | Disable lots of smaller features which don't have a separate configure option: - xterm title - screen list - horizontal scrolling - MPD version number check - key binding checks - character set conversion - bitrate display - highlighting in the file browser - completion / history
* screen_browser: fix warning when lyrics screen is disabledMax Kellermann2008-10-081-0/+2
| | | | | A local variable was only used by the lyrics screen code. Put #ifdef around its declaration.
* screen: export the global variable "screen"Max Kellermann2008-10-031-3/+2
| | | | | screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
* don't import mpdclient_finish_command() twiceMax Kellermann2008-10-031-2/+0
| | | | | mpdclient_finish_command() is already imported by mpdclient.h, don't do it again in the sources.
* list_window: remove list_window_state_tMax Kellermann2008-10-031-9/+15
| | | | | | | | We do not need to save a stack of list window states. When we return to a parent directory, we just have to find the directory which we come from in the parent list. Note that this patch resets the cursor when going to the root directory, but I think it's not that important, and I will deal with that later.
* use g_basename() instead of basename()Max Kellermann2008-10-031-4/+4
| | | | | g_basename() is always available, no need to implement a fallback. Also use g_path_get_dirname(), g_path_get_basename().
* screen_browser: added constant playlist_formatMax Kellermann2008-10-021-6/+3
| | | | | Moved the format string for playlist files to the constant "playlist_format".
* moved code to charset.cMax Kellermann2008-10-021-0/+1
| | | | | Move everything which deals with UTF-8 strings and character set conversion to charset.c, header charset.h.
* removed LIST_FORMAT, STATUS_FORMATMax Kellermann2008-10-021-4/+3
| | | | | Use options.list_format and options.status_format directly instead of these two macros.
* moved i18n macros to i18n.hMax Kellermann2008-10-021-0/+1
| | | | | Don't make everybody include ncmpc.h just to have generic features. Move generic i18n macros to a separate header.
* removed the debugging function D()Max Kellermann2008-10-021-1/+0
| | | | gdb is for debugging. We don't need D() calls littered all over.
* screen_browser: unexport command implementationsMax Kellermann2008-10-021-5/+7
| | | | | | When we created created browser_cmd(), several functions of the screen_browser API weren't used by other sources anymore. We can now unexport them.
* screen_lyrics: add screen_lyrics_switch()Max Kellermann2008-10-021-0/+16
| | | | | | 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.
* screen_browser: added browser_cmd()Max Kellermann2008-10-021-0/+53
| | | | Merge a lot of code from the 3 browser screen into browser_cmd().
* screen_browser: added hotkey for adding songMax Kellermann2008-09-251-0/+11
| | | | | CMD_ADD ('a') appends a song to the playlist, no matter if it is already there, i.e. unlike CMD_SELECT, it does not toggle the song.
* code style, indent with tabs XMax Kellermann2008-09-251-2/+0
| | | | Follow the same code style als MPD itself.
* screen: moved list_window mouse code to list_window.cMax Kellermann2008-09-221-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.
* browser: check if the selection is validMax Kellermann2008-09-211-1/+2
| | | | Don't call filelist_get() with an invalid index.
* filelist: use GPtrArray instead of GListMax Kellermann2008-09-191-19/+15
| | | | | Since we do a lot of indexed accesses to the filelist, a linked list doesn't seem appropriate. Use GPtrArray instead.
* browser: added function browser_get_selected()Max Kellermann2008-09-191-9/+11
| | | | | browser_get_selected() checks if there is a file list and a valid selection, and returns the selected entry.
* filelist: provide more functions for working with a filelistMax Kellermann2008-09-191-6/+7
| | | | Avoid direct accesses to the filelist struct, provide an API for that.
* filelist: drop "mpdclient" prefixMax Kellermann2008-09-191-2/+2
| | | | | The separate filelist library does not depend on mpdclient, so the prefix is superfluous.
* browser: use mpdclient_filelist_find_song() in set_highlight()Max Kellermann2008-09-191-18/+9
| | | | | A song should not be twice in the browser. Simplify set_highlight() by finding the entry with mpdclient_filelist_find_song().
* browser: song must not be NULL in set_highlight()Max Kellermann2008-09-191-2/+1
| | | | | The caller must not pass NULL to set_highlight(). Replaced check with assertion.
* screen_browser: removed entity.song!=NULL checkMax Kellermann2008-09-181-6/+5
| | | | | It is guaranteed that the "song" attribute is not NULL, remove the check.
* screen_browser: removed redundant highlight checkMax Kellermann2008-09-181-6/+5
| | | | | | browser_select_entry() checked the entry's "highlight" flag twice: the first time, it was toggled, and the second time, action was performed based on the flag. Merge the two checks.
* screen_browser: removed redundant entity type checksMax Kellermann2008-09-181-14/+10
| | | | | The function browser_select_entry() returns early when the entity type is not "SONG". No need to double check that.
* screen_browser: moved code to browser_select_entry()Max Kellermann2008-09-181-51/+24
| | | | | | Moved code from browser_handle_select(). Call this new function also from browser_handle_select_all(). This fixes a bug in select_all(): it actually did not select all, but stopped after the first song.
* screen_browser: removed commented codeMax Kellermann2008-09-181-15/+0
|
* screen_browser: moved code to browser_playlist_changed()Max Kellermann2008-09-181-2/+29
| | | | | Merge code from all 3 browser screens into one generic browser function.
* screen_browser: moved code to screen_browser.cMax Kellermann2008-09-181-0/+474
Isolate the generic browser code from the directory browser.