Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim-plugins
Commits
d4596acb
Commit
d4596acb
authored
Feb 27, 2018
by
Daniel Brötzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[triggers] Remove .decode('utf-8') on get_text()
parent
3d8194d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
triggers/triggers.py
triggers/triggers.py
+8
-10
No files found.
triggers/triggers.py
View file @
d4596acb
...
...
@@ -24,16 +24,16 @@ import sys
import
os
from
gajim.common
import
app
from
gajim.common
import
ged
from
gajim.common
import
helpers
from
gajim.plugins
import
GajimPlugin
from
gajim.plugins.helpers
import
log_calls
from
gajim.plugins.gui
import
GajimPluginConfigDialog
from
gajim.common
import
ged
from
gajim.common
import
helpers
from
gajim.dialogs
import
SoundChooserDialog
class
Triggers
(
GajimPlugin
):
@
log_calls
(
'TriggersPlugin'
)
def
init
(
self
):
self
.
description
=
_
(
'Configure Gajim
\'
s behaviour for each contact'
)
...
...
@@ -584,7 +584,7 @@ class TriggersPluginConfigDialog(GajimPluginConfigDialog):
def
on_recipient_list_entry_changed
(
self
,
widget
):
if
self
.
active_num
<
0
:
return
recipients
=
widget
.
get_text
()
.
decode
(
'utf-8'
)
recipients
=
widget
.
get_text
()
#TODO: do some check
self
.
config
[
self
.
active_num
][
'recipients'
]
=
recipients
self
.
set_treeview_string
()
...
...
@@ -715,19 +715,18 @@ class TriggersPluginConfigDialog(GajimPluginConfigDialog):
self
.
config
[
self
.
active_num
][
'sound_file'
]
=
path_to_snd_file
self
.
sound_entry
.
set_text
(
path_to_snd_file
)
path_to_snd_file
=
self
.
sound_entry
.
get_text
()
.
decode
(
'utf-8'
)
path_to_snd_file
=
self
.
sound_entry
.
get_text
()
path_to_snd_file
=
os
.
path
.
join
(
os
.
getcwd
(),
path_to_snd_file
)
dialog
=
SoundChooserDialog
(
path_to_snd_file
,
on_ok
)
def
on_play_button_clicked
(
self
,
widget
):
helpers
.
play_sound_file
(
self
.
sound_entry
.
get_text
()
.
decode
(
'utf-8'
)
)
helpers
.
play_sound_file
(
self
.
sound_entry
.
get_text
())
def
on_disable_sound_cb_toggled
(
self
,
widget
):
self
.
on_disable_it_toggled
(
widget
,
self
.
use_sound_cb
,
'sound'
)
def
on_sound_entry_changed
(
self
,
widget
):
self
.
config
[
self
.
active_num
][
'sound_file'
]
=
widget
.
get_text
().
\
decode
(
'utf-8'
)
self
.
config
[
self
.
active_num
][
'sound_file'
]
=
widget
.
get_text
()
def
on_use_popup_cb_toggled
(
self
,
widget
):
self
.
on_use_it_toggled
(
widget
,
self
.
disable_popup_cb
,
'popup'
)
...
...
@@ -749,8 +748,7 @@ class TriggersPluginConfigDialog(GajimPluginConfigDialog):
self
.
command_entry
.
set_sensitive
(
False
)
def
on_command_entry_changed
(
self
,
widget
):
self
.
config
[
self
.
active_num
][
'command'
]
=
widget
.
get_text
().
\
decode
(
'utf-8'
)
self
.
config
[
self
.
active_num
][
'command'
]
=
widget
.
get_text
()
def
on_use_systray_cb_toggled
(
self
,
widget
):
self
.
on_use_it_toggled
(
widget
,
self
.
disable_systray_cb
,
'systray'
)
...
...
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