diff options
author | Denis Fomin <fominde@gmail.com> | 2018-03-07 23:07:11 +0300 |
---|---|---|
committer | Denis Fomin <fominde@gmail.com> | 2018-03-08 00:00:20 +0300 |
commit | b17e4dccd6e2de1a73f1242c0cda32484117adeb (patch) | |
tree | c246529a0ab0d49423b079c03a275fec075d41dc /image | |
parent | be3f2d160ebbef1b6c3b463c6d45eb6d4d7be065 (diff) |
[image] Fix button
Diffstat (limited to 'image')
-rw-r--r-- | image/image.py | 13 | ||||
-rw-r--r-- | image/manifest.ini | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/image/image.py b/image/image.py index 51dc203..aa31ce0 100644 --- a/image/image.py +++ b/image/image.py @@ -52,7 +52,7 @@ class ImagePlugin(GajimPlugin): if base.chat_control == chat_control: is_support_xhtml = chat_control.contact.supports(NS_XHTML_IM) base.button.set_sensitive(is_support_xhtml and not \ - chat_control.gpg_is_active) + chat_control.encryption) if not is_support_xhtml: text = _('This contact does not support XHTML_IM') else: @@ -64,13 +64,16 @@ class Base(object): def __init__(self, plugin, chat_control): self.plugin = plugin self.chat_control = chat_control - actions_hbox = chat_control.xml.get_object('actions_hbox') + actions_hbox = chat_control.xml.get_object('hbox') self.button = Gtk.Button(label=None, stock=None, use_underline=True) + self.button.get_style_context().add_class( + 'chatcontrol-actionbar-button') self.button.set_property('relief', Gtk.ReliefStyle.NONE) self.button.set_property('can-focus', False) img = Gtk.Image() - img.set_from_stock('gtk-orientation-portrait', Gtk.IconSize.MENU) + img.set_from_icon_name('image-x-generic-symbolic.symbolic', + Gtk.IconSize.MENU) self.button.set_image(img) self.button.set_tooltip_text('Send image (Alt+L)') ag = Gtk.accel_groups_from_object(self.chat_control.parent_win.window)[0] @@ -79,7 +82,7 @@ class Base(object): actions_hbox.pack_start(self.button, False, False , 0) actions_hbox.reorder_child(self.button, - len(actions_hbox.get_children()) - 3) + len(actions_hbox.get_children()) - 2) id_ = self.button.connect('clicked', self.on_image_button_clicked) self.button.show() @@ -135,5 +138,5 @@ class Base(object): dlg = ImageChooserDialog(on_response_ok=on_ok, on_response_cancel=None) def disconnect_from_chat_control(self): - actions_hbox = self.chat_control.xml.get_object('actions_hbox') + actions_hbox = self.chat_control.xml.get_object('hbox') actions_hbox.remove(self.button) diff --git a/image/manifest.ini b/image/manifest.ini index 92dfae5..f31fa1e 100644 --- a/image/manifest.ini +++ b/image/manifest.ini @@ -1,7 +1,7 @@ [info] name: Image short_name: image -version: 0.5.2 +version: 0.6 description: This plugin is designed to send a small(0 - 40 kb) graphic image to your contact. Client on the other side must support XEP-0071: XHTML-IM and maintain the scheme data: URI. Psi+ and Jabbim supported this. |