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
adb884c8
Commit
adb884c8
authored
5 years ago
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
be able to double click on ubx files (WIP)
parent
40c334c1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
2 deletions
+37
-2
package.sh
release_scripts/linux/package.sh
+2
-0
openboard-ubx.xml
resources/linux/openboard-ubx.xml
+8
-0
UBApplication.cpp
src/core/UBApplication.cpp
+6
-1
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+20
-1
UBApplicationController.h
src/core/UBApplicationController.h
+1
-0
No files found.
release_scripts/linux/package.sh
View file @
adb884c8
...
...
@@ -181,6 +181,7 @@ chown -R root:root $PACKAGE_DIRECTORY
cp
-R
resources/customizations
$PACKAGE_DIRECTORY
/
cp
resources/linux/openboard-ubz.xml
$PACKAGE_DIRECTORY
/etc/
cp
resources/linux/openboard-ubx.xml
$PACKAGE_DIRECTORY
/etc/
if
$BUNDLE_QT
;
then
cp
-R
resources/linux/run.sh
$PACKAGE_DIRECTORY
/
...
...
@@ -284,6 +285,7 @@ cat > "$BASE_WORKING_DIR/DEBIAN/postinst" << EOF
xdg-desktop-menu install --novendor /usr/share/applications/
${
APPLICATION_CODE
}
.desktop
xdg-mime install --mode system /
$APPLICATION_PATH
/
$APPLICATION_CODE
/etc/openboard-ubz.xml
xdg-mime install --mode system /
$APPLICATION_PATH
/
$APPLICATION_CODE
/etc/openboard-ubx.xml
xdg-mime default /usr/share/applications/
${
APPLICATION_CODE
}
.desktop application/ubz
ln -s
$SYMLINK_TARGET
/usr/bin/
$APPLICATION_CODE
...
...
This diff is collapsed.
Click to expand it.
resources/linux/openboard-ubx.xml
0 → 100644
View file @
adb884c8
<?xml version="1.0"?>
<mime-info
xmlns=
'http://www.freedesktop.org/standards/shared-mime-info'
>
<mime-type
type=
"application/ubx"
>
<comment>
OpenBoard documents set
</comment>
<comment
xml:lang=
"fr"
>
Ensemble de documents OpenBoard
</comment>
<glob
pattern=
"*.ubx"
/>
</mime-type>
</mime-info>
This diff is collapsed.
Click to expand it.
src/core/UBApplication.cpp
View file @
adb884c8
...
...
@@ -349,7 +349,12 @@ int UBApplication::exec(const QString& pFileToImport)
boardController
->
setupLayout
();
if
(
pFileToImport
.
length
()
>
0
)
UBApplication
::
applicationController
->
importFile
(
pFileToImport
);
{
if
(
pFileToImport
.
endsWith
(
".ubx"
))
UBApplication
::
applicationController
->
importUbx
(
pFileToImport
);
else
UBApplication
::
applicationController
->
importFile
(
pFileToImport
);
}
if
(
UBSettings
::
settings
()
->
appStartMode
->
get
().
toInt
())
applicationController
->
showDesktop
();
...
...
This diff is collapsed.
Click to expand it.
src/core/UBApplicationController.cpp
View file @
adb884c8
...
...
@@ -675,7 +675,6 @@ void UBApplicationController::showMessage(const QString& message, bool showSpinn
}
}
void
UBApplicationController
::
importFile
(
const
QString
&
pFilePath
)
{
const
QFile
fileToOpen
(
pFilePath
);
...
...
@@ -709,6 +708,26 @@ void UBApplicationController::importFile(const QString& pFilePath)
}
}
void
UBApplicationController
::
importUbx
(
const
QString
&
pFilePath
)
{
bool
success
=
false
;
QFileInfoList
list
=
UBDocumentManager
::
documentManager
()
->
importUbx
(
pFilePath
,
UBSettings
::
userDocumentDirectory
());
success
=
(
list
.
length
()
!=
0
);
if
(
success
)
{
if
(
mMainMode
==
Board
||
mMainMode
==
Internet
)
{
if
(
UBApplication
::
boardController
)
{
showBoard
();
}
}
}
}
void
UBApplicationController
::
useMultiScreen
(
bool
use
)
{
if
(
use
&&
!
mMirror
)
...
...
This diff is collapsed.
Click to expand it.
src/core/UBApplicationController.h
View file @
adb884c8
...
...
@@ -93,6 +93,7 @@ class UBApplicationController : public QObject
void
showMessage
(
const
QString
&
message
,
bool
showSpinningWheel
);
void
importFile
(
const
QString
&
pFilePath
);
void
importUbx
(
const
QString
&
pFilePath
);
UBDisplayManager
*
displayManager
()
{
...
...
This diff is collapsed.
Click to expand it.
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