diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-10-21 16:51:08 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-10-21 16:51:08 +0300 |
commit | f90b27b2b70d5cf0c9189d31358f0302d4698b18 (patch) | |
tree | b2272197165e67ded08d589c1f7b4f0b8f743151 | |
parent | 6a82485e23df4b1fd4d4f60cabbd716a61257cf9 (diff) |
[httpupload] Prepare for new ChatControl design
-rw-r--r-- | httpupload/httpupload.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/httpupload/httpupload.py b/httpupload/httpupload.py index 22c29b4..be665ea 100644 --- a/httpupload/httpupload.py +++ b/httpupload/httpupload.py @@ -117,6 +117,8 @@ class HTTPUploadPlugin(GajimPlugin): if jid not in interface.controls: return actions_hbox = chat_control.xml.get_object('actions_hbox') + if actions_hbox is None: + actions_hbox = chat_control.xml.get_object('hbox') actions_hbox.remove(interface.controls[jid]) def update_chat_control(self, chat_control): @@ -152,6 +154,11 @@ class Base(object): button.set_image(img) button.set_relief(Gtk.ReliefStyle.NONE) + if actions_hbox is None: + actions_hbox = chat_control.xml.get_object('hbox') + style = button.get_style_context() + style.add_class('chatcontrol-actionbar-button') + actions_hbox.add(button) self.controls[jid] = button |