summaryrefslogtreecommitdiff
path: root/ieview/TextToken.cpp
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-17 19:04:06 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-17 19:04:06 +0000
commit09247167dc17f45fc30f32c3dcd5b8280a737537 (patch)
tree820bd74cb87ab1ad6fdf8aed75e6a8a5a38c4598 /ieview/TextToken.cpp
parentb880db8491271b4bd4aa87c2dd79b5e3c3dde6cf (diff)
мелкие фиксы
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@176 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'ieview/TextToken.cpp')
-rw-r--r--ieview/TextToken.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/ieview/TextToken.cpp b/ieview/TextToken.cpp
index f33a42b..bfa2913 100644
--- a/ieview/TextToken.cpp
+++ b/ieview/TextToken.cpp
@@ -652,10 +652,31 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced) {
int len = match2 != NULL ? match2 - match : wcslen(match);
match = mir_wstrdup(match);
match[len] = 0;
- int width = 640;
- int height = 390;
+ int width ;
+ int height;
+ int Embedsize = Options::getEmbedsize();
+ switch (Embedsize){
+ case 0:
+ width = 320;
+ height = 205;
+ break;
+ case 1:
+ width = 480;
+ height = 385;
+ break;
+ case 2:
+ width = 560;
+ height = 349;
+ break;
+ case 3:
+ width = 640;
+ height = 390;
+ break;
+
+ };
+
Utils::appendText(str, sizeAlloced, L"<div><object width=\"%d\" height=\"%d\">\
- <param name=\"movie\" value=\"http://www.youtube.com/v/%s&feature=player_embedded&version=3\"/>\
+ <param name=\"movie\" value=\"http://www.youtube.com/v/%s&feature=player_embedded&version=3\"/>\
<param name=\"allowFullScreen\" value=\"true\"/>\
<param name=\"allowScriptAccess\" value=\"true\"/>\
<embed src=\"http://www.youtube.com/v/%s&feature=player_embedded&version=3\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowScriptAccess=\"always\" width=\"%d\" height=\"%d\"/>\