/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to viz/branchwin.py

  • Committer: Curtis Hovey
  • Date: 2011-08-27 20:18:43 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110827201843-djfmy72kv86l6zod
Fixed allocation accessor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        """Creates a hook that saves the size of widget to config option 
106
106
           config_name when the window is destroyed/closed."""
107
107
        def save_size(src):
108
 
            width, height = widget.allocation.width, widget.allocation.height
 
108
            allocation = widget.get_allocation()
 
109
            width, height = allocation.width, allocation.height
109
110
            value = '%sx%s' % (width, height)
110
111
            self.config.set_user_option(config_name, value)
111
112
        self.connect("destroy", save_size)