summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed358ad)
raw | patch | inline | side by side (parent: ed358ad)
author | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Wed, 8 Nov 2006 15:10:37 +0000 (15:10 +0000) | ||
committer | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Wed, 8 Nov 2006 15:10:37 +0000 (15:10 +0000) |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5034 09075e82-0dd4-0310-85a5-a0d7c8717e4f
ChangeLog | patch | blob | history | |
po/ncmpc.pot | patch | blob | history | |
src/command.c | patch | blob | history | |
src/command.h | patch | blob | history | |
src/screen_file.c | patch | blob | history | |
src/screen_help.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 557279db5be100daa663080834aa336bfab48271..a02f43df3c0f25f13f24d8d3d0a106cfc4e88e79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-11-8 Andreas Obergrusberger <tradiaz@yahoo.de>
+ * Daniel added the functionality to go to
+ the parent and root directory via shortcu
+ * updated ncmpc.pot
+
2006-11-5 Andreas Obergrusberger <tradiaz@yahoo.de>
* spanish translation updated
diff --git a/po/ncmpc.pot b/po/ncmpc.pot
index d4e7990ec316a4c0bbb2a937237b9fad2d649d73..25e0edc9fa80c7ccf1aef705f57633b94062cc1d 100644 (file)
--- a/po/ncmpc.pot
+++ b/po/ncmpc.pot
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-08-07 11:40+0000\n"
+"POT-Creation-Date: 2006-11-08 17:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "n"
msgstr ""
-#: src/main.c:133 src/main.c:140
+#: src/main.c:134 src/main.c:141
msgid "Exiting..."
msgstr ""
-#: src/main.c:290
+#: src/main.c:300
#, c-format
msgid "Error: MPD version %d.%d.%d is to old (0.11.0 needed).\n"
msgstr ""
-#: src/main.c:342
+#: src/main.c:351
#, c-format
msgid "Connecting to %s... [Press %s to abort]"
msgstr ""
-#: src/main.c:354
+#: src/main.c:363
#, c-format
msgid "Connected to %s!"
msgstr ""
msgid "[Paused]"
msgstr ""
-#: src/screen.c:471 src/screen.c:580
+#: src/screen.c:471 src/screen.c:579
#, c-format
msgid "Error: Screen to small!\n"
msgstr ""
-#: src/screen.c:732
+#: src/screen.c:736
msgid "Repeat is on"
msgstr ""
-#: src/screen.c:733
+#: src/screen.c:737
msgid "Repeat is off"
msgstr ""
-#: src/screen.c:736
+#: src/screen.c:740
msgid "Random is on"
msgstr ""
-#: src/screen.c:737
+#: src/screen.c:741
msgid "Random is off"
msgstr ""
-#: src/screen.c:740
+#: src/screen.c:744
#, c-format
msgid "Crossfade %d seconds"
msgstr ""
-#: src/screen.c:743
+#: src/screen.c:747
msgid "Database updated!"
msgstr ""
-#: src/screen.c:905
+#: src/screen.c:909
msgid "Shuffled playlist!"
msgstr ""
-#: src/screen.c:909
+#: src/screen.c:913
msgid "Cleared playlist!"
msgstr ""
-#: src/screen.c:927 src/screen_file.c:655
+#: src/screen.c:931 src/screen_file.c:687
msgid "Database update started!"
msgstr ""
-#: src/screen.c:930 src/screen_file.c:663
+#: src/screen.c:934 src/screen_file.c:695
msgid "Database update running..."
msgstr ""
-#: src/screen.c:943
+#: src/screen.c:947
msgid "Find mode: Wrapped"
msgstr ""
-#: src/screen.c:944
+#: src/screen.c:948
msgid "Find mode: Normal"
msgstr ""
-#: src/screen.c:949
+#: src/screen.c:953
msgid "Auto center mode: On"
msgstr ""
-#: src/screen.c:950
+#: src/screen.c:954
msgid "Auto center mode: Off"
msgstr ""
msgid "Find backward: "
msgstr ""
-#: src/screen_utils.c:166
+#: src/screen_utils.c:128
+msgid "Password: "
+msgstr ""
+
+#: src/screen_utils.c:214
#, c-format
msgid "Unable to find '%s'"
msgstr ""
msgid "Replace %s [%s/%s] ? "
msgstr ""
-#: src/screen_play.c:200 src/screen_file.c:313 src/screen_keydef.c:162
+#: src/screen_play.c:200 src/screen_file.c:326 src/screen_keydef.c:162
msgid "Aborted!"
msgstr ""
msgid "Playlist on %s"
msgstr ""
-#: src/screen_file.c:256
+#: src/screen_file.c:269
#, c-format
msgid "Loading playlist %s..."
msgstr ""
-#: src/screen_file.c:298
+#: src/screen_file.c:311
msgid "You can only delete playlists!"
msgstr ""
-#: src/screen_file.c:305
+#: src/screen_file.c:318
#, c-format
msgid "Delete playlist %s [%s/%s] ? "
msgstr ""
-#: src/screen_file.c:321
+#: src/screen_file.c:334
msgid "Playlist deleted!"
msgstr ""
-#: src/screen_file.c:340 src/screen_file.c:461 src/screen_file.c:487
+#: src/screen_file.c:353 src/screen_file.c:474 src/screen_file.c:500
#, c-format
msgid "Adding '%s' to playlist\n"
msgstr ""
-#: src/screen_file.c:391
+#: src/screen_file.c:404
#, c-format
msgid "Adding directory %s...\n"
msgstr ""
-#: src/screen_file.c:552
+#: src/screen_file.c:574
#, c-format
-msgid "Browse: %s"
+msgid "Browse: %s%s%s"
msgstr ""
-#: src/screen_file.c:644
+#: src/screen_file.c:676
msgid "Screen updated!"
msgstr ""
-#: src/screen_file.c:652
+#: src/screen_file.c:684
#, c-format
msgid "Database update of %s started!"
msgstr ""
msgid "Delete playlist"
msgstr ""
-#: src/screen_help.c:121
+#: src/screen_help.c:123
msgid "Keys - Search screen"
msgstr ""
-#: src/screen_help.c:123
+#: src/screen_help.c:125
msgid "Search"
msgstr ""
-#: src/screen_help.c:124
+#: src/screen_help.c:126
msgid "Select and play"
msgstr ""
-#: src/screen_help.c:131
+#: src/screen_help.c:133
msgid "Keys - Lyrics screen"
msgstr ""
-#: src/screen_help.c:133
+#: src/screen_help.c:135
msgid "View Lyrics"
msgstr ""
-#: src/screen_help.c:134
+#: src/screen_help.c:136
msgid "(Re)load lyrics"
msgstr ""
-#: src/screen_help.c:135
+#: src/screen_help.c:137
msgid "Interrupt retrieval"
msgstr ""
-#: src/screen_help.c:136
+#: src/screen_help.c:138
msgid "Explicitly download lyrics"
msgstr ""
-#: src/screen_help.c:137
+#: src/screen_help.c:139
msgid "Save lyrics"
msgstr ""
-#: src/screen_help.c:220
+#: src/screen_help.c:222
msgid "Help"
msgstr ""
-#: src/screen_lyrics.c:479
+#: src/screen_lyrics.c:482
msgid "Lyrics [No connection]"
msgstr ""
-#: src/screen_lyrics.c:480
+#: src/screen_lyrics.c:483
msgid "Lyrics [Not found]"
msgstr ""
-#: src/screen_lyrics.c:483
+#: src/screen_lyrics.c:486
msgid "Lyrics [retrieving]"
msgstr ""
-#: src/screen_lyrics.c:565
+#: src/screen_lyrics.c:567
msgid "Lyrics saved!"
msgstr ""
msgid "Add url/file to playlist"
msgstr ""
+#: src/command.c:141
+msgid "Go to root directory"
+msgstr ""
+
#: src/command.c:143
+msgid "Go to parent directory"
+msgstr ""
+
+#: src/command.c:147
msgid "Move item up"
msgstr ""
-#: src/command.c:145
+#: src/command.c:149
msgid "Move item down"
msgstr ""
-#: src/command.c:147
+#: src/command.c:151
msgid "Update screen"
msgstr ""
-#: src/command.c:152
+#: src/command.c:156
msgid "Toggle find mode"
msgstr ""
-#: src/command.c:154
+#: src/command.c:158
msgid "Toggle auto center mode"
msgstr ""
-#: src/command.c:159
+#: src/command.c:163
msgid "Next screen"
msgstr ""
-#: src/command.c:161
+#: src/command.c:165
msgid "Previous screen"
msgstr ""
-#: src/command.c:166
+#: src/command.c:170
msgid "Forward find"
msgstr ""
-#: src/command.c:168
+#: src/command.c:172
msgid "Forward find next"
msgstr ""
-#: src/command.c:170
+#: src/command.c:174
msgid "Backward find"
msgstr ""
-#: src/command.c:172
+#: src/command.c:176
msgid "Backward find previous"
msgstr ""
-#: src/command.c:178
+#: src/command.c:182
msgid "Artist screen"
msgstr ""
-#: src/command.c:182
+#: src/command.c:186
msgid "Search screen"
msgstr ""
-#: src/command.c:184
+#: src/command.c:188
msgid "Change search mode"
msgstr ""
-#: src/command.c:189
+#: src/command.c:193
msgid "Clock screen"
msgstr ""
-#: src/command.c:193
+#: src/command.c:197
msgid "Lyrics screen"
msgstr ""
-#: src/command.c:195
+#: src/command.c:199
msgid "Interrupt action"
msgstr ""
-#: src/command.c:197
+#: src/command.c:201
msgid "Update Lyrics"
msgstr ""
-#: src/command.c:220
+#: src/command.c:224
msgid "Undefined"
msgstr ""
-#: src/command.c:222
+#: src/command.c:226
msgid "Space"
msgstr ""
-#: src/command.c:224
+#: src/command.c:228
msgid "Enter"
msgstr ""
-#: src/command.c:226
+#: src/command.c:230
msgid "Backspace"
msgstr ""
-#: src/command.c:228
+#: src/command.c:232
msgid "Delete"
msgstr ""
-#: src/command.c:230
+#: src/command.c:234
msgid "Up"
msgstr ""
-#: src/command.c:232
+#: src/command.c:236
msgid "Down"
msgstr ""
-#: src/command.c:234
+#: src/command.c:238
msgid "Left"
msgstr ""
-#: src/command.c:236
+#: src/command.c:240
msgid "Right"
msgstr ""
-#: src/command.c:238
+#: src/command.c:242
msgid "Home"
msgstr ""
-#: src/command.c:240
+#: src/command.c:244
msgid "End"
msgstr ""
-#: src/command.c:242
+#: src/command.c:246
msgid "PageDown"
msgstr ""
-#: src/command.c:244
+#: src/command.c:248
msgid "PageUp"
msgstr ""
-#: src/command.c:246
+#: src/command.c:250
msgid "Tab"
msgstr ""
-#: src/command.c:248
+#: src/command.c:252
msgid "Shift+Tab"
msgstr ""
-#: src/command.c:250
+#: src/command.c:254
msgid "Esc"
msgstr ""
-#: src/command.c:252
+#: src/command.c:256
msgid "Insert"
msgstr ""
-#: src/command.c:502
+#: src/command.c:506
#, c-format
msgid "Key %s assigned to %s and %s (press %s for the key editor)"
msgstr ""
-#: src/command.c:509 src/command.c:516
+#: src/command.c:513 src/command.c:520
#, c-format
msgid "Error: Key %s assigned to %s and %s !!!\n"
msgstr ""
diff --git a/src/command.c b/src/command.c
index 2f0ece1d9243ee0d265d96195d011e50fbb5be91..3210f39d9bb242e2a8a314831caac37ed802cb83 100644 (file)
--- a/src/command.c
+++ b/src/command.c
{ { 'a', 0, 0 }, 0, CMD_ADD, "add",
N_("Add url/file to playlist") },
+ { { '!', 0, 0 }, 0, CMD_GO_ROOT_DIRECTORY, "go-root-directory",
+ N_("Go to root directory") },
+ { { '"', 0, 0 }, 0, CMD_GO_PARENT_DIRECTORY, "go-parent-directory",
+ N_("Go to parent directory") },
/* lists */
{ { 11, 0, 0 }, 0, CMD_LIST_MOVE_UP, "move-up",
diff --git a/src/command.h b/src/command.h
index 86db34ce9f8384f3fb53dbb23262e8537531d612..745b5283bb4107e78f15d7f712927c8ee2d422b9 100644 (file)
--- a/src/command.h
+++ b/src/command.h
CMD_SCREEN_LYRICS,
CMD_LYRICS_UPDATE,
CMD_INTERRUPT,
+ CMD_GO_ROOT_DIRECTORY,
+ CMD_GO_PARENT_DIRECTORY,
CMD_QUIT
} command_t;
diff --git a/src/screen_file.c b/src/screen_file.c
index b2d320f0bcafcd45d89f435b5f50d3943ca133c0..4a4bdf70c1bcb0b65b5842cf5ba1c2d13a71bbbd 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
/* chdir */
static int
-change_directory(screen_t *screen, mpdclient_t *c, filelist_entry_t *entry)
+change_directory(screen_t *screen, mpdclient_t *c, filelist_entry_t *entry, char *new_path)
{
- mpd_InfoEntity *entity = entry->entity;
+ mpd_InfoEntity *entity = NULL;
gchar *path = NULL;
+ if( entry!=NULL )
+ entity = entry->entity;
+ else if( new_path==NULL )
+ return -1;
+
if( entity==NULL )
{
- /* return to parent */
- char *parent = g_path_get_dirname(filelist->path);
- if( strcmp(parent, ".") == 0 )
+ if( entry || 0==strcmp(new_path, "..") )
+ {
+ /* return to parent */
+ char *parent = g_path_get_dirname(filelist->path);
+ if( strcmp(parent, ".") == 0 )
+ {
+ parent[0] = '\0';
+ }
+ path = g_strdup(parent);
+ }
+ else
{
- parent[0] = '\0';
+ /* entry==NULL, then new_path ("" is root) */
+ path = g_strdup(new_path);
}
- path = g_strdup(parent);
list_window_reset(lw);
/* restore previous list window state */
list_window_pop_state(lw_state,lw);
entity = entry->entity;
if( entity==NULL || entity->type==MPD_INFO_ENTITY_TYPE_DIRECTORY )
- return change_directory(screen, c, entry);
+ return change_directory(screen, c, entry, NULL);
else if( entity->type==MPD_INFO_ENTITY_TYPE_PLAYLISTFILE )
return load_playlist(screen, c, entry);
else if( entity->type==MPD_INFO_ENTITY_TYPE_SONG )
case CMD_PLAY:
browse_handle_enter(screen, c, lw, filelist);
return 1;
+ case CMD_GO_ROOT_DIRECTORY:
+ return change_directory(screen, c, NULL, "");
+ break;
+ case CMD_GO_PARENT_DIRECTORY:
+ return change_directory(screen, c, NULL, "..");
+ break;
case CMD_SELECT:
if( browse_handle_select(screen, c, lw, filelist) == 0 )
{
diff --git a/src/screen_help.c b/src/screen_help.c
index 31a125a7f709811d1cda2113a8c82667cda21820..6825e567b3f9ceee85a02eb77e6717f949874cb0 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
{ 0, CMD_PLAY, N_("Play") },
{ 0, CMD_DELETE, NULL },
{ 0, CMD_CLEAR, NULL },
- { 0, CMD_LIST_MOVE_UP, N_("Move song up") },
+ { 1, CMD_LIST_MOVE_UP, N_("Move song up") },
{ 0, CMD_LIST_MOVE_DOWN, N_("Move song down") },
{ 0, CMD_ADD, NULL },
{ 0, CMD_SAVE_PLAYLIST, NULL },
{ 0, CMD_SELECT, NULL },
{ 0, CMD_SAVE_PLAYLIST, NULL },
{ 0, CMD_DELETE, N_("Delete playlist") },
+ { 0, CMD_GO_PARENT_DIRECTORY, NULL },
+ { 0, CMD_GO_ROOT_DIRECTORY, NULL },
{ 0, CMD_SCREEN_UPDATE, NULL },
#ifdef ENABLE_SEARCH_SCREEN