changeset 33901:d4f80f889106

Cosmetic: Rename guiInfo members. Change Movie into Video.
author ib
date Mon, 15 Aug 2011 13:27:58 +0000
parents b2fcff7e2157
children dd0e5dc6ebbf
files gui/interface.c gui/interface.h gui/ui/actions.c gui/ui/gtk/menu.c gui/ui/main.c gui/ui/render.c gui/win32/interface.c gui/win32/widgetrender.c
diffstat 8 files changed, 42 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/interface.c	Mon Aug 15 13:27:58 2011 +0000
@@ -57,8 +57,8 @@
 #endif
 
 guiInterface_t guiInfo = {
+    .VideoWindow = True,
     .StreamType  = STREAMTYPE_DUMMY,
-    .MovieWindow = True,
     .Balance     = 50.0f
 };
 
@@ -401,7 +401,7 @@
         break;
 
     case GUI_HANDLE_EVENTS:
-        if (!guiInfo.Playing || !guiInfo.MovieWindow)
+        if (!guiInfo.Playing || !guiInfo.VideoWindow)
             wsHandleEvents();
         gtkEventHandling();
         break;
@@ -498,12 +498,12 @@
         {
             int i = 0;
 
-            guiInfo.MovieWindow = True;
+            guiInfo.VideoWindow = True;
 
             while (video_out_drivers[i++]) {
                 if (video_out_drivers[i - 1]->control(VOCTRL_GUISUPPORT, NULL) == VO_TRUE) {
                     if ((video_driver_list && !gstrcmp(video_driver_list[0], (char *)video_out_drivers[i - 1]->info->short_name)) && (video_out_drivers[i - 1]->control(VOCTRL_GUI_NOWINDOW, NULL) == VO_TRUE)) {
-                        guiInfo.MovieWindow = False;
+                        guiInfo.VideoWindow = False;
                         break;
                     }
                 }
@@ -709,7 +709,7 @@
         guiInfo.AudioChannels = data ? ((sh_audio_t *)data)->channels : 0;
 
         if (data && !guiInfo.sh_video)
-            guiInfo.MovieWindow = False;
+            guiInfo.VideoWindow = False;
 
         gui(GUI_SET_MIXER, 0);
 
@@ -727,7 +727,7 @@
             }
         }
 
-        wsVisibleWindow(&guiApp.subWindow, (guiInfo.MovieWindow ? wsShowWindow : wsHideWindow));
+        wsVisibleWindow(&guiApp.subWindow, (guiInfo.VideoWindow ? wsShowWindow : wsHideWindow));
         break;
 
     case GUI_SET_MIXER:
@@ -763,8 +763,8 @@
             wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
         }
 
-        guiInfo.MovieWidth  = vo_dwidth;
-        guiInfo.MovieHeight = vo_dheight;
+        guiInfo.VideoWidth  = vo_dwidth;
+        guiInfo.VideoHeight = vo_dheight;
 
         if (guiWinID >= 0)
             wsMoveWindow(&guiApp.mainWindow, False, 0, vo_dheight);
@@ -799,7 +799,7 @@
             guiInfo.ElapsedTime   = 0;
             guiInfo.Position      = 0;
             guiInfo.AudioChannels = 0;
-            guiInfo.MovieWindow   = True;
+            guiInfo.VideoWindow   = True;
 
 #ifdef CONFIG_DVDREAD
             guiInfo.Track   = 1;
--- a/gui/interface.h	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/interface.h	Mon Aug 15 13:27:58 2011 +0000
@@ -98,9 +98,9 @@
     sh_video_t *sh_video;
     af_stream_t *afilter;
 
-    int MovieWidth;
-    int MovieHeight;
-    int MovieWindow;
+    int VideoWidth;
+    int VideoHeight;
+    int VideoWindow;
 
     int StreamType;           // public, read access by MPlayer
     int AudioChannels;
--- a/gui/ui/actions.c	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/ui/actions.c	Mon Aug 15 13:27:58 2011 +0000
@@ -43,12 +43,12 @@
 
 void uiFullScreen(void)
 {
-    if (!guiInfo.MovieWindow && guiInfo.Playing)
+    if (!guiInfo.VideoWindow && guiInfo.Playing)
         return;
 
     if (guiInfo.Playing && guiApp.subWindow.isFullScreen) {
-        guiApp.subWindow.OldWidth  = guiInfo.MovieWidth;
-        guiApp.subWindow.OldHeight = guiInfo.MovieHeight;
+        guiApp.subWindow.OldWidth  = guiInfo.VideoWidth;
+        guiApp.subWindow.OldHeight = guiInfo.VideoHeight;
 
         switch (guiApp.sub.x) {
         case -1:
--- a/gui/ui/gtk/menu.c	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/ui/gtk/menu.c	Mon Aug 15 13:27:58 2011 +0000
@@ -617,16 +617,16 @@
   AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences );
   AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_Equalizer, evEqualizer );
 
-  if ( guiInfo.MovieWindow )
+  if ( guiInfo.VideoWindow )
    {
     int b1 = 0, b2 = 0, b_half = 0;
     AddSeparator( Menu );
     if ( !guiApp.subWindow.isFullScreen && guiInfo.Playing )
      {
-      if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth * 2 )&&
-           ( guiApp.subWindow.Height == guiInfo.MovieHeight * 2 ) ) b2=1;
-      else if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth / 2 ) &&
-                ( guiApp.subWindow.Height == guiInfo.MovieHeight / 2 ) ) b_half=1;
+      if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth * 2 )&&
+           ( guiApp.subWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=1;
+      else if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth / 2 ) &&
+                ( guiApp.subWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=1;
       else b1=1;
      } else b1=!guiApp.subWindow.isFullScreen;
     H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize );
--- a/gui/ui/main.c	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/ui/main.c	Mon Aug 15 13:27:58 2011 +0000
@@ -262,7 +262,7 @@
    case evStop:
 	guiInfo.Playing=GUI_STOP;
 	uiState();
-	guiInfo.MovieWindow=True;
+	guiInfo.VideoWindow=True;
 	break;
 
    case evLoadPlay:
@@ -338,10 +338,10 @@
            {
             uiFullScreen();
            }
-          wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth / 2, guiInfo.MovieHeight / 2 );
+          wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
           wsMoveWindow( &guiApp.subWindow, False,
-                        ( wsMaxX - guiInfo.MovieWidth/2  )/2 + wsOrgX,
-                        ( wsMaxY - guiInfo.MovieHeight/2 )/2 + wsOrgY  );
+                        ( wsMaxX - guiInfo.VideoWidth/2  )/2 + wsOrgX,
+                        ( wsMaxY - guiInfo.VideoHeight/2 )/2 + wsOrgY  );
          }
         break;
    case evDoubleSize:
@@ -352,10 +352,10 @@
            {
             uiFullScreen();
            }
-          wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth * 2, guiInfo.MovieHeight * 2 );
+          wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
           wsMoveWindow( &guiApp.subWindow, False,
-                        ( wsMaxX - guiInfo.MovieWidth*2  )/2 + wsOrgX,
-                        ( wsMaxY - guiInfo.MovieHeight*2 )/2 + wsOrgY  );
+                        ( wsMaxX - guiInfo.VideoWidth*2  )/2 + wsOrgX,
+                        ( wsMaxY - guiInfo.VideoHeight*2 )/2 + wsOrgY  );
          }
         break;
    case evNormalSize:
@@ -366,10 +366,10 @@
            {
             uiFullScreen();
            }
-          wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth, guiInfo.MovieHeight );
+          wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
           wsMoveWindow( &guiApp.subWindow, False,
-                        ( wsMaxX - guiInfo.MovieWidth  )/2 + wsOrgX,
-                        ( wsMaxY - guiInfo.MovieHeight )/2 + wsOrgY  );
+                        ( wsMaxX - guiInfo.VideoWidth  )/2 + wsOrgX,
+                        ( wsMaxY - guiInfo.VideoHeight )/2 + wsOrgY  );
 	  break;
          } else if ( !guiApp.subWindow.isFullScreen ) break;
    case evFullScreen:
--- a/gui/ui/render.c	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/ui/render.c	Mon Aug 15 13:27:58 2011 +0000
@@ -210,12 +210,12 @@
                 break;
 
             case 'x':
-                snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieWidth);
+                snprintf(tmp, sizeof(tmp), "%d", guiInfo.VideoWidth);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'y':
-                snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieHeight);
+                snprintf(tmp, sizeof(tmp), "%d", guiInfo.VideoHeight);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
--- a/gui/win32/interface.c	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/win32/interface.c	Mon Aug 15 13:27:58 2011 +0000
@@ -473,7 +473,7 @@
         }
         case GUI_SET_AUDIO:
         {
-            guiInfo.MovieWindow = (data && !guiInfo.sh_video);
+            guiInfo.VideoWindow = (data && !guiInfo.sh_video);
             // NOTE: This type doesn't mean (and never meant) that we have
             // *just* audio, so there probably should be a check before
             // hiding (see gui/interface.c).
@@ -503,10 +503,10 @@
         }
         case GUI_SETUP_VIDEO_WINDOW:
         {
-            guiInfo.MovieWidth = vo_dwidth;
-            guiInfo.MovieHeight = vo_dheight;
+            guiInfo.VideoWidth = vo_dwidth;
+            guiInfo.VideoHeight = vo_dheight;
 
-            sub_aspect = (float)guiInfo.MovieWidth/guiInfo.MovieHeight;
+            sub_aspect = (float)guiInfo.VideoWidth/guiInfo.VideoHeight;
             if(WinID != -1)
                update_subwindow();
             break;
@@ -794,13 +794,13 @@
             ShowWindow(mygui->subwindow, SW_HIDE);
             return 0;
         }
-        else if(!guiInfo.MovieWindow)
+        else if(!guiInfo.VideoWindow)
             return 0;
         else ShowWindow(mygui->subwindow, SW_SHOW);
     }
 
     /* we've come out of fullscreen at the end of file */
-    if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && guiInfo.MovieWindow)
+    if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && guiInfo.VideoWindow)
         ShowWindow(mygui->subwindow, SW_SHOWNORMAL);
 
     /* get our current window coordinates */
@@ -828,8 +828,8 @@
     }
     else
     {
-        rd.right = rd.left+guiInfo.MovieWidth;
-        rd.bottom = rd.top+guiInfo.MovieHeight;
+        rd.right = rd.left+guiInfo.VideoWidth;
+        rd.bottom = rd.top+guiInfo.VideoHeight;
 
         if (movie_aspect > 0.0)       // forced aspect from the cmdline
             sub_aspect = movie_aspect;
--- a/gui/win32/widgetrender.c	Mon Aug 15 09:38:32 2011 +0000
+++ b/gui/win32/widgetrender.c	Mon Aug 15 13:27:58 2011 +0000
@@ -144,8 +144,8 @@
     stringreplace(text, "$B", "%3.1f", guiInfo.Balance);
     stringreplace(text, "$t", "%.2i", guiInfo.Track);
     stringreplace(text, "$o", "%s", guiInfo.Filename);
-    stringreplace(text, "$x", "%i", guiInfo.MovieWidth);
-    stringreplace(text, "$y", "%i", guiInfo.MovieHeight);
+    stringreplace(text, "$x", "%i", guiInfo.VideoWidth);
+    stringreplace(text, "$y", "%i", guiInfo.VideoHeight);
     stringreplace(text, "$C", "%s", guiInfo.sh_video ? codecname : "");
     stringreplace(text, "$$", "$");