Mercurial > mplayer.hg
changeset 35452:f42cc2361ee4
Cosmetic: Rename uiSetFileName().
author | ib |
---|---|
date | Sat, 01 Dec 2012 19:05:24 +0000 |
parents | 29f66b254dd7 |
children | c8f3bba6250a |
files | gui/interface.c gui/ui/actions.c gui/ui/actions.h gui/ui/gtk/fileselect.c gui/ui/gtk/playlist.c gui/ui/gtk/url.c gui/ui/main.c gui/win32/dialogs.c gui/win32/gui.c gui/win32/interface.c |
diffstat | 10 files changed, 32 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/interface.c Sat Dec 01 19:05:24 2012 +0000 @@ -239,7 +239,7 @@ playlist = listMgr(PLAYLIST_ITEM_GET_CURR, 0); if (playlist && !filename) { - uiSetFileName(playlist->path, playlist->name, STREAMTYPE_FILE); + uiSetFile(playlist->path, playlist->name, STREAMTYPE_FILE); filename = NULL; // don't start playing } @@ -419,7 +419,7 @@ char tmp[512]; sprintf(tmp, "cdda://%d", guiInfo.Track); - uiSetFileName(NULL, tmp, SAME_STREAMTYPE); + uiSetFile(NULL, tmp, SAME_STREAMTYPE); } break; @@ -428,7 +428,7 @@ char tmp[512]; sprintf(tmp, "vcd://%d", guiInfo.Track); - uiSetFileName(NULL, tmp, SAME_STREAMTYPE); + uiSetFile(NULL, tmp, SAME_STREAMTYPE); } break; @@ -437,7 +437,7 @@ char tmp[512]; sprintf(tmp, "dvd://%d", guiInfo.Track); - uiSetFileName(NULL, tmp, SAME_STREAMTYPE); + uiSetFile(NULL, tmp, SAME_STREAMTYPE); } #ifdef CONFIG_DVDREAD dvd_chapter = guiInfo.Chapter; @@ -782,7 +782,7 @@ next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0); if (guiInfo.Playing && next) { - uiSetFileName(next->path, next->name, STREAMTYPE_FILE); + uiSetFile(next->path, next->name, STREAMTYPE_FILE); guiInfo.NewPlay = GUI_FILE_NEW; guiInfo.Track++; } else { @@ -804,7 +804,7 @@ guiInfo.Angle = 0; guiInfo.RunningTime = 0; guiInfo.AudioChannels = 0; - uiSetFileName(NULL, NULL, STREAMTYPE_DUMMY); + uiSetFile(NULL, NULL, STREAMTYPE_DUMMY); } guiInfo.ElapsedTime = 0;
--- a/gui/ui/actions.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/ui/actions.c Sat Dec 01 19:05:24 2012 +0000 @@ -260,13 +260,13 @@ } /** - * @brief Set the current file name to be played. + * @brief Set the file to be played. * * @param dir directory (optional, else NULL) * @param name filename * @param type stream type of the file */ -void uiSetFileName(char *dir, char *name, int type) +void uiSetFile(char *dir, char *name, int type) { if (!dir) setdup(&guiInfo.Filename, name); @@ -304,7 +304,7 @@ curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0); if (curr) { - uiSetFileName(curr->path, curr->name, STREAMTYPE_FILE); + uiSetFile(curr->path, curr->name, STREAMTYPE_FILE); guiInfo.PlaylistNext = 0; break; } @@ -364,7 +364,7 @@ prev = listMgr(PLAYLIST_ITEM_GET_PREV, 0); if (prev) { - uiSetFileName(prev->path, prev->name, STREAMTYPE_FILE); + uiSetFile(prev->path, prev->name, STREAMTYPE_FILE); guiInfo.PlaylistNext = (guiInfo.Playing ? 0 : 1); guiInfo.Track--; break; @@ -420,7 +420,7 @@ next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0); if (next) { - uiSetFileName(next->path, next->name, STREAMTYPE_FILE); + uiSetFile(next->path, next->name, STREAMTYPE_FILE); guiInfo.PlaylistNext = (guiInfo.Playing ? 0 : 1); guiInfo.Track++; break;
--- a/gui/ui/actions.h Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/ui/actions.h Sat Dec 01 19:05:24 2012 +0000 @@ -28,7 +28,7 @@ void uiPlay(void); void uiPrev(void); void uiRelSeek(float percent); -void uiSetFileName(char *dir, char *name, int type); +void uiSetFile(char *dir, char *name, int type); void uiState(void); #endif /* MPLAYER_GUI_ACTIONS_H */
--- a/gui/ui/gtk/fileselect.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/ui/gtk/fileselect.c Sat Dec 01 19:05:24 2012 +0000 @@ -503,7 +503,7 @@ case fsVideoSelector: for (l = 0; fsVideoFilterNames[l][0]; l++) if (strcmp(fsVideoFilterNames[l][0], MSGTR_Filter_Playlists) == 0) break; - uiSetFileName( fsSelectedDirectory,fsSelectedFile, fsLastVideoFilterSelected == l ? STREAMTYPE_PLAYLIST : STREAMTYPE_FILE ); + uiSetFile( fsSelectedDirectory,fsSelectedFile, fsLastVideoFilterSelected == l ? STREAMTYPE_PLAYLIST : STREAMTYPE_FILE ); selected = g_strconcat(fsSelectedDirectory, "/", fsSelectedFile, NULL); if (selected) {
--- a/gui/ui/gtk/playlist.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/ui/gtk/playlist.c Sat Dec 01 19:05:24 2012 +0000 @@ -211,12 +211,12 @@ item = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); if ( item ) { - uiSetFileName( item->path,item->name,STREAMTYPE_FILE ); + uiSetFile( item->path,item->name,STREAMTYPE_FILE ); // setddup( &guiInfo.Filename,item->path,item->name ); // guiInfo.NewPlay=GUI_FILE_NEW; // guiInfo.StreamType=STREAMTYPE_FILE; } - else if (isPlaylistStreamtype && !guiInfo.Playing) uiSetFileName(NULL, NULL, STREAMTYPE_DUMMY); + else if (isPlaylistStreamtype && !guiInfo.Playing) uiSetFile(NULL, NULL, STREAMTYPE_DUMMY); } case 0: // cancel HidePlayList();
--- a/gui/ui/gtk/url.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/ui/gtk/url.c Sat Dec 01 19:05:24 2012 +0000 @@ -102,7 +102,7 @@ item->url=gstrdup( str ); listMgr( URLLIST_ITEM_ADD,item ); - uiSetFileName( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW; + uiSetFile( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW; listMgr(PLAYLIST_DELETE, 0); add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND); uiEventHandling( evPlay,0 );
--- a/gui/ui/main.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/ui/main.c Sat Dec 01 19:05:24 2012 +0000 @@ -211,7 +211,7 @@ if ( isPlaylistStreamtype && listMgr( PLAYLIST_ITEM_GET_CURR,0 ) ) { plItem * curr = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); - uiSetFileName( curr->path,curr->name,SAME_STREAMTYPE ); + uiSetFile( curr->path,curr->name,SAME_STREAMTYPE ); } switch ( guiInfo.StreamType ) @@ -674,7 +674,7 @@ } if (filename) { - uiSetFileName( NULL,filename,STREAMTYPE_FILE ); + uiSetFile( NULL,filename,STREAMTYPE_FILE ); if ( guiInfo.Playing == GUI_PLAY ) uiEventHandling( evStop,0 ); uiEventHandling( evPlay,0 ); }
--- a/gui/win32/dialogs.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/win32/dialogs.c Sat Dec 01 19:05:24 2012 +0000 @@ -141,7 +141,7 @@ { if (GetFullPathName(filename, MAX_PATH, filename, &filepart)) { - uiSetFileName(NULL, filename, STREAMTYPE_FILE); + uiSetFile(NULL, filename, STREAMTYPE_FILE); if(!parse_filename(filename, playtree, mconfig, 0)) gui->playlist->add_track(gui->playlist, filename, NULL, filepart, 0); mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding file: %s - path %s\n", filespec, filename); @@ -326,7 +326,7 @@ { char file[MAX_PATH]; SendMessage(url, WM_GETTEXT, MAX_PATH, (LPARAM) file); - uiSetFileName(NULL, file, STREAMTYPE_STREAM); + uiSetFile(NULL, file, STREAMTYPE_STREAM); if((f = fopen(history, "wt+"))) { fprintf(f, file); @@ -526,7 +526,7 @@ { case ID_PLAY: if(selected) pl->current = selected - 1; - uiSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_FILE); + uiSetFile(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_FILE); gui->startplay(gui); } return 0;
--- a/gui/win32/gui.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/win32/gui.c Sat Dec 01 19:05:24 2012 +0000 @@ -501,7 +501,7 @@ for(i=0; i<filecount; i++) { DragQueryFile((HDROP) wParam, i, file, MAX_PATH); - uiSetFileName(NULL, file, STREAMTYPE_FILE); + uiSetFile(NULL, file, STREAMTYPE_FILE); if(!parse_filename(file, playtree, mconfig, 1)) gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0); } @@ -773,7 +773,7 @@ { PCOPYDATASTRUCT cdData; cdData = (PCOPYDATASTRUCT) lParam; - uiSetFileName(NULL, cdData->lpData, STREAMTYPE_FILE); + uiSetFile(NULL, cdData->lpData, STREAMTYPE_FILE); if(!parse_filename(cdData->lpData, playtree, mconfig, 1)) gui->playlist->add_track(gui->playlist, cdData->lpData, NULL, NULL, 0); gui->startplay(gui); @@ -790,7 +790,7 @@ for(i=0; i<filecount; i++) { DragQueryFile((HDROP) wParam, i, file, MAX_PATH); - uiSetFileName(NULL, file, STREAMTYPE_FILE); + uiSetFile(NULL, file, STREAMTYPE_FILE); if(!parse_filename(file, playtree, mconfig, 1)) gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0); }
--- a/gui/win32/interface.c Sat Dec 01 07:48:31 2012 +0000 +++ b/gui/win32/interface.c Sat Dec 01 19:05:24 2012 +0000 @@ -219,7 +219,7 @@ // Linux filesystem. dvd_device = unix_device(dvd_device); #endif - uiSetFileName(NULL, dvd_device, STREAMTYPE_DVD); + uiSetFile(NULL, dvd_device, STREAMTYPE_DVD); dvdname[0] = 0; strcat(dvdname, "DVD Movie"); GetVolumeInformation(dvd_device, dvdname, MAX_PATH, NULL, NULL, NULL, NULL, 0); @@ -420,7 +420,7 @@ default: if(mygui->playlist->current == (mygui->playlist->trackcount - 1)) return; - uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, + uiSetFile(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_FILE); break; } @@ -440,14 +440,14 @@ default: if(mygui->playlist->current == 0) return; - uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)--]->filename, + uiSetFile(NULL, mygui->playlist->tracks[(mygui->playlist->current)--]->filename, STREAMTYPE_FILE); break; } mygui->startplay(mygui); } -void uiSetFileName(char *dir, char *name, int type) +void uiSetFile(char *dir, char *name, int type) { if(!name) return; if(!dir) @@ -585,7 +585,7 @@ { case STREAMTYPE_FILE: case STREAMTYPE_STREAM: - uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, SAME_STREAMTYPE); + uiSetFile(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, SAME_STREAMTYPE); guiInfo.Track = mygui->playlist->current + 1; break; case STREAMTYPE_DVD: @@ -596,7 +596,7 @@ dvd_angle = guiInfo.Angle; #endif sprintf(tmp,"dvd://%d", guiInfo.Track); - uiSetFileName(NULL, tmp, SAME_STREAMTYPE); + uiSetFile(NULL, tmp, SAME_STREAMTYPE); break; } } @@ -782,7 +782,7 @@ guiInfo.PlaylistNext = 1; guiInfo.NewPlay = GUI_FILE_NEW; - uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_FILE); + uiSetFile(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_FILE); //sprintf(guiInfo.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename); } @@ -868,7 +868,7 @@ if (result) { mygui->playlist->current = 0; - uiSetFileName(NULL, mygui->playlist->tracks[0]->filename, STREAMTYPE_FILE); + uiSetFile(NULL, mygui->playlist->tracks[0]->filename, STREAMTYPE_FILE); } if (enqueue) filename = NULL;