summaryrefslogtreecommitdiff
path: root/ieview/TextToken.cpp
diff options
context:
space:
mode:
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\"/>\