ncmpc-mini: disable scrolling
The scrolling code broke in the ncmpc-mini build. Disable it when
--enable-mini was specified.
The scrolling code broke in the ncmpc-mini build. Disable it when
--enable-mini was specified.
po: updated German translation
po: removed translations which are obviously wrong
Removed fuzzy and non-fuzzy translations which look obviously wrong.
No translation is better than a wrong one.
Removed fuzzy and non-fuzzy translations which look obviously wrong.
No translation is better than a wrong one.
po: merged new strings in all languages
Removed exclamation marks also from the translated strings.
Removed exclamation marks also from the translated strings.
po: enabled Slovakian translation
The Slovakian translation was added a while ago, but it was not
enabled in configure.ac.
The Slovakian translation was added a while ago, but it was not
enabled in configure.ac.
po: regenerated ncmpc.pot
po: improved translatable strings for easier translation
Remove exclamation marks and other markup from the strings.
Remove exclamation marks and other markup from the strings.
screen: simplify screen list strings
Removed the colon and the spaces from the translatable screen names.
This aims to simplify the translator's job.
Removed the colon and the spaces from the translatable screen names.
This aims to simplify the translator's job.
list_window: reset cursor when list is empty
Due to a side effect of the old "if" condition, the cursor was never
reset to the origin when the list was cleared.
Due to a side effect of the old "if" condition, the cursor was never
reset to the origin when the list was cleared.
screen_lyrics: reset cursor when the song changes
When the view is changed and a new song is about to be displayed,
reset the list's state and scroll back to the origin.
When the view is changed and a new song is about to be displayed,
reset the list's state and scroll back to the origin.
removed gcc.h
gcc.h has been replaced with GLib's G_GNUC_ macros.
gcc.h has been replaced with GLib's G_GNUC_ macros.
screen_search.c: replaced mpd_unused by G_GNUC_UNUSED
screen_play.c: replaced mpd_unused by G_GNUC_UNUSED
screen_lyrics.c: replaced mpd_unused by G_GNUC_UNUSED
screen_keydef.c: replaced mpd_unused by G_GNUC_UNUSED
screen_help.c: replaced mpd_unused by G_GNUC_UNUSED
screen_file.c: replaced mpd_unused by G_GNUC_UNUSED
screen_browser.c: replaced mpd_unused by G_GNUC_UNUSED
screen_artist.c: replaced mpd_unused by G_GNUC_UNUSED
main.c: replaced mpd_unused by G_GNUC_UNUSED
lyrics.c: replaced mpd_unused by G_GNUC_UNUSED
lirc: use GLib's G_GNUC_UNUSED instead of mpd_unused
The header gcc.h is going to fade away, in favor of GLib's G_GNUC_
macros.
The header gcc.h is going to fade away, in favor of GLib's G_GNUC_
macros.
screen_play: scroll long song names in the playlist
If the song name under the cursor is too long for the terminal, scroll
it like in the statusbar.
If the song name under the cursor is too long for the terminal, scroll
it like in the statusbar.
po: updated Spanish translation
po: updated German translation
po: updated PO template
screen_search: don't include ncurses.h directly
screen.h has a check whether to include ncursesw/ncurses.h or
ncurses.h. screen_search.c doesn't need to include it a second time,
and was missing the check.
screen.h has a check whether to include ncursesw/ncurses.h or
ncurses.h. screen_search.c doesn't need to include it a second time,
and was missing the check.
screen_song: support CMD_SCREEN_LYRICS
Show the lyrics of the song currently being displayed.
Show the lyrics of the song currently being displayed.
screen_song: free the song pointer
Fix a memory leak.
Fix a memory leak.
screen_lyrics: support CMD_VIEW
Jump to the song viewer screen.
Jump to the song viewer screen.
screen_song: include cleanup
screen_song: check CMD_VIEW only if song screen is enabled
screen_song: new screen which views song information
This new screen views all information available on a song: its
location, file name, and tags.
This new screen views all information available on a song: its
location, file name, and tags.
libmpdclient: converted MPD_ERROR_ constants to enum
libmpdclient: convert MPD_ACK_ constants to enum
command: change 'locate' default hotkey to 'G'
Use the same hotkey as ncmpcpp.
Use the same hotkey as ncmpcpp.
screen_browser: always declare variable "entry"
The local variable "entry" was only declared when lyrics were enabled,
but it is now used by CMD_LOCATE, too.
The local variable "entry" was only declared when lyrics were enabled,
but it is now used by CMD_LOCATE, too.
screen: method cmd() returns bool
Return true/false instead of 1/0.
Return true/false instead of 1/0.
ncu: include config.h, fix mouse and color support
Due to config.h not being included, mouse and color support was always
disabled.
Due to config.h not being included, mouse and color support was always
disabled.
command: added CMD_LOCATE to locate song in database
Pressing 'l' switches to the file browser (screen_file) and locates
the previously selected song in the server's database.
Pressing 'l' switches to the file browser (screen_file) and locates
the previously selected song in the server's database.
screen_lyrics: duplicate current song
Don't store a pointer to the song passed to screen_lyrics_switch(),
duplicate it instead. In the long term, it is too unsafe to work with
a foreign pointer.
Don't store a pointer to the song passed to screen_lyrics_switch(),
duplicate it instead. In the long term, it is too unsafe to work with
a foreign pointer.
screen_{file,artist,search}: repaint only if screen is visible
Don't repaint the screen after browser_cmd() if another screen has
been selected meanwhile.
Don't repaint the screen after browser_cmd() if another screen has
been selected meanwhile.
filelist: filelist_find_song() returns position instead of pointer
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.
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"
"entity" is not being used after its initial assignment.
"entity" is not being used after its initial assignment.
screen_browser: check if filelist is set
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.
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 values
Return true/false instead of 0/-1.
Return true/false instead of 0/-1.
screen_lyrics: added gettext markers
po: updated russian translation
ncmpc version 0.12~alpha1
First alpha version for the upcoming version 0.12.
First alpha version for the upcoming version 0.12.
README: updated links, new home page
The new home page is in the MPD wiki.
The new home page is in the MPD wiki.
configure.ac: enable color support by default
Many users love colors. It would be too confusing for them to have
color options in the configuration file, but no color support enabled.
Many users love colors. It would be too confusing for them to have
color options in the configuration file, but no color support enabled.
Makefile.am: removed superfluous $(docdir) variable
removed ChangeLog, added release dates to NEWS
The ChangeLog is useless, because it hasn't been updated in a while,
and due to the nature of git, the log will never be lost.
Switch to automake "foreign" mode, because "gnu" mandates the presence
of ChangeLog.
The ChangeLog is useless, because it hasn't been updated in a while,
and due to the nature of git, the log will never be lost.
Switch to automake "foreign" mode, because "gnu" mandates the presence
of ChangeLog.
README, TODO: removed outdated documentation
Removed the "Upgrading to ncmpc-0.11.0" section from README. Deleted
the TODO file.
Removed the "Upgrading to ncmpc-0.11.0" section from README. Deleted
the TODO file.
INSTALL: mention C99 compiler requirements
ncmpc uses C99 features.
ncmpc uses C99 features.
INSTALL: replaced generic instructions
Removed the generic GNU installation instructions, nobody will ever
bother to read this lengthy document. Moved installation instructions
from README.
Removed the generic GNU installation instructions, nobody will ever
bother to read this lengthy document. Moved installation instructions
from README.
NEWS update for 0.12~alpha1
configure.ac: enable artist screen by default
The artist screen has matured, and everybody should have it by
default.
The artist screen has matured, and everybody should have it by
default.
Makefile.am: added screen_play.h to $(ncmpc_headers)
screen_play.h was missing in the tarball.
screen_play.h was missing in the tarball.
po: regenerated ncmpc.pot
po: updated POTFILES.in
Added new sources, removed screen_clock.c.
Added new sources, removed screen_clock.c.
po: improved russian translation
screen_utils: check for NULL password
Fix a NULL pointer dereference and a memory leak: check if
screen_read_password() returns NULL, and don't call
mpd_sendPasswordCommand(NULL) in this case. Free the password
when done.
Fix a NULL pointer dereference and a memory leak: check if
screen_read_password() returns NULL, and don't call
mpd_sendPasswordCommand(NULL) in this case. Free the password
when done.
lirc: refactored event handler
* moved lirc_event to lirc.c and split out the parts that depend on
variables in main.c into three separate functions
* changed keyboard_event accordingly to avoid duplicate code
* merged lirc_event with ncmpc_lirc_get_command
* moved lirc_event to lirc.c and split out the parts that depend on
variables in main.c into three separate functions
* changed keyboard_event accordingly to avoid duplicate code
* merged lirc_event with ncmpc_lirc_get_command
configure.ac: require autoconf 2.60
mpdclient: use g_utf8_collate()
Use one g_utf8_collate() call instead of g_utf8_collate_key() twice
plus strcmp().
Use one g_utf8_collate() call instead of g_utf8_collate_key() twice
plus strcmp().
wreadln: return NULL instead of empty string
No wreadln() caller cares about an empty string. Simplify the callers
by returning NULL instead of an allocated empty string. This fixes
several memory leaks.
No wreadln() caller cares about an empty string. Simplify the callers
by returning NULL instead of an allocated empty string. This fixes
several memory leaks.
mpdclient: removed _utf8 suffix from function names
All functions must receive UTF-8 file names. Delete all which still
work with locale strings, and remove the _utf8 suffix from the others.
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 strings
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.
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_search: fixed 2 memory leaks
Free the old pattern before prompting for a new one. Free the old
filelist object before retrieving the new one.
Free the old pattern before prompting for a new one. Free the old
filelist object before retrieving the new one.
screen_play: free the wreadln() return value
screen_browser: free g_path_get_dirname() return value
The function browser_change_directory() did not free the return value
of g_path_get_dirname().
The function browser_change_directory() did not free the return value
of g_path_get_dirname().
screen_file: optimized title formula
Don't allocate and copy memory.
Don't allocate and copy memory.
main: optimized error_msg()
The pointer has already been checked for NULL, eliminate that check.
The pointer has already been checked for NULL, eliminate that check.
Makefile.am: added custom rule with -fwhole-program
To make the ncmpc binary even smaller, you can compile all sources at
once with "--combine -fwhole-program". Unfortunately, automake does
not support this mode. For further experiments, this patch adds a
custom rule which creates the binary named "ncmpc-tiny" this way.
To make the ncmpc binary even smaller, you can compile all sources at
once with "--combine -fwhole-program". Unfortunately, automake does
not support this mode. For further experiments, this patch adds a
custom rule which creates the binary named "ncmpc-tiny" this way.
configure.ac, Makefile.am: removed subversion keywords
Removed $Id$.
Removed $Id$.
disable more features with --enable-mini
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
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
configure.ac: remove misplaced comma
command.h: include config.h
The source command.h checks for configure.ac options, so it needs to
include config.h.
The source command.h checks for configure.ac options, so it needs to
include config.h.
charset: don't allocate GError
Since the GError return value of g_convert_*() is ignored by ncmpc, we
don't need to retrieve it at all.
Since the GError return value of g_convert_*() is ignored by ncmpc, we
don't need to retrieve it at all.
options: don't store disabled options
Options which are disabled at compile time shouldn't reserve space for
their values in the options struct.
Options which are disabled at compile time shouldn't reserve space for
their values in the options struct.
options: static initialization if possible
Initialize the options struct statically.
Initialize the options struct statically.
options: removed deprecated options
"reconnect" is always enabled. "debug" code has been removed.
"reconnect" is always enabled. "debug" code has been removed.
configure.ac: added --disable-help-screen
configure.ac: added --disable-nls
Option --disable-nls disables all NLS features, even if the system
supports it.
Option --disable-nls disables all NLS features, even if the system
supports it.
configure.ac: added option --enable-mini
The option --enable-mini disables lots of features, and tries to
create a ncmpc binary which fits on very small machines.
The option --enable-mini disables lots of features, and tries to
create a ncmpc binary which fits on very small machines.
configure.ac: renamed $use_wide to $enable_wide
configure.ac: removed deprecated result line
configure.ac: added LIRC configure switch
Detect liblircclient with pkg-config.
Detect liblircclient with pkg-config.
lirc: pass writable string to lirc_init()
The "prog" argument of lirc_init() expects a non-const string.
Pass a local string variable.
The "prog" argument of lirc_init() expects a non-const string.
Pass a local string variable.
native LIRC support for ncmpc
The attachment includes the patch and a sample .lircrc config for
testing purposes (i. e. only a few commands are mapped to IR events).
The config is rather simple to write: For each button add a block like
this to ~/.lircrc:
begin
button = <button name from /etc/lircd.conf>
prog = ncmpc
config = <command name from src/command.c>
end
The patch is not finished, there are several problems that still need to
be solved:
1. the configure.ac modifications are just for testing purposes and
should be made optional with a parameter like --enable-lirc
for ./configure. Unfortunately I'm not an expert on autoconfig tools.
2. LIRC example code [1] suggests looping over lirc_code2char, probably
to have multiple actions that can be triggered from one button. Perhaps
lirc_event(...) should be moved to lirc.c and be heavily modified, no
longer being a mere copy of keyboard_event(...).
The attachment includes the patch and a sample .lircrc config for
testing purposes (i. e. only a few commands are mapped to IR events).
The config is rather simple to write: For each button add a block like
this to ~/.lircrc:
begin
button = <button name from /etc/lircd.conf>
prog = ncmpc
config = <command name from src/command.c>
end
The patch is not finished, there are several problems that still need to
be solved:
1. the configure.ac modifications are just for testing purposes and
should be made optional with a parameter like --enable-lirc
for ./configure. Unfortunately I'm not an expert on autoconfig tools.
2. LIRC example code [1] suggests looping over lirc_code2char, probably
to have multiple actions that can be triggered from one button. Perhaps
lirc_event(...) should be moved to lirc.c and be heavily modified, no
longer being a mere copy of keyboard_event(...).
Makefile.am: require automake 1.9
Makefile.am uses several features which are not available in the
ancient automake version 1.6. Let's just raise the bar to 1.9.
Makefile.am uses several features which are not available in the
ancient automake version 1.6. Let's just raise the bar to 1.9.
configure.ac: disable libtool
libtool isn't required for the ncmpc build process, it only causes
massive slowdown.
libtool isn't required for the ncmpc build process, it only causes
massive slowdown.
configure.ac: disabled the C++ and fortran checks
Why check for C++ and fortran compilers? This hack was borrowed from
Qball's gmpc git repository.
Why check for C++ and fortran compilers? This hack was borrowed from
Qball's gmpc git repository.
screen_browser: fix warning when lyrics screen is disabled
A local variable was only used by the lyrics screen code. Put #ifdef
around its declaration.
A local variable was only used by the lyrics screen code. Put #ifdef
around its declaration.
wreadln: support wide characters
wreadln() didn't distinguish narrow from wide characters, which
resulted in display corruption. This patch adds a lot of internal
conversions between byte positions, screen positions and character
position, which hopefully fixes all these bugs. Since these
conversions are quite expensive, the code should be revised and
optimized.
wreadln() didn't distinguish narrow from wide characters, which
resulted in display corruption. This patch adds a lot of internal
conversions between byte positions, screen positions and character
position, which hopefully fixes all these bugs. Since these
conversions are quite expensive, the code should be revised and
optimized.
wreadln: wait for complete multibyte sequence in wreadln_insert_byte()
For multibyte input, we should use wget_wch(), but this function isn't
supported properly on some platforms. Add a patch which completes a
multibyte character with multiple non-blocking reads. We'll see how
portable this hack is...
For multibyte input, we should use wget_wch(), but this function isn't
supported properly on some platforms. Add a patch which completes a
multibyte character with multiple non-blocking reads. We'll see how
portable this hack is...
wreadln: don't use cursor_move_right() in insert_byte()
After a byte has been inserted, move the cursor right by just one
byte, not one character. The byte may have been the first one in a
multibyte character.
After a byte has been inserted, move the cursor right by just one
byte, not one character. The byte may have been the first one in a
multibyte character.
configure.ac: added option --disable-wide
The configure option "--disable-wide" disables wide character support.
This simplifies lots of internal calculations and makes the ncmpc
binary leaner.
The configure option "--disable-wide" disables wide character support.
This simplifies lots of internal calculations and makes the ncmpc
binary leaner.
include ncursesw/ncurses.h if available
When compiling with libncursesw, include <ncursesw/ncurses.h> instead
of <ncurses.h> (if available).
When compiling with libncursesw, include <ncursesw/ncurses.h> instead
of <ncurses.h> (if available).