Christopher Schmidt [Fri, 3 Aug 2012 07:35:39 +0000 (09:35 +0200)]
* ampc.el: Track windows.
(ampc-buffers, ampc-buffers-unordered): Remove.
All users changed to use ampc-normalize-windows.
(ampc-windows): New variable, remove function.
All callers changed to use ampc-normalize-windows.
(ampc-fill-internal-db, ampc-fill-internal-db-entry): Cache tree, tags and
song-props.
(ampc-normalize-windows, ampc-restore-window-configuration): New functions.
(ampc, ampc-suspend): Use ampc-restore-window-configuration.
(ampc-configure-frame-1): Fill ampc-windows. Use total window size.
(ampc-configure-frame): Transform ampc-windows.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:38 +0000 (09:35 +0200)]
* ampc.el: Use tab-stop-list for tabulated lists.
(ampc-tab-offsets): Remove.
(ampc-item-mode-map): Remap tab-to-tab-stop to ampc-move-to-tab.
(ampc-pad, ampc-set-tab-offsets): Use tab-stop-list.
All callers of ampc-pad changed.
(ampc-move-to-tab): New command.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:35 +0000 (09:35 +0200)]
* ampc.el: Minor optimizations and doc fixes.
(ampc-debug): Refine type.
(ampc-synchronous-commands): Add play.
(ampc-face): Rename to ampc-unmarked-face.
(ampc-views): Add new tags.
(ampc-yield-redisplay): New variable.
(ampc-with-selection): Ignore selection if arg is a symbol.
(ampc-outputs-mode, ampc-tag-song-mode, ampc-playlist-mode, ampc-playlist-mode)
(ampc-playlists-mode): Remove empty body.
(ampc-current-playlist-mode): Enable ampc-highlight-current-song-mode.
(ampc-item-mode): Use ampc-unmarked-face.
(ampc-mode): Set mode-line-modified to a dummy value.
(ampc-skip, ampc-set-volume-impl, ampc-set-crossfade-impl): Send unique
commands.
(ampc-playlist): Remove properties from result.
(ampc-align-point): Skip whitespace characters.
(ampc-update, ampc-send-command): Remove backquote.
(ampc-send-next-command): Bind ampc-yield-redisplay.
(ampc-narrow-entry): Return start of match.
(ampc-fill-playlists): Force playlist update.
(ampc-yield): Force redisplay only if ampc-yield-redisplay is non-nil.
(ampc-update-header): Spelling fix.
(ampc-handle-current-song): Add file.
(ampc-handle-status, ampc-toggle-play, ampc-shuffle, ampc-goto-current-song)
(ampc-fill-tag): Code simplification.
(ampc-handle-command): Call ampc-handle-listallinfo.
(ampc-handle-listallinfo): New function.
(ampc-filter): Only print output if ampc-debug is non-nil and not t.
Message command if there is an error.
(ampc-configure-frame-1): Generate buffer name and major mode from type.
Show "[Updating...]" in mode line.
(ampc-mouse-toggle-mark, ampc-unmark-all, ampc-toggle-marks, ampc-mark-impl):
Use inhibit-read-only.
(ampc-delete-playlist): Do not error when there is no playlist.
* ampc.el: Minor optimizations and doc fixes.
(ampc-debug): Refine type.
(ampc-synchronous-commands): Add play.
(ampc-face): Rename to ampc-unmarked-face.
(ampc-views): Add new tags.
(ampc-yield-redisplay): New variable.
(ampc-with-selection): Ignore selection if arg is a symbol.
(ampc-outputs-mode, ampc-tag-song-mode, ampc-playlist-mode, ampc-playlist-mode)
(ampc-playlists-mode): Remove empty body.
(ampc-current-playlist-mode): Enable ampc-highlight-current-song-mode.
(ampc-item-mode): Use ampc-unmarked-face.
(ampc-mode): Set mode-line-modified to a dummy value.
(ampc-skip, ampc-set-volume-impl, ampc-set-crossfade-impl): Send unique commands.
(ampc-playlist): Remove properties from result.
(ampc-align-point): Skip whitespace characters.
(ampc-update, ampc-send-command): Remove backquote.
(ampc-send-next-command): Bind ampc-yield-redisplay.
(ampc-narrow-entry): Return start of match.
(ampc-fill-playlists): Force playlist update.
(ampc-yield): Force redisplay only if ampc-yield-redisplay is non-nil.
(ampc-update-header): Spelling fix.
(ampc-handle-current-song): Add file.
(ampc-handle-status, ampc-toggle-play, ampc-shuffle, ampc-goto-current-song)
(ampc-fill-tag): Code simplification.
(ampc-handle-command): Call ampc-handle-listallinfo.
(ampc-handle-listallinfo): New function.
(ampc-filter): Only print output if ampc-debug is non-nil and not t.
Message command if there is an error.
(ampc-configure-frame-1): Generate buffer name and major mode from type.
Show "[Updating...]" in mode line.
(ampc-mouse-toggle-mark, ampc-unmark-all, ampc-toggle-marks, ampc-mark-impl):
Use inhibit-read-only.
(ampc-delete-playlist): Do not error when there is no playlist.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:01 +0000 (09:35 +0200)]
* ampc.el (ampc-crossfade-step): New variable.
(ampc-mode-map): Bind ampc-set-crossfade.
(ampc-setvol): Rename to ampc-set-volume-impl. All callers changed.
(ampc-set-crossfade-impl): New function.
(ampc-set-crossfade): Make this function an interactive command.
(ampc-increase-crossfade, ampc-decrease-crossfade): Use ampc-set-crossfade.
Increase/decrease crossfade by prefix argument if given.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:00 +0000 (09:35 +0200)]
* ampc.el (ampc-volume-step): New variable.
(ampc-mode-map): Bind ampc-set-volume.
(ampc-setvol): New function.
(ampc-set-volume): Make this function an interactive command.
(ampc-increase-volume, ampc-decrease-volume): Use ampc-setvol.
Increase/decrease volume by prefix argument if given.
Christopher Schmidt [Fri, 3 Aug 2012 07:34:57 +0000 (09:34 +0200)]
* ampc.el: Make ampc synchronous.
(ampc-synchronous-commands): Change to a custom variable.
(ampc-status-tags): Add type.
(ampc-no-implicit-next-dispatch): New variable.
(ampc-send-command-impl): Clarify debug output.
(ampc-send-command): Minor optimisation.
(ampc-send-next-command): Honour the new format of ampc-synchronous-commands.
(ampc-filter): Clarify debug output and honour ampc-no-implicit-next-dispatch.
(ampc-skip): Delay index evaluation to when the command is actually dispatched.
(ampc-yield): Force redisplay.
Christopher Schmidt [Fri, 3 Aug 2012 07:34:51 +0000 (09:34 +0200)]
* ampc.el: Add mouse support for playlist commands.
(ampc-current-playlist-mode-map, ampc-playlist-mode-map)
(ampc-playlists-mode-map): Add commands.
(ampc-playlist, ampc-load, ampc-delete-playlist): Add optional argument
at-point.
(ampc-fill-playlist): Use the right buffer when padding the entries.
(ampc-mouse-delete-playlist, ampc-mouse-load): New commands.
Christopher Schmidt [Fri, 3 Aug 2012 07:34:48 +0000 (09:34 +0200)]
* ampc.el: Add ampc-mini, a command to select the song to play via
completing-read.
(ampc-mode-map): Bind ampc-mini.
(ampc-send-next-command): For hyphen-seperated commands, only send the last part
of the command.
(ampc-mini-impl): New function.
(ampc-handle-command): Handle mini-playlistinfo.
(ampc-play-this): Take optional prefix arg to select song to play by index.
(ampc-mini): New command.
Christopher Schmidt [Wed, 1 Aug 2012 12:23:56 +0000 (14:23 +0200)]
* ampc.el: Take window width into account when computing tabular cell widths.
(ampc-views): Replace :offset by :min, :max and :width properties.
(ampc-tab-offsets): New variable.
(ampc-pad): Use ampc-tab-offsets to pad input. Do not accept an alist any
more. All users of ampc-pad changed to reflect the new format.
(ampc-update-header): Move "[ Updating... ]" label to the front of the header.
(ampc-set-tab-offsets): New function.
(ampc-configure-frame-1): Call ampc-tab-offsets to compute the tabular cell
widths.
Christopher Schmidt [Thu, 26 Apr 2012 12:58:53 +0000 (14:58 +0200)]
* ampc.el: Name views.
(ampc-views): Add description to each view.
(ampc-mode-map): Add change view menu items.
(ampc-change-view): New function.
All users of ampc-views changed to reflect the new format.
Christopher Schmidt [Wed, 28 Mar 2012 16:21:00 +0000 (18:21 +0200)]
* ampc.el (ampc-fill-internal-db-entry): Use a better format for storing data.
All references to the db changed.
(ampc-tree<): Elements of the internal db are always conses.