From cad3e3407ce71e3ba82f7f8158e9ab7505e85a1f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 6 Jan 2009 18:21:30 +0100 Subject: [PATCH] screen_browser: removed "OLD_ADD" code The code was disabled via CPP. --- po/da.po | 15 +++++------- po/de.po | 15 +++++------- po/es.po | 15 +++++------- po/fr.po | 15 +++++------- po/gl.po | 15 +++++------- po/hu.po | 15 +++++------- po/ncmpc.pot | 12 +++------ po/no.po | 15 +++++------- po/ru.po | 15 +++++------- po/sk.po | 15 +++++------- po/sv.po | 15 +++++------- src/screen_browser.c | 58 ++------------------------------------------ 12 files changed, 65 insertions(+), 155 deletions(-) diff --git a/po/da.po b/po/da.po index 2a1e322..ea024f9 100644 --- a/po/da.po +++ b/po/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:13+0100\n" "Last-Translator: Niels Anker \n" "Language-Team: da \n" @@ -181,22 +181,16 @@ msgstr "Album: %s - %s" msgid "All tracks of artist: %s" msgstr "Alle spor fra kunstneren: %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "Henter %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "Tilføjer '%s' til listen" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Tilføjer mappen %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Søg: " @@ -931,6 +925,9 @@ msgstr "" " Mikkel Kirkgaard Nielsen https://launchpad.net/~ncmpc\n" " Niels Anker https://launchpad.net/~nanker" +#~ msgid "Adding directory %s...\n" +#~ msgstr "Tilføjer mappen %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "Tast %s bundet til kommando %s og %s (tryk pÃ¥ %s for at redigere)" diff --git a/po/de.po b/po/de.po index 58c4e0d..c47ba66 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:14+0100\n" "Last-Translator: Monika Brinkert \n" "Language-Team: de \n" @@ -181,22 +181,16 @@ msgstr "Album: %s - %s" msgid "All tracks of artist: %s" msgstr "Alle Lieder des Künstlers: %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "Lade Playlist %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "Füge '%s' der Playlist hinzu" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Füge Verzeichnis %s hinzu...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Suche: " @@ -928,6 +922,9 @@ msgstr "Unbekannter Konfigurationsparameter" msgid "translator-credits" msgstr "" +#~ msgid "Adding directory %s...\n" +#~ msgstr "Füge Verzeichnis %s hinzu...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "Taste %s ist %s und %s zugeordnet (drücke %s für den Tasteneditor)" diff --git a/po/es.po b/po/es.po index d581e63..677302a 100644 --- a/po/es.po +++ b/po/es.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:14+0100\n" "Last-Translator: Johám-Luís Miguéns Vila \n" "Language-Team: es\n" @@ -186,22 +186,16 @@ msgstr "Álbum: %s - %s" msgid "All tracks of artist: %s" msgstr "Todas las pistas del artista: %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "Cargando la lista %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "Añadiendo '%s' a la lista de canciones" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Añadiendo directorio %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Buscar:" @@ -933,6 +927,9 @@ msgstr "Parámetro de configuración desconocido" msgid "translator-credits" msgstr "ashtophet" +#~ msgid "Adding directory %s...\n" +#~ msgstr "Añadiendo directorio %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "" #~ "Tecla %s asignada a %s y %s (pressiona %s para accer al editor de teclas)" diff --git a/po/fr.po b/po/fr.po index 00da49b..7b33b13 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:15+0100\n" "Last-Translator: Yann Cézard \n" "Language-Team: fr \n" @@ -179,22 +179,16 @@ msgstr "Album: %s - %s" msgid "All tracks of artist: %s" msgstr "Toutes les pistes de l'artiste : %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "Chargement de la liste de lecture %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "Ajout de '%s' à la liste de lecture" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Ajout du répertoire %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Trouver: " @@ -926,6 +920,9 @@ msgstr "Paramètre de configuration inconnu" msgid "translator-credits" msgstr "Traduction française : Yann Cézard " +#~ msgid "Adding directory %s...\n" +#~ msgstr "Ajout du répertoire %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "" #~ "La touche %s est assignée à %s et à %s (appuyez sur %s pour l'éditeur de " diff --git a/po/gl.po b/po/gl.po index 4e93ee3..c45ab49 100644 --- a/po/gl.po +++ b/po/gl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:15+0100\n" "Last-Translator: Johám-Luís Miguéns Vila \n" "Language-Team: galician\n" @@ -181,22 +181,16 @@ msgstr "Álbum: %s - %s" msgid "All tracks of artist: %s" msgstr "Todas as pistas do artista: %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "A carregar a lista %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "A engadir '%s' à lista" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Engadindo o cartafol %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Procurar" @@ -928,6 +922,9 @@ msgstr "Parâmetro de configuraçom desconhecido" msgid "translator-credits" msgstr "ashtophet" +#~ msgid "Adding directory %s...\n" +#~ msgstr "Engadindo o cartafol %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "" #~ "A tecla %s assignou-se a %s e a %s (preme %s para ir ao editor de atalhos)" diff --git a/po/hu.po b/po/hu.po index 5054277..d0afb49 100644 --- a/po/hu.po +++ b/po/hu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:16+0100\n" "Last-Translator: Laszlo Ashin \n" "Language-Team: Hungarian \n" @@ -181,22 +181,16 @@ msgstr "Album: %s - %s" msgid "All tracks of artist: %s" msgstr "%s előadó minden száma" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "%s lejátszólista betöltése..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "'%s' hozzáadása a lejátszólistához" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "%s könyvtár hozzáadása...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Keresés: " @@ -930,6 +924,9 @@ msgstr "" "Launchpad Contributions:\n" " Laszlo Ashin https://launchpad.net/~kodest" +#~ msgid "Adding directory %s...\n" +#~ msgstr "%s könyvtár hozzáadása...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "" #~ "%s gomb hozzárendelve a következőkhöz: %s és %s (nyomj %s-t a " diff --git a/po/ncmpc.pot b/po/ncmpc.pot index ea777a3..4b288c5 100644 --- a/po/ncmpc.pot +++ b/po/ncmpc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -180,22 +180,16 @@ msgstr "" msgid "All tracks of artist: %s" msgstr "" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "" -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "" - #: src/screen_utils.c:32 msgid "Find: " msgstr "" diff --git a/po/no.po b/po/no.po index 2d9ea3d..faf07a3 100644 --- a/po/no.po +++ b/po/no.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:17+0100\n" "Last-Translator: Ole R. Thorsen \n" "Language-Team: no \n" @@ -181,22 +181,16 @@ msgstr "" msgid "All tracks of artist: %s" msgstr "" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "Henter spilleliste %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "Legger '%s' til spillelisten" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Legger til mappen %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Søk: " @@ -941,6 +935,9 @@ msgstr "Tastaturkonfigurasjon" msgid "translator-credits" msgstr "" +#~ msgid "Adding directory %s...\n" +#~ msgstr "Legger til mappen %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "%s tildelt kommandoen %s og %s (trykk %s for Ã¥ rette)" diff --git a/po/ru.po b/po/ru.po index aa15017..7ca18d7 100644 --- a/po/ru.po +++ b/po/ru.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:17+0100\n" "Last-Translator: Max Arnold \n" "Language-Team: ru \n" @@ -181,22 +181,16 @@ msgstr " msgid "All tracks of artist: %s" msgstr "÷ÓÅ ËÏÍÐÏÚÉÃÉÉ ÉÓÐÏÌÎÉÔÅÌÑ: %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "úÁÇÒÕÖÁÅÔÓÑ ÐÌÅÊÌÉÓÔ %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "÷ ÐÌÅÊÌÉÓÔ ÄÏÂÁ×ÌÑÅÔÓÑ '%s'" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "äÏÂÁ×ÌÑÅÔÓÑ ÄÉÒÅËÔÏÒÉÑ %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "ðÏÉÓË: " @@ -931,6 +925,9 @@ msgstr " msgid "translator-credits" msgstr "ðÅÒÅ×ÏÄ: Max Arnold " +#~ msgid "Adding directory %s...\n" +#~ msgstr "äÏÂÁ×ÌÑÅÔÓÑ ÄÉÒÅËÔÏÒÉÑ %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "ëÌÁ×ÉÛÁ %s ÎÁÚÎÁÞÅÎÁ ÄÌÑ %s É %s (%s - ÒÅÄÁËÔÏÒ ËÌÁ×ÉÛ)" diff --git a/po/sk.po b/po/sk.po index 45e31d3..e6b9e9a 100644 --- a/po/sk.po +++ b/po/sk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.11.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:18+0100\n" "Last-Translator: Jozef Riha \n" "Language-Team: sk \n" @@ -179,22 +179,16 @@ msgstr "Album: %s - %s" msgid "All tracks of artist: %s" msgstr "VÅ¡etky stopy od interpreta: %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "Nahrávam playlist %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "Pridávam '%s' do playlistu" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Pridávam adresár %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "VyhľadaÅ¥: " @@ -926,6 +920,9 @@ msgstr "Neznámy parameter konfigurácie" msgid "translator-credits" msgstr "Jozef Riha " +#~ msgid "Adding directory %s...\n" +#~ msgstr "Pridávam adresár %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "Kláves %s priradený k %s a %s (stlačte %s pre editor klávesov)" diff --git a/po/sv.po b/po/sv.po index 00958ec..69d4876 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ncmpc 0.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-06 18:12+0100\n" +"POT-Creation-Date: 2009-01-06 18:21+0100\n" "PO-Revision-Date: 2009-01-06 18:18+0100\n" "Last-Translator: Björn Pettersson \n" "Language-Team: sv \n" @@ -181,22 +181,16 @@ msgstr "Album: %s - %s" msgid "All tracks of artist: %s" msgstr "Alla spÃ¥r av artist: %s" -#: src/screen_browser.c:238 +#: src/screen_browser.c:236 #, c-format msgid "Loading playlist %s..." msgstr "Laddar spellista %s..." -#: src/screen_browser.c:261 src/screen_browser.c:371 src/screen_browser.c:397 +#: src/screen_browser.c:259 src/screen_browser.c:317 src/screen_browser.c:343 #, c-format msgid "Adding '%s' to playlist" msgstr "Lägger till '%s' till spellista" -#. translators: a directory is being added the to playlist -#: src/screen_browser.c:316 -#, c-format -msgid "Adding directory %s...\n" -msgstr "Lägger till katalog %s...\n" - #: src/screen_utils.c:32 msgid "Find: " msgstr "Sök: " @@ -932,6 +926,9 @@ msgstr "" " Kalle Wallin https://launchpad.net/~kaw\n" " nanker https://launchpad.net/~nanker" +#~ msgid "Adding directory %s...\n" +#~ msgstr "Lägger till katalog %s...\n" + #~ msgid "Key %s assigned to %s and %s (press %s for the key editor)" #~ msgstr "%s tilldelat kommandona %s och %s (tryck pÃ¥ %s för att korrigera)" diff --git a/src/screen_browser.c b/src/screen_browser.c index fcc8ddb..3f1b5e3 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -26,8 +26,6 @@ #include -#undef USE_OLD_ADD - #define BUFSIZE 1024 #ifndef NCMPC_MINI @@ -300,56 +298,6 @@ browser_handle_enter(struct screen_browser *browser, mpdclient_t *c) return false; } - -#ifdef USE_OLD_ADD - -static int -add_directory(mpdclient_t *c, char *dir) -{ - mpd_InfoEntity *entity; - GList *subdir_list = NULL; - GList *list = NULL; - char *dirname; - - dirname = utf8_to_locale(dir); - /* translators: a directory is being added the to playlist */ - screen_status_printf(_("Adding directory %s...\n"), dirname); - doupdate(); - g_free(dirname); - dirname = NULL; - - mpd_sendLsInfoCommand(c->connection, dir); - mpd_sendCommandListBegin(c->connection); - while( (entity=mpd_getNextInfoEntity(c->connection)) ) { - if( entity->type==MPD_INFO_ENTITY_TYPE_SONG ) { - mpd_Song *song = entity->info.song; - mpd_sendAddCommand(c->connection, song->file); - mpd_freeInfoEntity(entity); - } else if( entity->type==MPD_INFO_ENTITY_TYPE_DIRECTORY ) { - subdir_list = g_list_append(subdir_list, (gpointer) entity); - } else - mpd_freeInfoEntity(entity); - } - mpd_sendCommandListEnd(c->connection); - mpdclient_finish_command(c); - c->need_update = TRUE; - - list = g_list_first(subdir_list); - while( list!=NULL ) { - mpd_Directory *dir; - - entity = list->data; - dir = entity->info.directory; - add_directory(c, dir->path); - mpd_freeInfoEntity(entity); - list->data=NULL; - list=list->next; - } - g_list_free(subdir_list); - return 0; -} -#endif - static bool browser_select_entry(mpdclient_t *c, filelist_entry_t *entry, G_GNUC_UNUSED gboolean toggle) @@ -362,16 +310,14 @@ browser_select_entry(mpdclient_t *c, filelist_entry_t *entry, if (entry->entity->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { mpd_Directory *dir = entry->entity->info.directory; -#ifdef USE_OLD_ADD - add_directory(c, tmp); -#else + if (mpdclient_cmd_add_path(c, dir->path) == 0) { char *tmp = utf8_to_locale(dir->path); screen_status_printf(_("Adding \'%s\' to playlist"), tmp); g_free(tmp); } -#endif + return true; } -- 2.30.2