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
c89eb864
Commit
c89eb864
authored
Sep 11, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/claudio-dev' into develop
parents
93e8d950
29fc2f45
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
133 additions
and
119 deletions
+133
-119
Sankore 3.1.iss
Sankore 3.1.iss
+9
-3
preferences.ui
resources/forms/preferences.ui
+68
-61
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+1
-1
UBThumbnailAdaptor.cpp
src/adaptors/UBThumbnailAdaptor.cpp
+0
-1
UBApplication.cpp
src/core/UBApplication.cpp
+2
-4
UBDocumentManager.cpp
src/core/UBDocumentManager.cpp
+47
-47
UBPersistenceManager.cpp
src/core/UBPersistenceManager.cpp
+4
-0
main.cpp
src/core/main.cpp
+2
-2
No files found.
Sankore 3.1.iss
View file @
c89eb864
...
@@ -47,9 +47,6 @@ Type: files ; Name: "{app}\*.dll"
...
@@ -47,9 +47,6 @@ Type: files ; Name: "{app}\*.dll"
Source: "..\Sankore-ThirdParty\microsoft\vcredist_x86.exe"; DestDir:"{tmp}"
Source: "..\Sankore-ThirdParty\microsoft\vcredist_x86.exe"; DestDir:"{tmp}"
Source: "build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "build\win32\release\product\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
;Sankore plugins
;Source: "plugins\cffadaptor\build\win32\release\lib\CFF_Adaptor.dll"; DestDir: "{app}"; Flags: ignoreversion
;OpenSSL
;OpenSSL
Source: "..\Sankore-ThirdParty\openssl\win32\libeay32.dll"; DestDir:"{app}"; Flags: ignoreversion
Source: "..\Sankore-ThirdParty\openssl\win32\libeay32.dll"; DestDir:"{app}"; Flags: ignoreversion
Source: "..\Sankore-ThirdParty\openssl\win32\ssleay32.dll"; DestDir:"{app}"; Flags: ignoreversion
Source: "..\Sankore-ThirdParty\openssl\win32\ssleay32.dll"; DestDir:"{app}"; Flags: ignoreversion
...
@@ -85,6 +82,15 @@ Source: "..\Qt-4.8\plugins\imageformats\qtiff4.dll"; DestDir: "{app}\imageformat
...
@@ -85,6 +82,15 @@ Source: "..\Qt-4.8\plugins\imageformats\qtiff4.dll"; DestDir: "{app}\imageformat
Source: "..\Qt-4.8\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{app}\phonon_backend"; Flags: ignoreversion
Source: "..\Qt-4.8\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{app}\phonon_backend"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
;qt multimedia plugins
Source: "c:\OpenSankore\plugins\mediaservice\dsengine.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\mediaservice\dsengined.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengine.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengined.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3u.dll"; DestDir: "c:\OpenSankore\playlistformats"; Flags: ignoreversion
Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenSankore\playlistformats"; Flags: ignoreversion
[Icons]
[Icons]
Name: "{group}\Open-Sankor"; Filename: "{app}\Open-Sankore.exe"
Name: "{group}\Open-Sankor"; Filename: "{app}\Open-Sankore.exe"
Name: "{group}\{cm:UninstallProgram,Open-Sankor}"; Filename: "{uninstallexe}"
Name: "{group}\{cm:UninstallProgram,Open-Sankor}"; Filename: "{uninstallexe}"
...
...
resources/forms/preferences.ui
View file @
c89eb864
This diff is collapsed.
Click to expand it.
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
c89eb864
...
@@ -238,7 +238,7 @@ QString UBSvgSubsetAdaptor::uniboardDocumentNamespaceUriFromVersion(int mFileVer
...
@@ -238,7 +238,7 @@ QString UBSvgSubsetAdaptor::uniboardDocumentNamespaceUriFromVersion(int mFileVer
UBGraphicsScene
*
UBSvgSubsetAdaptor
::
loadScene
(
UBDocumentProxy
*
proxy
,
const
int
pageIndex
)
UBGraphicsScene
*
UBSvgSubsetAdaptor
::
loadScene
(
UBDocumentProxy
*
proxy
,
const
int
pageIndex
)
{
{
QString
fileName
=
proxy
->
persistencePath
()
+
UBFileSystemUtils
::
digitFileFormat
(
"/page%1.svg"
,
pageIndex
);
QString
fileName
=
proxy
->
persistencePath
()
+
UBFileSystemUtils
::
digitFileFormat
(
"/page%1.svg"
,
pageIndex
);
qDebug
()
<<
fileName
;
QFile
file
(
fileName
);
QFile
file
(
fileName
);
if
(
file
.
exists
())
if
(
file
.
exists
())
...
...
src/adaptors/UBThumbnailAdaptor.cpp
View file @
c89eb864
...
@@ -96,7 +96,6 @@ void UBThumbnailAdaptor::updateDocumentToHandleZeroPage(UBDocumentProxy* proxy)
...
@@ -96,7 +96,6 @@ void UBThumbnailAdaptor::updateDocumentToHandleZeroPage(UBDocumentProxy* proxy)
if
(
UBSettings
::
settings
()
->
teacherGuidePageZeroActivated
->
get
().
toBool
()){
if
(
UBSettings
::
settings
()
->
teacherGuidePageZeroActivated
->
get
().
toBool
()){
QString
fileName
=
proxy
->
persistencePath
()
+
UBFileSystemUtils
::
digitFileFormat
(
"/page%1.svg"
,
0
);
QString
fileName
=
proxy
->
persistencePath
()
+
UBFileSystemUtils
::
digitFileFormat
(
"/page%1.svg"
,
0
);
QFile
file
(
fileName
);
QFile
file
(
fileName
);
qDebug
()
<<
fileName
;
if
(
!
file
.
exists
()){
if
(
!
file
.
exists
()){
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentScene
(
proxy
,
new
UBGraphicsScene
(
proxy
),
0
);
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentScene
(
proxy
,
new
UBGraphicsScene
(
proxy
),
0
);
}
}
...
...
src/core/UBApplication.cpp
View file @
c89eb864
...
@@ -224,8 +224,7 @@ void UBApplication::setupTranslators(QStringList args)
...
@@ -224,8 +224,7 @@ void UBApplication::setupTranslators(QStringList args)
if
(
!
setLanguage
.
isEmpty
())
if
(
!
setLanguage
.
isEmpty
())
forcedLanguage
=
setLanguage
;
forcedLanguage
=
setLanguage
;
}
}
QStringList
availablesTranslations
=
UBPlatformUtils
::
availableTranslations
();
QString
language
(
""
);
QString
language
(
""
);
if
(
!
forcedLanguage
.
isEmpty
())
if
(
!
forcedLanguage
.
isEmpty
())
...
@@ -362,14 +361,13 @@ int UBApplication::exec(const QString& pFileToImport)
...
@@ -362,14 +361,13 @@ int UBApplication::exec(const QString& pFileToImport)
boardController
->
setupLayout
();
boardController
->
setupLayout
();
if
(
pFileToImport
.
length
()
>
0
)
if
(
pFileToImport
.
length
()
>
0
)
{
UBApplication
::
applicationController
->
importFile
(
pFileToImport
);
UBApplication
::
applicationController
->
importFile
(
pFileToImport
);
}
#if defined(Q_WS_MAC)
#if defined(Q_WS_MAC)
static
AEEventHandlerUPP
ub_proc_ae_handlerUPP
=
AEEventHandlerUPP
(
ub_appleEventProcessor
);
static
AEEventHandlerUPP
ub_proc_ae_handlerUPP
=
AEEventHandlerUPP
(
ub_appleEventProcessor
);
AEInstallEventHandler
(
kCoreEventClass
,
kAEReopenApplication
,
ub_proc_ae_handlerUPP
,
SRefCon
(
UBApplication
::
applicationController
),
true
);
AEInstallEventHandler
(
kCoreEventClass
,
kAEReopenApplication
,
ub_proc_ae_handlerUPP
,
SRefCon
(
UBApplication
::
applicationController
),
true
);
#endif
#endif
if
(
UBSettings
::
settings
()
->
appStartMode
->
get
()
==
"Desktop"
)
if
(
UBSettings
::
settings
()
->
appStartMode
->
get
()
==
"Desktop"
)
applicationController
->
showDesktop
();
applicationController
->
showDesktop
();
else
else
...
...
src/core/UBDocumentManager.cpp
View file @
c89eb864
...
@@ -149,32 +149,32 @@ UBDocumentProxy* UBDocumentManager::importFile(const QFile& pFile, const QString
...
@@ -149,32 +149,32 @@ UBDocumentProxy* UBDocumentManager::importFile(const QFile& pFile, const QString
UBPageBasedImportAdaptor
*
importAdaptor
=
(
UBPageBasedImportAdaptor
*
)
adaptor
;
UBPageBasedImportAdaptor
*
importAdaptor
=
(
UBPageBasedImportAdaptor
*
)
adaptor
;
// Document import procedure.....
// Document import procedure.....
QString
documentName
=
QFileInfo
(
pFile
.
fileName
()).
completeBaseName
();
QString
documentName
=
QFileInfo
(
pFile
.
fileName
()).
completeBaseName
();
document
=
UBPersistenceManager
::
persistenceManager
()
->
createDocument
(
pGroup
,
documentName
);
document
=
UBPersistenceManager
::
persistenceManager
()
->
createDocument
(
pGroup
,
documentName
);
QUuid
uuid
=
QUuid
::
createUuid
();
QUuid
uuid
=
QUuid
::
createUuid
();
QString
filepath
=
pFile
.
fileName
();
QString
filepath
=
pFile
.
fileName
();
if
(
importAdaptor
->
folderToCopy
()
!=
""
)
if
(
importAdaptor
->
folderToCopy
()
!=
""
)
{
{
bool
b
=
UBPersistenceManager
::
persistenceManager
()
->
addFileToDocument
(
document
,
pFile
.
fileName
(),
importAdaptor
->
folderToCopy
()
,
uuid
,
filepath
);
bool
b
=
UBPersistenceManager
::
persistenceManager
()
->
addFileToDocument
(
document
,
pFile
.
fileName
(),
importAdaptor
->
folderToCopy
()
,
uuid
,
filepath
);
if
(
!
b
)
if
(
!
b
)
{
{
UBPersistenceManager
::
persistenceManager
()
->
deleteDocument
(
document
);
UBPersistenceManager
::
persistenceManager
()
->
deleteDocument
(
document
);
UBApplication
::
setDisabled
(
false
);
UBApplication
::
setDisabled
(
false
);
return
NULL
;
return
NULL
;
}
}
}
}
QList
<
UBGraphicsItem
*>
pages
=
importAdaptor
->
import
(
uuid
,
filepath
);
QList
<
UBGraphicsItem
*>
pages
=
importAdaptor
->
import
(
uuid
,
filepath
);
int
nPage
=
0
;
int
nPage
=
0
;
foreach
(
UBGraphicsItem
*
page
,
pages
)
foreach
(
UBGraphicsItem
*
page
,
pages
)
{
{
UBApplication
::
showMessage
(
tr
(
"Inserting page %1 of %2"
).
arg
(
++
nPage
).
arg
(
pages
.
size
()),
true
);
UBApplication
::
showMessage
(
tr
(
"Inserting page %1 of %2"
).
arg
(
++
nPage
).
arg
(
pages
.
size
()),
true
);
int
pageIndex
=
document
->
pageCount
();
int
pageIndex
=
document
->
pageCount
();
UBGraphicsScene
*
scene
=
UBPersistenceManager
::
persistenceManager
()
->
createDocumentSceneAt
(
document
,
pageIndex
);
UBGraphicsScene
*
scene
=
UBPersistenceManager
::
persistenceManager
()
->
createDocumentSceneAt
(
document
,
pageIndex
);
importAdaptor
->
placeImportedItemToScene
(
scene
,
page
);
importAdaptor
->
placeImportedItemToScene
(
scene
,
page
);
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentScene
(
document
,
scene
,
pageIndex
);
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentScene
(
document
,
scene
,
pageIndex
);
}
}
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentMetadata
(
document
);
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentMetadata
(
document
);
UBApplication
::
showMessage
(
tr
(
"Import successful."
));
UBApplication
::
showMessage
(
tr
(
"Import successful."
));
...
@@ -216,28 +216,28 @@ int UBDocumentManager::addFilesToDocument(UBDocumentProxy* document, QStringList
...
@@ -216,28 +216,28 @@ int UBDocumentManager::addFilesToDocument(UBDocumentProxy* document, QStringList
{
{
UBPageBasedImportAdaptor
*
importAdaptor
=
(
UBPageBasedImportAdaptor
*
)
adaptor
;
UBPageBasedImportAdaptor
*
importAdaptor
=
(
UBPageBasedImportAdaptor
*
)
adaptor
;
QUuid
uuid
=
QUuid
::
createUuid
();
QUuid
uuid
=
QUuid
::
createUuid
();
QString
filepath
=
file
.
fileName
();
QString
filepath
=
file
.
fileName
();
if
(
importAdaptor
->
folderToCopy
()
!=
""
)
if
(
importAdaptor
->
folderToCopy
()
!=
""
)
{
{
bool
b
=
UBPersistenceManager
::
persistenceManager
()
->
addFileToDocument
(
document
,
file
.
fileName
(),
importAdaptor
->
folderToCopy
()
,
uuid
,
filepath
);
bool
b
=
UBPersistenceManager
::
persistenceManager
()
->
addFileToDocument
(
document
,
file
.
fileName
(),
importAdaptor
->
folderToCopy
()
,
uuid
,
filepath
);
if
(
!
b
)
if
(
!
b
)
{
{
continue
;
continue
;
}
}
}
}
QList
<
UBGraphicsItem
*>
pages
=
importAdaptor
->
import
(
uuid
,
filepath
);
QList
<
UBGraphicsItem
*>
pages
=
importAdaptor
->
import
(
uuid
,
filepath
);
int
nPage
=
0
;
int
nPage
=
0
;
foreach
(
UBGraphicsItem
*
page
,
pages
)
foreach
(
UBGraphicsItem
*
page
,
pages
)
{
{
UBApplication
::
showMessage
(
tr
(
"Inserting page %1 of %2"
).
arg
(
++
nPage
).
arg
(
pages
.
size
()),
true
);
UBApplication
::
showMessage
(
tr
(
"Inserting page %1 of %2"
).
arg
(
++
nPage
).
arg
(
pages
.
size
()),
true
);
int
pageIndex
=
document
->
pageCount
();
int
pageIndex
=
document
->
pageCount
();
UBGraphicsScene
*
scene
=
UBPersistenceManager
::
persistenceManager
()
->
createDocumentSceneAt
(
document
,
pageIndex
);
UBGraphicsScene
*
scene
=
UBPersistenceManager
::
persistenceManager
()
->
createDocumentSceneAt
(
document
,
pageIndex
);
importAdaptor
->
placeImportedItemToScene
(
scene
,
page
);
importAdaptor
->
placeImportedItemToScene
(
scene
,
page
);
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentScene
(
document
,
scene
,
pageIndex
);
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentScene
(
document
,
scene
,
pageIndex
);
UBApplication
::
boardController
->
addEmptyThumbPage
();
UBApplication
::
boardController
->
addEmptyThumbPage
();
}
}
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentMetadata
(
document
);
UBPersistenceManager
::
persistenceManager
()
->
persistDocumentMetadata
(
document
);
UBApplication
::
showMessage
(
tr
(
"Import of file %1 successful."
).
arg
(
file
.
fileName
()));
UBApplication
::
showMessage
(
tr
(
"Import of file %1 successful."
).
arg
(
file
.
fileName
()));
...
...
src/core/UBPersistenceManager.cpp
View file @
c89eb864
...
@@ -587,6 +587,10 @@ UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy,
...
@@ -587,6 +587,10 @@ UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy,
return
mSceneCache
.
value
(
proxy
,
sceneIndex
);
return
mSceneCache
.
value
(
proxy
,
sceneIndex
);
else
{
else
{
UBGraphicsScene
*
scene
=
UBSvgSubsetAdaptor
::
loadScene
(
proxy
,
sceneIndex
);
UBGraphicsScene
*
scene
=
UBSvgSubsetAdaptor
::
loadScene
(
proxy
,
sceneIndex
);
if
(
!
scene
&&
UBSettings
::
settings
()
->
teacherGuidePageZeroActivated
->
get
().
toBool
()){
createDocumentSceneAt
(
proxy
,
0
);
scene
=
UBSvgSubsetAdaptor
::
loadScene
(
proxy
,
0
);
}
if
(
scene
)
if
(
scene
)
mSceneCache
.
insert
(
proxy
,
sceneIndex
,
scene
);
mSceneCache
.
insert
(
proxy
,
sceneIndex
,
scene
);
...
...
src/core/main.cpp
View file @
c89eb864
...
@@ -127,9 +127,9 @@ int main(int argc, char *argv[])
...
@@ -127,9 +127,9 @@ int main(int argc, char *argv[])
app
.
initialize
(
false
);
app
.
initialize
(
false
);
QObject
::
connect
(
&
app
,
SIGNAL
(
messageReceived
(
const
QString
&
)),
&
app
,
QObject
::
connect
(
&
app
,
SIGNAL
(
messageReceived
(
const
QString
&
)),
&
app
,
SLOT
(
handleOpenMessage
(
const
QString
&
)));
SLOT
(
handleOpenMessage
(
const
QString
&
)));
qDebug
()
<<
fileToOpen
;
int
result
=
app
.
exec
(
fileToOpen
);
int
result
=
app
.
exec
(
fileToOpen
);
app
.
cleanup
();
app
.
cleanup
();
...
...
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