Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
be903616
Commit
be903616
authored
18 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
we now save speller_language per contact. For #2387
parent
a8beb108
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/chat_control.py
+7
-2
7 additions, 2 deletions
src/chat_control.py
src/common/config.py
+2
-1
2 additions, 1 deletion
src/common/config.py
with
9 additions
and
3 deletions
src/chat_control.py
+
7
−
2
View file @
be903616
...
...
@@ -184,7 +184,11 @@ class ChatControlBase(MessageControl):
except
:
del
langs
[
lang
]
# now set the one the user selected
lang
=
gajim
.
config
.
get
(
'
speller_language
'
)
lang
=
gajim
.
config
.
get_per
(
'
contacts
'
,
self
.
contact
.
jid
,
'
speller_language
'
)
if
not
lang
:
# use the default one
lang
=
gajim
.
config
.
get
(
'
speller_language
'
)
if
lang
:
self
.
msg_textview
.
lang
=
lang
spell
.
set_language
(
lang
)
...
...
@@ -207,7 +211,8 @@ class ChatControlBase(MessageControl):
def
on_msg_textview_populate_popup
(
self
,
textview
,
menu
):
'''
we override the default context menu and we prepend an option to switch languages
'''
def
_on_select_dictionary
(
widget
,
lang
):
gajim
.
config
.
set
(
'
speller_language
'
,
lang
)
gajim
.
config
.
set_per
(
'
contacts
'
,
self
.
contact
.
jid
,
'
speller_language
'
,
lang
)
spell
=
gtkspell
.
get_from_text_view
(
self
.
msg_textview
)
self
.
msg_textview
.
lang
=
lang
spell
.
set_language
(
lang
)
...
...
This diff is collapsed.
Click to expand it.
src/common/config.py
+
2
−
1
View file @
be903616
...
...
@@ -296,7 +296,8 @@ class Config:
'
state_muc_directed_msg_color
'
:
[
opt_color
,
'
red2
'
],
},
{}),
'
contacts
'
:
({
'
gpg_enabled
'
:
[
opt_bool
,
True
],
'
gpg_enabled
'
:
[
opt_bool
,
True
,
_
(
'
Do we have GPG enabled for this contact
'
)],
'
speller_language
'
:
[
opt_str
,
''
,
_
(
'
Language for which we want to check misspeller words
'
)],
},
{}),
'
notifications
'
:
({
'
event
'
:
[
opt_str
,
''
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment