changeset 4278d1e4f3df in /home/hg/repos/gajim
branches: gtk3
details:http://hg.gajim.org/gajim?cmd=changeset;node=4278d1e4f3df
description: remove useless function
diffstat:
src/chat_control.py | 30 +-----------------------------
1 files changed, 1 insertions(+), 29 deletions(-)
diffs (41 lines):
diff -r 88b5249b9a9c -r 4278d1e4f3df src/chat_control.py
--- a/src/chat_control.py Tue Jul 30 20:09:52 2013 +0200
+++ b/src/chat_control.py Wed Jul 31 10:41:16 2013 +0200
@@ -715,36 +715,8 @@
def show_emoticons_menu(self):
if not gajim.config.get('emoticons_theme'):
return
-
- def set_emoticons_menu_position(w, msg_tv=self.msg_textview):
- window = msg_tv.get_window(Gtk.TextWindowType.WIDGET)
- # get the window position
- origin = window.get_origin()[1:]
- size = window.get_size()
- buf = msg_tv.get_buffer()
- # get the cursor position
- cursor = msg_tv.get_iter_location(buf.get_iter_at_mark(
- buf.get_insert()))
- cursor = msg_tv.buffer_to_window_coords(Gtk.TextWindowType.TEXT,
- cursor.x, cursor.y)
- x = origin[0] + cursor[0]
- y = origin[1] + size[1]
- menu_height = gajim.interface.emoticons_menu.size_request()[1]
- #FIXME: get_line_count is not so good
- #get the iter of cursor, then tv.get_line_yrange
- # so we know in which y we are typing (not how many lines we have
- # then go show just above the current cursor line for up
- # or just below the current cursor line for down
- #TEST with having 3 lines and writing in the 2nd
- if y + menu_height > Gdk.Screen.height():
- # move menu just above cursor
- y -= menu_height + (msg_tv.allocation.height / buf.get_line_count())
- #else: # move menu just below cursor
- # y -= (msg_tv.allocation.height / buf.get_line_count())
- return (x, y, True) # push_in True
gajim.interface.emoticon_menuitem_clicked = self.append_emoticon
- gajim.interface.emoticons_menu.popup(None, None,
- set_emoticons_menu_position, None, 1, 0)
+ gajim.interface.emoticons_menu.popup(None, None, None, None, 1, 0)
def _on_message_textview_key_press_event(self, widget, event):
if event.keyval == Gdk.KEY_space:
changeset 25782830bcc5 in /home/hg/repos/gajim
branches: gtk3
details:http://hg.gajim.org/gajim?cmd=changeset;node=25782830bcc5
description: use correct function to set tooltip
diffstat:
src/chat_control.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (25 lines):
diff -r b8fbfada90f8 -r 25782830bcc5 src/chat_control.py
--- a/src/chat_control.py Mon Jul 29 10:54:48 2013 +0200
+++ b/src/chat_control.py Mon Jul 29 21:11:40 2013 +0200
@@ -1794,16 +1794,16 @@
# Formatting
if self.contact.supports(NS_XHTML_IM) and not self.gpg_is_active:
self._formattings_button.set_sensitive(True)
- self._formattings_button.set_tooltip(_(
+ self._formattings_button.set_tooltip_text(_(
'Show a list of formattings'))
else:
self._formattings_button.set_sensitive(False)
if self.contact.supports(NS_XHTML_IM):
- self._formattings_button.set_tooltip(_('Formattings are not '
- 'available when GPG is active'))
+ self._formattings_button.set_tooltip_text(_('Formattings are '
+ 'not available when GPG is active'))
else:
- self._formattings_button.set_tooltip(_('This contact does not '
- 'support HTML'))
+ self._formattings_button.set_tooltip_text(_('This contact does '
+ 'not support HTML'))
# Add to roster
if not isinstance(self.contact, GC_Contact) \