~ubuntu-branches/ubuntu/quantal/gtimelog/quantal

« back to all changes in this revision

Viewing changes to src/gtimelog/main.py

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2012-08-13 13:30:21 UTC
  • Revision ID: package-import@ubuntu.com-20120813133021-d8zjlpi1niz4x3ih
Tags: 0.7.1-0ubuntu2
Apply upstream patch to work around gobject menu reference counting
bug.  (LP: #1016212)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1054
1054
        # not necessarily the case!  this logic works for, say,
1055
1055
        # Ambiance/Radiance, but it gets New Wave and Dark Room wrong.
1056
1056
        if toolkit == 'gi':
1057
 
            style = gtk.MenuBar().get_style_context()
 
1057
            menu_bar = gtk.MenuBar()
 
1058
            # need to hold a reference to menu_bar to avoid LP#1016212
 
1059
            style = menu_bar.get_style_context()
1058
1060
            color = style.get_color(gtk.StateFlags.NORMAL)
1059
1061
            value = (color.red + color.green + color.blue) / 3
1060
1062
        else: