Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <mailtrash@posteo.de>2018-02-26 22:00:22 +0300
committerPhilipp Hörist <philipp@hoerist.com>2018-02-26 23:24:37 +0300
commit7f243843a0e8e1481e84adf06fbc5e5e98346f99 (patch)
treea835ac752fa42708f4c82c90fe309d95594307b4
parent03cd61e51493adc7d40dde743efcd2e3b3a36039 (diff)
[gui_for_me] Fix GUI For Me button
-rw-r--r--gui_for_me/gui_for_me.pngbin818 -> 885 bytes
-rw-r--r--gui_for_me/gui_for_me.py20
2 files changed, 10 insertions, 10 deletions
diff --git a/gui_for_me/gui_for_me.png b/gui_for_me/gui_for_me.png
index ee4e219..9325cb0 100644
--- a/gui_for_me/gui_for_me.png
+++ b/gui_for_me/gui_for_me.png
Binary files differ
diff --git a/gui_for_me/gui_for_me.py b/gui_for_me/gui_for_me.py
index 1cd907a..494ff63 100644
--- a/gui_for_me/gui_for_me.py
+++ b/gui_for_me/gui_for_me.py
@@ -6,13 +6,14 @@ from gi.repository import GdkPixbuf
from gajim.common import app
from gajim.plugins import GajimPlugin
from gajim.plugins.helpers import log_calls
+from gajim import gtkgui_helpers
class GuiForMe(GajimPlugin):
@log_calls('GuiForMePlugin')
def init(self):
- self.description = _('Gui for the \'/me\' command.')
+ self.description = _('Adds a button for the \'/me\' command.')
self.config_dialog = None # GuiForMePluginConfigDialog(self)
self.gui_extension_points = {
'chat_control_base': (self.connect_with_chat_control,
@@ -57,18 +58,16 @@ class Base(object):
def create_buttons(self):
# create /me button
- actions_hbox = self.chat_control.xml.get_object('actions_hbox')
- self.button = Gtk.Button(label=None, stock=None, use_underline=True)
- self.button.set_property('relief', Gtk.ReliefStyle.NONE)
+ actions_hbox = self.chat_control.xml.get_object('hbox')
+ self.button = Gtk.Button(label=None, stock=None, use_underline=False)
+ self.button.get_style_context().add_class(
+ 'chatcontrol-actionbar-button')
+ self.button.set_relief(Gtk.ReliefStyle.NONE)
self.button.set_property('can-focus', False)
img = Gtk.Image()
img_path = self.plugin.local_file_path('gui_for_me.png')
pixbuf = GdkPixbuf.Pixbuf.new_from_file(img_path)
- iconset = Gtk.IconSet(pixbuf=pixbuf)
- factory = Gtk.IconFactory()
- factory.add('gui_for_me', iconset)
- factory.add_default()
- img.set_from_stock('gui_for_me', Gtk.IconSize.MENU)
+ img.set_from_pixbuf(pixbuf)
self.button.set_image(img)
self.button.set_tooltip_text(_('Insert /me to conversation input box,'
' at cursor position'))
@@ -84,9 +83,10 @@ class Base(object):
Insert /me to conversation input box, at cursor position
"""
message_buffer = self.chat_control.msg_textview.get_buffer()
+ self.chat_control.msg_textview.remove_placeholder()
message_buffer.insert_at_cursor('/me ')
self.chat_control.msg_textview.grab_focus()
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)