diff options
author | Denis Fomin <fominde@gmail.com> | 2013-07-30 21:35:09 +0400 |
---|---|---|
committer | Denis Fomin <fominde@gmail.com> | 2013-07-30 21:35:09 +0400 |
commit | 657b820f719806f206421ac04a72ef5f26de8004 (patch) | |
tree | 7cbdd3a57c6a134d2de5e1923af913eedee703ab | |
parent | ed66ede1762abb31b8bbadaa79d12a90593de20a (diff) |
GuiForMePlugin. available in py3
-rw-r--r-- | gui_for_me/__init__.py | 2 | ||||
-rw-r--r-- | gui_for_me/gui_for_me.py | 24 | ||||
-rw-r--r-- | gui_for_me/manifest.ini | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/gui_for_me/__init__.py b/gui_for_me/__init__.py index 5d798ed..fd37564 100644 --- a/gui_for_me/__init__.py +++ b/gui_for_me/__init__.py @@ -1 +1 @@ -from gui_for_me import GuiForMe +from .gui_for_me import GuiForMe diff --git a/gui_for_me/gui_for_me.py b/gui_for_me/gui_for_me.py index cdf3b08..d8e6494 100644 --- a/gui_for_me/gui_for_me.py +++ b/gui_for_me/gui_for_me.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -import gtk +from gi.repository import Gtk +from gi.repository import GdkPixbuf from common import gajim from plugins import GajimPlugin @@ -57,25 +58,24 @@ class Base(object): def create_buttons(self): # create juick 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.RELIEF_NONE) + self.button = Gtk.Button(label=None, stock=None, use_underline=True) + self.button.set_property('relief', Gtk.ReliefStyle.NONE) self.button.set_property('can-focus', False) - img = gtk.Image() + img = Gtk.Image() img_path = self.plugin.local_file_path('gui_for_me.png') - pixbuf = gtk.gdk.pixbuf_new_from_file(img_path) - iconset = gtk.IconSet(pixbuf=pixbuf) - factory = gtk.IconFactory() + 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.ICON_SIZE_MENU) + img.set_from_stock('gui_for_me', Gtk.IconSize.MENU) self.button.set_image(img) self.button.set_tooltip_text(_('Insert /me to conversation input box,' ' at cursor position')) send_button = self.chat_control.xml.get_object('send_button') - send_button_pos = actions_hbox.child_get_property(send_button, - 'position') - actions_hbox.add_with_properties(self.button, 'position', - send_button_pos - 1, 'expand', False) + actions_hbox.pack_start(self.button, False, False , 0) + actions_hbox.reorder_child(self.button, + len(actions_hbox.get_children()) - 3) id_ = self.button.connect('clicked', self.on_me_button_clicked) self.chat_control.handlers[id_] = self.button self.button.show() diff --git a/gui_for_me/manifest.ini b/gui_for_me/manifest.ini index 0b29a4c..04d597c 100644 --- a/gui_for_me/manifest.ini +++ b/gui_for_me/manifest.ini @@ -7,4 +7,4 @@ authors: BomberMan copper Denis Fomin <fominde@gmail.com> homepage: http://trac-plugins.gajim.org/wiki/GUIForMePlugin -max_gajim_version: 0.15.9 +min_gajim_version: 0.16.10 |