mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Add half size entry to the GMPlayer menu.
patch by Pierre Marc Dumuid <pierre dot dumuid at adelaide dot edu dot au> approved by Pontscho git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14590 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
fd830cb9b5
commit
43f9cb0b4c
@ -899,6 +899,12 @@ relative value (0-100%) of the potmeter is used).
|
||||
|
||||
<variablelist>
|
||||
<title>Video control:</title>
|
||||
<varlistentry>
|
||||
<term><emphasis role="bold">evHalfSize</emphasis></term>
|
||||
<listitem><para>
|
||||
Set the movie window to half size.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><emphasis role="bold">evDoubleSize</emphasis></term>
|
||||
<listitem><para>
|
||||
|
@ -50,6 +50,7 @@ evName evNames[] =
|
||||
{ evDecAudioBufDelay, "evDecAudioBufDelay" },
|
||||
{ evPlaySwitchToPause, "evPlaySwitchToPause" },
|
||||
{ evPauseSwitchToPlay, "evPauseSwitchToPlay" },
|
||||
{ evNormalSize, "evHalfSize" },
|
||||
{ evNormalSize, "evNormalSize" },
|
||||
{ evDoubleSize, "evDoubleSize" },
|
||||
{ evSetMoviePosition, "evSetMoviePosition" },
|
||||
|
@ -32,6 +32,7 @@
|
||||
#define evBackward10min 22
|
||||
#define evForward10min 23
|
||||
|
||||
#define evHalfSize 301
|
||||
#define evNormalSize 24
|
||||
#define evDoubleSize 25
|
||||
#define evFullScreen 26
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "../../../libmpdemux/demuxer.h"
|
||||
|
||||
#include "../pixmaps/ab.xpm"
|
||||
#include "../pixmaps/half.xpm"
|
||||
#include "../pixmaps/normal.xpm"
|
||||
#include "../pixmaps/double.xpm"
|
||||
#include "../pixmaps/fs.xpm"
|
||||
@ -391,7 +392,7 @@ GtkWidget * create_PopUpMenu( void )
|
||||
GtkWidget * Menu = NULL;
|
||||
GtkWidget * SubMenu = NULL;
|
||||
GtkWidget * MenuItem = NULL;
|
||||
GtkWidget * N, * D, * F;
|
||||
GtkWidget * H, * N, * D, * F;
|
||||
|
||||
Menu=gtk_menu_new();
|
||||
gtk_widget_realize (Menu);
|
||||
@ -579,14 +580,17 @@ GtkWidget * create_PopUpMenu( void )
|
||||
|
||||
if ( guiIntfStruct.NoWindow == False )
|
||||
{
|
||||
int b1 = 0, b2 = 0;
|
||||
int b1 = 0, b2 = 0, b_half = 0;
|
||||
AddSeparator( Menu );
|
||||
if ( !appMPlayer.subWindow.isFullScreen && guiIntfStruct.Playing )
|
||||
{
|
||||
if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth * 2 )&&
|
||||
( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight * 2 ) ) b2=1;
|
||||
else b1=1;
|
||||
else if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth / 2 ) &&
|
||||
( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight / 2 ) ) b_half=1;
|
||||
else b1=1;
|
||||
} else b1=!appMPlayer.subWindow.isFullScreen;
|
||||
H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize );
|
||||
N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize );
|
||||
D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize );
|
||||
F=AddMenuCheckItem( window1, (const char*)fs_xpm, Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen );
|
||||
@ -594,6 +598,7 @@ GtkWidget * create_PopUpMenu( void )
|
||||
|
||||
if ( !gtkShowVideoWindow && !guiIntfStruct.Playing )
|
||||
{
|
||||
gtk_widget_set_sensitive( H,FALSE );
|
||||
gtk_widget_set_sensitive( N,FALSE );
|
||||
gtk_widget_set_sensitive( D,FALSE );
|
||||
gtk_widget_set_sensitive( F,FALSE );
|
||||
|
@ -281,6 +281,20 @@ set_volume:
|
||||
case 1: wsIconify( appMPlayer.subWindow ); break;
|
||||
}
|
||||
break;
|
||||
case evHalfSize:
|
||||
btnSet( evFullScreen,btnReleased );
|
||||
if ( guiIntfStruct.Playing )
|
||||
{
|
||||
if ( appMPlayer.subWindow.isFullScreen )
|
||||
{
|
||||
mplFullScreen();
|
||||
}
|
||||
wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth / 2, guiIntfStruct.MovieHeight / 2 );
|
||||
wsMoveWindow( &appMPlayer.subWindow, 0,
|
||||
( wsMaxX - guiIntfStruct.MovieWidth/2 )/2 + wsOrgX,
|
||||
( wsMaxY - guiIntfStruct.MovieHeight/2 )/2 + wsOrgY );
|
||||
}
|
||||
break;
|
||||
case evDoubleSize:
|
||||
btnSet( evFullScreen,btnReleased );
|
||||
if ( guiIntfStruct.Playing )
|
||||
|
144
Gui/mplayer/pixmaps/half.xpm
Normal file
144
Gui/mplayer/pixmaps/half.xpm
Normal file
@ -0,0 +1,144 @@
|
||||
/* XPM */
|
||||
static char * half_xpm[] = {
|
||||
"16 16 125 2",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #92A0AC",
|
||||
"@ c #808F9B",
|
||||
"# c #86949F",
|
||||
"$ c #8C99A4",
|
||||
"% c #929EA8",
|
||||
"& c #98A3AC",
|
||||
"* c #9EA7B0",
|
||||
"= c #A4ACB4",
|
||||
"- c #AAB1B8",
|
||||
"; c #B0B6BC",
|
||||
"> c #B6BBC0",
|
||||
", c #BBC0C5",
|
||||
"' c #909192",
|
||||
") c #B7C4CD",
|
||||
"! c #91A3B3",
|
||||
"~ c #98A9B8",
|
||||
"{ c #9FAFBD",
|
||||
"] c #A6B5C1",
|
||||
"^ c #ADBAC6",
|
||||
"/ c #B4C0CB",
|
||||
"( c #BAC6D0",
|
||||
"_ c #C1CCD4",
|
||||
": c #C8D1D9",
|
||||
"< c #CFD7DE",
|
||||
"[ c #D7DEE3",
|
||||
"} c #BCC1C5",
|
||||
"| c #8B9EAF",
|
||||
"1 c #92A4B3",
|
||||
"2 c #A6B5C2",
|
||||
"3 c #ADBBC6",
|
||||
"4 c #BBC6D0",
|
||||
"5 c #C2CCD5",
|
||||
"6 c #C9D2D9",
|
||||
"7 c #D1D8DF",
|
||||
"8 c #B7BCC2",
|
||||
"9 c #AFBDC8",
|
||||
"0 c #8499AA",
|
||||
"a c #92A4B4",
|
||||
"b c #99AAB9",
|
||||
"c c #A0B0BD",
|
||||
"d c #A7B5C2",
|
||||
"e c #AEBBC7",
|
||||
"f c #B5C1CC",
|
||||
"g c #BBC7D0",
|
||||
"h c #CAD3DA",
|
||||
"i c #B1B8BD",
|
||||
"j c #ACB9C5",
|
||||
"k c #7E93A6",
|
||||
"l c #8599AB",
|
||||
"m c #8C9FAF",
|
||||
"n c #93A5B4",
|
||||
"o c #A0B0BE",
|
||||
"p c #9AAEC3",
|
||||
"q c #8493A4",
|
||||
"r c #BCC7D1",
|
||||
"s c #C4CED6",
|
||||
"t c #ACB3BA",
|
||||
"u c #A8B6C3",
|
||||
"v c #778EA1",
|
||||
"w c #7E94A6",
|
||||
"x c #8C9FB0",
|
||||
"y c #9AABB9",
|
||||
"z c #78899B",
|
||||
"A c #8696A8",
|
||||
"B c #B6C2CC",
|
||||
"C c #BDC8D2",
|
||||
"D c #A6AFB6",
|
||||
"E c #A4B3C0",
|
||||
"F c #71899D",
|
||||
"G c #788EA2",
|
||||
"H c #7F94A7",
|
||||
"I c #869AAB",
|
||||
"J c #8DA0B0",
|
||||
"K c #7A8996",
|
||||
"L c #7D8EA3",
|
||||
"M c #98ACC2",
|
||||
"N c #AFBCC8",
|
||||
"O c #B7C3CD",
|
||||
"P c #A1ABB2",
|
||||
"Q c #5E7990",
|
||||
"R c #657E95",
|
||||
"S c #6C8499",
|
||||
"T c #728A9E",
|
||||
"U c #627584",
|
||||
"V c #7A8C9B",
|
||||
"W c #8EA1B1",
|
||||
"X c #95A7B6",
|
||||
"Y c #9CACBB",
|
||||
"Z c #B1BEC9",
|
||||
"` c #9BA5AF",
|
||||
" . c #6A7D8E",
|
||||
".. c #8196A8",
|
||||
"+. c #889BAD",
|
||||
"@. c #8FA1B1",
|
||||
"#. c #AAB8C4",
|
||||
"$. c #96A1AB",
|
||||
"%. c #B2C1D2",
|
||||
"&. c #90A6BE",
|
||||
"*. c #95AAC1",
|
||||
"=. c #738B9F",
|
||||
"-. c #7A90A3",
|
||||
";. c #889CAD",
|
||||
">. c #8FA2B2",
|
||||
",. c #919DA7",
|
||||
"'. c #BBC8D7",
|
||||
"). c #8AA1BA",
|
||||
"!. c #A6B4C1",
|
||||
"~. c #AEBCC7",
|
||||
"{. c #B3BFCA",
|
||||
"]. c #B7C2CD",
|
||||
"^. c #C3CDD6",
|
||||
"/. c #A7AFB7",
|
||||
"(. c #B7C5D5",
|
||||
"_. c #859DB7",
|
||||
":. c #B2C1D1",
|
||||
"<. c #7F98B4",
|
||||
"[. c #93A8BF",
|
||||
"}. c #D9E0E7",
|
||||
"|. c #B1C0D1",
|
||||
"1. c #B4C3D3",
|
||||
"2. c #B7C5D4",
|
||||
"3. c #BCC9D7",
|
||||
"4. c #B3C2D2",
|
||||
" . . . . . . . . . . . . . . . ",
|
||||
" . + @ # $ % & * = - ; > , ' . ",
|
||||
" . ) ! ~ { ] ^ / ( _ : < [ } . ",
|
||||
" . / | 1 ~ { 2 3 / 4 5 6 7 8 . ",
|
||||
" . 9 0 | a b c d e f g 5 h i . ",
|
||||
" . j k l m n b o p q . r s t . ",
|
||||
" . u v w l x n y z . A B C D . ",
|
||||
" . E F G H I J K . L M N O P . ",
|
||||
" . ~ Q R S T U . V W X Y Z ` . ",
|
||||
". . . . . . . . ...+.@.X #.$.. ",
|
||||
". %.&.*.p q . . =.-...;.>.E ,.. ",
|
||||
". '.).. z . A . !.#.~.{.].^./.. ",
|
||||
". (._.. . L M . . . . . . . . . ",
|
||||
". :.<.. . . [.. ",
|
||||
". }.|.1.2.3.4.. ",
|
||||
". . . . . . . . "};
|
@ -669,6 +669,7 @@ static char help_text[]=
|
||||
#define MSGTR_MENU_NextStream "Next stream"
|
||||
#define MSGTR_MENU_PrevStream "Prev stream"
|
||||
#define MSGTR_MENU_Size "Size"
|
||||
#define MSGTR_MENU_HalfSize "Half size"
|
||||
#define MSGTR_MENU_NormalSize "Normal size"
|
||||
#define MSGTR_MENU_DoubleSize "Double size"
|
||||
#define MSGTR_MENU_FullScreen "Fullscreen"
|
||||
|
Loading…
Reference in New Issue
Block a user