fix focus-out-line tooltip
This commit is contained in:
parent
b16d01ba39
commit
5265d7fce9
|
@ -610,7 +610,7 @@ class ConversationTextview(GObject.GObject):
|
||||||
def show_line_tooltip(self):
|
def show_line_tooltip(self):
|
||||||
pointer = self.tv.get_pointer()
|
pointer = self.tv.get_pointer()
|
||||||
x, y = self.tv.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
|
x, y = self.tv.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
|
||||||
pointer[0], pointer[2])
|
pointer[0], pointer[1])
|
||||||
tags = self.tv.get_iter_at_location(x, y).get_tags()
|
tags = self.tv.get_iter_at_location(x, y).get_tags()
|
||||||
tag_table = self.tv.get_buffer().get_tag_table()
|
tag_table = self.tv.get_buffer().get_tag_table()
|
||||||
over_line = False
|
over_line = False
|
||||||
|
@ -623,7 +623,7 @@ class ConversationTextview(GObject.GObject):
|
||||||
position = self.tv.get_window(Gtk.TextWindowType.TEXT).get_origin()[1:]
|
position = self.tv.get_window(Gtk.TextWindowType.TEXT).get_origin()[1:]
|
||||||
self.line_tooltip.show_tooltip(_('Text below this line is what has '
|
self.line_tooltip.show_tooltip(_('Text below this line is what has '
|
||||||
'been said since the\nlast time you paid attention to this group '
|
'been said since the\nlast time you paid attention to this group '
|
||||||
'chat'), 8, position[1] + pointer[2])
|
'chat'), 8, position[1] + pointer[1])
|
||||||
|
|
||||||
def on_textview_draw(self, widget, ctx):
|
def on_textview_draw(self, widget, ctx):
|
||||||
return
|
return
|
||||||
|
|
|
@ -375,7 +375,8 @@ class SingleForm(Gtk.Table, object):
|
||||||
widget.set_property('selectable', selectable)
|
widget.set_property('selectable', selectable)
|
||||||
widget.set_line_wrap(True)
|
widget.set_line_wrap(True)
|
||||||
self.attach(widget, leftattach, rightattach, linecounter,
|
self.attach(widget, leftattach, rightattach, linecounter,
|
||||||
linecounter+1, xoptions=Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.FILL)
|
linecounter+1, xoptions=Gtk.AttachOptions.FILL,
|
||||||
|
yoptions=Gtk.AttachOptions.FILL)
|
||||||
|
|
||||||
elif field.type_ == 'list-single':
|
elif field.type_ == 'list-single':
|
||||||
# TODO: What if we have radio buttons and non-required field?
|
# TODO: What if we have radio buttons and non-required field?
|
||||||
|
@ -387,7 +388,8 @@ class SingleForm(Gtk.Table, object):
|
||||||
for value, label in field.iter_options():
|
for value, label in field.iter_options():
|
||||||
if not label:
|
if not label:
|
||||||
label = value
|
label = value
|
||||||
radio = Gtk.RadioButton(first_radio, label=label)
|
radio = Gtk.RadioButton.new_with_label_from_widget(
|
||||||
|
first_radio, label)
|
||||||
radio.connect('toggled',
|
radio.connect('toggled',
|
||||||
self.on_list_single_radiobutton_toggled, field, value)
|
self.on_list_single_radiobutton_toggled, field, value)
|
||||||
if first_radio is None:
|
if first_radio is None:
|
||||||
|
|
Loading…
Reference in New Issue