Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
0b4dc724
Commit
0b4dc724
authored
Aug 08, 2011
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enabled flash on linux. Add dependence when installing Sankore
parent
782a518c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
40 deletions
+30
-40
UBBoardController.cpp
src/board/UBBoardController.cpp
+30
-40
No files found.
src/board/UBBoardController.cpp
View file @
0b4dc724
...
...
@@ -918,60 +918,50 @@ void UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString
else
if
(
mimeType
.
startsWith
(
"application/x-shockwave-flash"
))
{
bool
acceptFlash
=
true
;
#ifdef Q_WS_X11
acceptFlash
=
false
;
#endif
if
(
acceptFlash
)
{
qDebug
()
<<
"accepting mime type"
<<
mimeType
<<
"as flash"
;
qDebug
()
<<
"accepting mime type"
<<
mimeType
<<
"as flash"
;
QString
sUrl
=
sourceUrl
.
toString
();
QString
sUrl
=
sourceUrl
.
toString
();
if
(
sUrl
.
startsWith
(
"file://"
)
||
sUrl
.
startsWith
(
"/"
))
{
sUrl
=
sourceUrl
.
toLocalFile
();
}
if
(
sUrl
.
startsWith
(
"file://"
)
||
sUrl
.
startsWith
(
"/"
))
{
sUrl
=
sourceUrl
.
toLocalFile
();
}
QTemporaryFile
*
eduMediaFile
=
0
;
QTemporaryFile
*
eduMediaFile
=
0
;
if
(
sUrl
.
toLower
().
contains
(
"edumedia-sciences.com"
))
if
(
sUrl
.
toLower
().
contains
(
"edumedia-sciences.com"
))
{
eduMediaFile
=
new
QTemporaryFile
(
"XXXXXX.swf"
);
if
(
eduMediaFile
->
open
())
{
eduMediaFile
=
new
QTemporaryFile
(
"XXXXXX.swf"
);
if
(
eduMediaFile
->
open
())
{
eduMediaFile
->
write
(
pData
);
QFileInfo
fi
(
*
eduMediaFile
);
sUrl
=
fi
.
absoluteFilePath
();
}
eduMediaFile
->
write
(
pData
);
QFileInfo
fi
(
*
eduMediaFile
);
sUrl
=
fi
.
absoluteFilePath
();
}
}
QSize
size
;
if
(
pSize
.
height
()
>
0
&&
pSize
.
width
()
>
0
)
size
=
pSize
;
else
size
=
mActiveScene
->
nominalSize
()
*
.8
;
QSize
size
;
QString
widgetUrl
=
UBW3CWidget
::
createNPAPIWrapper
(
sUrl
,
mimeType
,
size
);
if
(
pSize
.
height
()
>
0
&&
pSize
.
width
()
>
0
)
size
=
pSize
;
else
size
=
mActiveScene
->
nominalSize
()
*
.8
;
if
(
widgetUrl
.
length
()
>
0
)
{
UBGraphicsWidgetItem
*
widgetItem
=
mActiveScene
->
addW3CWidget
(
QUrl
::
fromLocalFile
(
widgetUrl
),
pPos
);
QString
widgetUrl
=
UBW3CWidget
::
createNPAPIWrapper
(
sUrl
,
mimeType
,
size
);
widgetItem
->
setSourceUrl
(
sourceUrl
);
if
(
widgetUrl
.
length
()
>
0
)
{
UBGraphicsWidgetItem
*
widgetItem
=
mActiveScene
->
addW3CWidget
(
QUrl
::
fromLocalFile
(
widgetUrl
),
pPos
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
}
widgetItem
->
setSourceUrl
(
sourceUrl
);
if
(
eduMediaFile
)
delete
eduMediaFile
;
}
else
{
UBApplication
::
showMessage
(
tr
(
"Flash is not supported on Sankore Linux"
));
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
}
if
(
eduMediaFile
)
delete
eduMediaFile
;
}
else
if
(
mimeType
.
startsWith
(
"application/pdf"
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment