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
b48e4619
Commit
b48e4619
authored
Jul 22, 2013
by
Dicson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QuickRepliesPlugin,GuiForMePlugin.change buttons state when the status has changed
parent
1e62bf73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
gui_for_me/gui_for_me.py
gui_for_me/gui_for_me.py
+2
-1
quick_replies/plugin.py
quick_replies/plugin.py
+6
-4
No files found.
gui_for_me/gui_for_me.py
View file @
b48e4619
...
...
@@ -41,7 +41,8 @@ class GuiForMe(GajimPlugin):
for
base
in
self
.
controls
:
if
base
.
chat_control
!=
chat_control
:
continue
base
.
button
.
set_sensitive
(
chat_control
.
msg_textview
.
get_sensitive
())
base
.
button
.
set_sensitive
(
chat_control
.
contact
.
show
!=
'offline'
\
and
gajim
.
connections
[
chat_control
.
account
].
connected
>
0
)
class
Base
(
object
):
...
...
quick_replies/plugin.py
View file @
b48e4619
import
gtk
import
gtkgui_helpers
from
common
import
gajim
from
plugins
import
GajimPlugin
from
plugins.gui
import
GajimPluginConfigDialog
...
...
@@ -37,8 +38,8 @@ class QuickRepliesPlugin(GajimPlugin):
def
connect_with_chat_control
(
self
,
chat_control
):
self
.
chat_control
=
chat_control
control
=
Base
(
self
,
self
.
chat_control
)
self
.
controls
.
append
(
control
)
base
=
Base
(
self
,
chat_control
)
self
.
controls
.
append
(
base
)
@
log_calls
(
'QuickRepliesPlugin'
)
def
disconnect_from_chat_control
(
self
,
chat_control
):
...
...
@@ -47,12 +48,13 @@ class QuickRepliesPlugin(GajimPlugin):
control
.
disconnect_from_chat_control
()
self
.
controls
=
[]
@
log_calls
(
'
GuiForMe
Plugin'
)
@
log_calls
(
'
QuickReplies
Plugin'
)
def
update_button_state
(
self
,
chat_control
):
for
base
in
self
.
controls
:
if
base
.
chat_control
!=
chat_control
:
continue
base
.
button
.
set_sensitive
(
chat_control
.
msg_textview
.
get_sensitive
())
base
.
button
.
set_sensitive
(
chat_control
.
contact
.
show
!=
'offline'
\
and
gajim
.
connections
[
chat_control
.
account
].
connected
>
0
)
class
Base
(
object
):
...
...
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