aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright noticesAvuton Olrich2008-12-311-9/+9
|
* added comments for translatorsMax Kellermann2008-12-251-0/+6
| | | | Give translators hints about the meaning of some difficult messages.
* simplified translation stringsMax Kellermann2008-12-251-2/+4
| | | | Removed colon and "Error: " / "Keys - " prefix.
* po: improved translatable strings for easier translationMax Kellermann2008-11-251-7/+5
| | | | Remove exclamation marks and other markup from the strings.
* screen_file.c: replaced mpd_unused by G_GNUC_UNUSEDThomas Jansen2008-11-241-4/+3
|
* screen: method cmd() returns boolMax Kellermann2008-11-181-8/+8
| | | | Return true/false instead of 1/0.
* command: added CMD_LOCATE to locate song in databaseMax Kellermann2008-11-181-0/+47
| | | | | Pressing 'l' switches to the file browser (screen_file) and locates the previously selected song in the server's database.
* screen_{file,artist,search}: repaint only if screen is visibleMax Kellermann2008-11-181-1/+2
| | | | | Don't repaint the screen after browser_cmd() if another screen has been selected meanwhile.
* 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-6/+17
| | | | | | 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_file: optimized title formulaMax Kellermann2008-11-071-12/+10
| | | | Don't allocate and copy memory.
* disable more features with --enable-miniMax Kellermann2008-11-071-0/+8
| | | | | | | | | | | | | | 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
* include ncursesw/ncurses.h if availableMax Kellermann2008-10-061-1/+0
| | | | | When compiling with libncursesw, include <ncursesw/ncurses.h> instead of <ncurses.h> (if available).
* screen: export the global variable "screen"Max Kellermann2008-10-031-9/+9
| | | | | screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
* screen: don't pass mpdclient pointer to method paint()Max Kellermann2008-10-031-4/+3
| | | | | None of the paint() implementations acutally uses the mpdclient pointer. Remove it from the method signature.
* removed KEY_RESIZEMax Kellermann2008-10-031-2/+0
| | | | | Since we are handling SIGWINCH, we do not need to handle KEY_RESIZE from ncurses. Remove it.
* list_window: remove list_window_state_tMax Kellermann2008-10-031-2/+0
| | | | | | | | 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-9/+7
| | | | | g_basename() is always available, no need to implement a fallback. Also use g_path_get_dirname(), g_path_get_basename().
* 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.
* moved i18n macros to i18n.hMax Kellermann2008-10-021-1/+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: added browser_cmd()Max Kellermann2008-10-021-34/+1
| | | | Merge a lot of code from the 3 browser screen into browser_cmd().
* screen_file: set highlights after screen updateMax Kellermann2008-10-011-0/+1
| | | | | Due to a missing sync_highlights() call, highlights were gone when the user pressed the "update" hot key.
* screen_browser: added hotkey for adding songMax Kellermann2008-09-251-0/+7
| | | | | 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.
* screen: replaced get_cur_mode_id() with screen_is_visible()Max Kellermann2008-09-251-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.
* screen_file: removed update() methodMax Kellermann2008-09-251-23/+50
| | | | | Repaint the file screen on demand. No need for the update() method anymore.
* screen: don't pass screen pointer to method paint()Max Kellermann2008-09-251-3/+3
| | | | | None of the paint() implementations actually use the screen pointer - remove it from the method signature.
* screen: don't call wrefresh() in methods paint() and update()Max Kellermann2008-09-251-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.
* list_window: removed property "clear"Max Kellermann2008-09-251-2/+0
| | | | | Without clearing previous screen contents, there may be corruptions, make this mandatory and optimize screen clearing.
* code style, indent with tabs XMax Kellermann2008-09-251-3/+1
| | | | Follow the same code style als MPD itself.
* screen: simplified CMD_SCREEN_UPDATE handlersMax Kellermann2008-09-221-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.
* screen: don't set list_window->repaintMax Kellermann2008-09-221-1/+0
| | | | | | Several screens ignore the attribute list_window->repaint. Don't set it there. It will be replaced with a more intelligent repaint algorithm later.
* browser: check if the selection is validMax Kellermann2008-09-211-0/+6
| | | | Don't call filelist_get() with an invalid index.
* filelist: provide more functions for working with a filelistMax Kellermann2008-09-191-6/+6
| | | | Avoid direct accesses to the filelist struct, provide an API for that.
* filelist: drop "mpdclient" prefixMax Kellermann2008-09-191-1/+1
| | | | | The separate filelist library does not depend on mpdclient, so the prefix is superfluous.
* screen_browser: moved code to browser_playlist_changed()Max Kellermann2008-09-181-17/+1
| | | | | Merge code from all 3 browser screens into one generic browser function.
* screen_browser: moved code to screen_browser.cMax Kellermann2008-09-181-468/+8
| | | | Isolate the generic browser code from the directory browser.
* screen_browser: added struct screen_browserMax Kellermann2008-09-181-57/+57
| | | | | We are going to separate the browser functions from screen_file.c. Move all variables which are going to be needed by this code.
* renamed screen_browse.h to screen_browser.hMax Kellermann2008-09-181-1/+1
|
* code style, indent with tabs VIMax Kellermann2008-09-181-65/+61
| | | | Follow the same code style als MPD itself.
* screen: check MPD status only if connectedMax Kellermann2008-09-181-0/+3
| | | | | | 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.
* screen: removed empty methodsMax Kellermann2008-09-181-6/+0
| | | | | Declaring empty methods is of no use. If a method is empty, we should set it to NULL in the screen_functions struct.
* browse: when deselecting, don't search twiceMax Kellermann2008-09-171-1/+1
| | | | | When deselecting a song in the file browser, the local variable "idx" was initialized and overwritten. Remove the initialization.
* make several functions return voidMax Kellermann2008-09-171-4/+4
|
* list_window: don't reset *highlight to 0Max Kellermann2008-09-171-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.
* screen: removed screen_functions.get_lw()Max Kellermann2008-09-171-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.
* replaced get_screen_X() with static screen_functions variableMax Kellermann2008-09-171-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.
* fix unused parameter warningsMax Kellermann2008-09-151-8/+12
| | | | | Add the "unused" attribute to all function parameters which are indeed going to be ignored.
* use size_t and unsigned integersMax Kellermann2008-09-151-2/+2
|
* fix shadow warningsMax Kellermann2008-09-151-50/+51
| | | | | Rename local variables and function parameters, so they don't shadow global variables.