[MPlayer-cvslog] r35546 - in trunk/gui: interface.c ui/actions.c ui/actions.h ui/gtk/fileselect.c ui/gtk/playlist.c ui/gtk/url.c ui/main.c win32/dialogs.c win32/gui.c win32/interface.c

ib subversion at mplayerhq.hu
Sat Dec 1 20:05:24 CET 2012


Author: ib
Date: Sat Dec  1 20:05:24 2012
New Revision: 35546

Log:
Cosmetic: Rename uiSetFileName().

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/actions.c
   trunk/gui/ui/actions.h
   trunk/gui/ui/gtk/fileselect.c
   trunk/gui/ui/gtk/playlist.c
   trunk/gui/ui/gtk/url.c
   trunk/gui/ui/main.c
   trunk/gui/win32/dialogs.c
   trunk/gui/win32/gui.c
   trunk/gui/win32/interface.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/interface.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -239,7 +239,7 @@ void guiInit(void)
     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 @@ int gui(int what, void *data)
             char tmp[512];
 
             sprintf(tmp, "cdda://%d", guiInfo.Track);
-            uiSetFileName(NULL, tmp, SAME_STREAMTYPE);
+            uiSetFile(NULL, tmp, SAME_STREAMTYPE);
         }
         break;
 
@@ -428,7 +428,7 @@ int gui(int what, void *data)
             char tmp[512];
 
             sprintf(tmp, "vcd://%d", guiInfo.Track);
-            uiSetFileName(NULL, tmp, SAME_STREAMTYPE);
+            uiSetFile(NULL, tmp, SAME_STREAMTYPE);
         }
         break;
 
@@ -437,7 +437,7 @@ int gui(int what, void *data)
             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 @@ int gui(int what, void *data)
         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 @@ int gui(int what, void *data)
                 guiInfo.Angle         = 0;
                 guiInfo.RunningTime   = 0;
                 guiInfo.AudioChannels = 0;
-                uiSetFileName(NULL, NULL, STREAMTYPE_DUMMY);
+                uiSetFile(NULL, NULL, STREAMTYPE_DUMMY);
             }
 
             guiInfo.ElapsedTime = 0;

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/ui/actions.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -260,13 +260,13 @@ void uiChangeSkin(char *name)
 }
 
 /**
- * @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 @@ void uiCurr(void)
         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 @@ void uiPrev(void)
         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 @@ void uiNext(void)
         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;

Modified: trunk/gui/ui/actions.h
==============================================================================
--- trunk/gui/ui/actions.h	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/ui/actions.h	Sat Dec  1 20:05:24 2012	(r35546)
@@ -28,7 +28,7 @@ void uiPause(void);
 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 */

Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/ui/gtk/fileselect.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -503,7 +503,7 @@ static void fs_Ok_released( GtkButton * 
    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)
           {

Modified: trunk/gui/ui/gtk/playlist.c
==============================================================================
--- trunk/gui/ui/gtk/playlist.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/ui/gtk/playlist.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -211,12 +211,12 @@ static void plButtonReleased( GtkButton 
 	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();

Modified: trunk/gui/ui/gtk/url.c
==============================================================================
--- trunk/gui/ui/gtk/url.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/ui/gtk/url.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -102,7 +102,7 @@ static void on_Button_pressed( GtkButton
      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 );

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/ui/main.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -211,7 +211,7 @@ play:
 	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 @@ void uiDandDHandler(int num,char** files
   }
 
   if (filename) {
-    uiSetFileName( NULL,filename,STREAMTYPE_FILE );
+    uiSetFile( NULL,filename,STREAMTYPE_FILE );
     if ( guiInfo.Playing == GUI_PLAY ) uiEventHandling( evStop,0 );
     uiEventHandling( evPlay,0 );
   }

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/win32/dialogs.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -141,7 +141,7 @@ int display_openfilewindow(gui_t *gui, i
             {
                 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 @@ static LRESULT CALLBACK OpenUrlWndProc(H
                 {
                     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 @@ static LRESULT CALLBACK PlayListWndProc(
                     {
                 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;

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/win32/gui.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -501,7 +501,7 @@ static LRESULT CALLBACK VideoProc(HWND h
                 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 @@ static LRESULT CALLBACK EventProc(HWND h
             {
                 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 @@ static LRESULT CALLBACK EventProc(HWND h
                 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);
                 }

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Sat Dec  1 08:48:31 2012	(r35545)
+++ trunk/gui/win32/interface.c	Sat Dec  1 20:05:24 2012	(r35546)
@@ -219,7 +219,7 @@ static void guiSetEvent(int event)
             // 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 @@ void uiNext(void)
         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 @@ void uiPrev(void)
         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 @@ int gui(int what, void *data)
             {
                 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 @@ int gui(int what, void *data)
                     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 @@ int gui(int what, void *data)
 
               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 @@ int guiPlaylistInitialize(play_tree_t *m
     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;


More information about the MPlayer-cvslog mailing list