← Back to team overview

gwibber-bugs team mailing list archive

[Bug 577050] Re: gwui.py:909:set_overlay_text:AttributeError: 'InputTextView' object has no attribute 'pango_overlay'

 

This is from the old client, pre-3.2.

** Changed in: gwibber
       Status: Confirmed => Won't Fix

** Changed in: gwibber
    Milestone: 2.91.2 => None

-- 
You received this bug notification because you are a member of Gwibber
Bug Heros, which is subscribed to Gwibber.
https://bugs.launchpad.net/bugs/577050

Title:
  gwui.py:909:set_overlay_text:AttributeError: 'InputTextView' object
  has no attribute 'pango_overlay'

Status in Gwibber:
  Won't Fix
Status in Gwibber with Midgard content repository:
  New

Bug description:
  First reported here:
  https://bugzilla.redhat.com/show_bug.cgi?id=587715

  gwibber tracebacked on a user like this:

  Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/gwibber/client.py", line 397, in
  on_input_changed
      self.input.textview.set_overlay_text(str(MAX_MESSAGE_LENGTH - cnt))
    File "/usr/lib/python2.6/site-packages/gwibber/gwui.py", line 909, in
  set_overlay_text
      self.pango_overlay.set_markup(self.overlay_text % (self.overlay_color,
  text))
  AttributeError: 'InputTextView' object has no attribute 'pango_overlay'

  Looking at the code, there are three ways that set_overlay_text gets
  called:

  1. as part of gwui.py:expose_view
  2. as part of client.py:on_input_changed
  3. as part of lib/gtk/widgets.py:on_input_changed

  This specific traceback happens as result of codepath #2. When it gets
  called before expose_view is called, pango_overlay doesn't exist. The
  solution looks to either be to always call expose_view before
  on_input_changed, or to simply make sure that pango_overlay is created
  before we try to use it.

  I've attached a patch which does the latter.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gwibber/+bug/577050/+subscriptions