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
1d130b3e
Commit
1d130b3e
authored
Aug 10, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SANKORE-896
Impossible to write an ê and an ë using the keyboard
parent
42d1fcb6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
33 deletions
+46
-33
UBGraphicsItemDelegate.cpp
src/domain/UBGraphicsItemDelegate.cpp
+3
-3
UBKeyboardPalette.cpp
src/gui/UBKeyboardPalette.cpp
+2
-0
UBKeyboardPalette.h
src/gui/UBKeyboardPalette.h
+6
-4
UBKeyboardPalette_linux.cpp
src/gui/UBKeyboardPalette_linux.cpp
+3
-0
UBKeyboardPalette_mac.cpp
src/gui/UBKeyboardPalette_mac.cpp
+27
-24
UBKeyboardPalette_win.cpp
src/gui/UBKeyboardPalette_win.cpp
+5
-2
No files found.
src/domain/UBGraphicsItemDelegate.cpp
View file @
1d130b3e
...
...
@@ -107,12 +107,12 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec
,
mFrame
(
0
)
,
mFrameWidth
(
UBSettings
::
settings
()
->
objectFrameWidth
)
,
mAntiScaleRatio
(
1.0
)
,
mToolBarItem
(
NULL
)
,
mCanRotate
(
canRotate
)
,
mCanDuplicate
(
true
)
,
mRespectRatio
(
respectRatio
)
,
mMimeData
(
NULL
)
,
mFlippable
(
false
)
,
mToolBarItem
(
NULL
)
,
mToolBarUsed
(
useToolBar
)
{
// NOOP
...
...
@@ -1075,11 +1075,11 @@ void MediaTimer::display(const QString &s)
void
MediaTimer
::
setNumDigits
(
int
numDigits
)
{
if
(
numDigits
>
99
)
{
qWarning
(
"QLCDNumber::setNumDigits:
(%s)
Max 99 digits allowed"
);
qWarning
(
"QLCDNumber::setNumDigits: Max 99 digits allowed"
);
numDigits
=
99
;
}
if
(
numDigits
<
0
)
{
qWarning
(
"QLCDNumber::setNumDigits:
(%s)
Min 0 digits allowed"
);
qWarning
(
"QLCDNumber::setNumDigits: Min 0 digits allowed"
);
numDigits
=
0
;
}
if
(
digitStr
.
isNull
())
{
// from constructor
...
...
src/gui/UBKeyboardPalette.cpp
View file @
1d130b3e
...
...
@@ -243,6 +243,8 @@ void UBKeyboardPalette::adjustSizeAndPosition(bool pUp)
void
UBKeyboardPalette
::
paintEvent
(
QPaintEvent
*
event
)
{
checkLayout
();
UBActionPalette
::
paintEvent
(
event
);
QRect
r
=
this
->
geometry
();
...
...
src/gui/UBKeyboardPalette.h
View file @
1d130b3e
...
...
@@ -127,6 +127,7 @@ protected:
void
init
();
private
:
QRect
originalRect
;
...
...
@@ -134,6 +135,11 @@ private:
UBKeyButton
**
buttons
;
UBKeyboardButton
**
ctrlButtons
;
/*
For MacOS: synchronization with system locale.
*/
void
checkLayout
();
void
createCtrlButtons
();
void
setInput
(
const
UBKeyboardLocale
*
locale
);
...
...
@@ -145,10 +151,6 @@ private:
void
*
storage
;
// Linux-related parameters
int
min_keycodes
,
max_keycodes
,
byte_per_code
;
// Save locale before activation to restore it after (MAC)
QString
activeLocale
;
};
class
UBKeyboardButton
:
public
QWidget
...
...
src/gui/UBKeyboardPalette_linux.cpp
View file @
1d130b3e
...
...
@@ -164,6 +164,9 @@ void UBKeyboardPalette::createCtrlButtons()
}
void
UBKeyboardPalette
::
checkLayout
()
{}
void
UBKeyboardPalette
::
onActivated
(
bool
activated
)
{
if
(
activated
)
...
...
src/gui/UBKeyboardPalette_mac.cpp
View file @
1d130b3e
...
...
@@ -74,32 +74,35 @@ void SetMacLocaleByIdentifier(const QString& id)
}
}
void
UBKeyboardPalette
::
onActivated
(
bool
activated
)
void
UBKeyboardPalette
::
checkLayout
()
{
if
(
activated
)
{
TISInputSourceRef
selectedLocale
=
TISCopyCurrentKeyboardInputSource
();
CFStringRef
sr
=
(
CFStringRef
)
TISGetInputSourceProperty
(
selectedLocale
,
kTISPropertyInputSourceID
);
if
(
sr
!=
NULL
)
{
char
tmp
[
1024
];
CFStringGetCString
(
sr
,
tmp
,
1024
,
0
);
activeLocale
=
tmp
;
}
else
activeLocale
=
""
;
TISInputSourceRef
selectedLocale
=
TISCopyCurrentKeyboardInputSource
();
onLocaleChanged
(
locales
[
nCurrentLocale
]);
}
else
{
if
(
activeLocale
!=
""
)
SetMacLocaleByIdentifier
(
activeLocale
);
}
CFStringRef
sr
=
(
CFStringRef
)
TISGetInputSourceProperty
(
selectedLocale
,
kTISPropertyInputSourceID
);
if
(
sr
!=
NULL
)
{
char
clId
[
1024
];
CFStringGetCString
(
sr
,
clId
,
1024
,
0
);
for
(
int
i
=
0
;
i
<
nLocalesCount
;
i
++
)
{
if
(
locales
[
i
]
->
id
==
clId
)
{
if
(
nCurrentLocale
!=
i
)
{
setLocale
(
i
);
}
break
;
}
}
}
}
void
UBKeyboardPalette
::
onActivated
(
bool
)
{
}
void
UBKeyboardPalette
::
onLocaleChanged
(
UBKeyboardLocale
*
locale
)
...
...
src/gui/UBKeyboardPalette_win.cpp
View file @
1d130b3e
...
...
@@ -64,9 +64,12 @@ void UBKeyboardPalette::createCtrlButtons()
ctrlButtons
[
ctrlID
++
]
=
new
UBLocaleButton
(
this
);
// Language Switch
}
void
UBKeyboardPalette
::
checkLayout
()
{}
void
UBKeyboardPalette
::
onActivated
(
bool
)
{
}
{
}
void
UBKeyboardPalette
::
onLocaleChanged
(
UBKeyboardLocale
*
)
{}
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