aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-09-18use the glib main event loopMax Kellermann1-72/+154
This big patch replaces our custom main loop with the event based glib main loop. This has several advantages: we can make all the tiny code bits in the main loop independent from each others, we can add additional file descriptors for polling (e.g. the mpdclient socket). We don't need the ncurses timeout() anymore, because glib will poll stdin for us.
2008-09-18main: connect while UI is displayedMax Kellermann1-39/+21
Display the UI always, and show connection errors there. This fixes a lot of consistency problems: error messages used to be printed to stderr, but afterwards, the atexit() handlers deinitialized ncurses and the screen was cleared. This patch is still problematic, but constitutes a good step forward.
2008-09-17code style, indent with tabs IVMax Kellermann1-56/+56
Follow the same code style als MPD itself.
2008-09-17make several functions return voidMax Kellermann1-1/+1
2008-09-16lyrics: converted in-process plugins to external programsMax Kellermann1-2/+2
In-process plugins are very problematic. It is much easier and flexible to move the lyrics plugins to external programs, with a trivial protocol. This is work in progress, among the things missing: - protocol specification, including exit codes - plugin installation - plugin search directory - run-time configuration (currently hard coded) - automatic polling (using glib's main loop?) - better and more robust error handling
2008-09-16code style, indent with tabs IIMax Kellermann1-14/+11
Follow the same code style als MPD itself.
2008-09-15fix unused parameter warningsMax Kellermann1-6/+5
Add the "unused" attribute to all function parameters which are indeed going to be ignored.
2008-09-15don't declare local variable "options"Max Kellermann1-13/+12
In main.c, the global variable "options" is used all over, except in main(), which contains a shadowing declaration of it. Remove this local variable, and use the global "options" instead. Also don't pollute conf.c's namespace with the global variable with a CPP hack (to be removed when we have fixed more of ncmpc's namespace pollution).
2008-09-15include cleanupMax Kellermann1-8/+5
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-3/+4
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-4/+4
Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
2008-09-15use !NDEBUG instead of DEBUGMax Kellermann1-1/+1
NDEBUG is more commonly used than DEBUG, e.g. in assert.h. Convert all macros to NDEBUG, and declare NDEBUG when debugging is disabled.
2008-09-15code style, indent with tabsMax Kellermann1-195/+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-7/+0
Also remove some commented code and unused function parameters.
2008-09-15splash: removed the useless splash screenMax Kellermann1-2/+0
The code looks strange and spews lots of warnings. Since it does nothing useful, and wastes the user's precious time, simply remove it.
2007-02-16way too much stuff to describe hereAndreas Obergrusberger1-0/+1
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-01lyrics updates, leoslyrics fixesAndreas Obergrusberger1-0/+1
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5314 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-05fix user plugin dir; code cleanupAndreas Obergrusberger1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5220 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-03added a plugin system for lyrics sourcesAndreas Obergrusberger1-0/+3
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5217 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-10-28filelist sorting improvedAndreas Obergrusberger1-0/+2
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4953 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-09-07due to bensonk's demand i added a splash screen.Andreas Obergrusberger1-3/+10
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4741 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-04the updated sourcesAndreas Obergrusberger1-1/+18
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4543 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-06-01Fixes #0000406, segfault if mpd wants a passwort but ncmpc connects withoutKalle Wallin1-0/+7
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3304 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-02-13Fixes bug #0000360Kalle Wallin1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2948 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-13Use glib's str functions (g_strlcat, g_strlcpy, g_snprintf, g_strdup_vprintf)Kalle Wallin1-3/+3
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1868 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-13Use my_wgetch() instead of wgetch(), added --[no-]mouse optionKalle Wallin1-0/+1
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1864 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-12Support SIGSTOP, SIGCONT in raw modeKalle Wallin1-1/+13
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1858 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-12Added SIGCONT handlerKalle Wallin1-2/+18
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1856 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-03Replaced the debug macro with a functionKalle Wallin1-0/+18
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1780 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-30Added flags for conflicting, modified key bindings - check_key_bindings()Kalle Wallin1-2/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1743 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-24Removed an unwanter fprintf lineKalle Wallin1-1/+0
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1649 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-24Made the xterm title dynamic, added configuration option xterm-title-formatKalle Wallin1-5/+33
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1648 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-24Renamed mpd version macroKalle Wallin1-5/+5
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1643 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-22added screen_bell() for optional audible/visible bellsKalle Wallin1-6/+8
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-20Dont set the xterm titleKalle Wallin1-2/+3
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1582 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-19display errors without exiting when key bindings are brokenKalle Wallin1-7/+14
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1564 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-15git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1497 ↵Kalle Wallin1-2/+13
09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-14Updated error handlingKalle Wallin1-10/+29
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1492 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-14Major cleanup of the mpd client code (mpc->mpdclient)Kalle Wallin1-47/+62
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1481 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-09Updated the reconnect code to allow user to abort in raw modeKalle Wallin1-4/+6
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1422 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-06Added wreadln.c, wreadln.h a simple line editorKalle Wallin1-6/+5
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1351 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-06Moved charset initialization code to main.c, added bind_textdomain_codeset()Kalle Wallin1-5/+15
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1350 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05Added initial i18n supportKalle Wallin1-12/+13
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05Changed directory layout (for future use of gettext)Kalle Wallin1-0/+0
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1342 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-07Redesigned ncmpc's color supportKalle Wallin1-1/+4
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@937 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-21Fixed resize handling (SIGWINCH).Kalle Wallin1-9/+0
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@871 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-21Added screen_idle() function.Kalle Wallin1-0/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@863 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-19Added copyright notice and license noticeKalle Wallin1-0/+18
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@833 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14Check key bindings and quit if they are insane.Kalle Wallin1-1/+8
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@753 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-13Poll mpd twice/second, print a newline when exiting.Kalle Wallin1-1/+2
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@733 09075e82-0dd4-0310-85a5-a0d7c8717e4f