does not handle enum and flag properties

Bug #1193342 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopilot-gtk
Fix Released
Low
Martin Pitt
autopilot-gtk (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

While writing tests for autopilot-gtk, I noticed that GtkButton does not make the "relief" property accessible. Presumably that's because it's an enum type, but it would be nice to either match their values to ints (or even strings, if we can find them out).

Tags: patch

Related branches

Martin Pitt (pitti)
Changed in autopilot-gtk:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Martin Pitt (pitti) wrote : Re: does not handle enum properties

This adds support for enum properties, which are converted to strings. Attaching as a patch now, I'll add a proper MP once https://code.launchpad.net/~pitti/autopilot-gtk/add-tests/+merge/171036 gets merged.

summary: - GtkButton.relief property (enum type) not exported
+ does not handle enum properties
Changed in autopilot-gtk:
assignee: nobody → Martin Pitt (pitti)
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I'm going to add support for flags as well, but before I do that I'd like to refactor GtkNode::MatchProperty. It has quite some code duplication (which is only going to become worse with supporting more types), and leaks the temporary GValue.

Revision history for this message
Martin Pitt (pitti) wrote :

This simplifies and refactors MatchProperty(), and fixes the GValue leak.

Martin Pitt (pitti)
summary: - does not handle enum properties
+ does not handle enum and flag properties
Revision history for this message
Martin Pitt (pitti) wrote :

Finally, this is a patch to handle flags properties.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot-gtk at revision 47, scheduled for release in autopilot-gtk, milestone Unknown

Changed in autopilot-gtk:
status: In Progress → Fix Committed
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot-gtk - 1.3+13.10.20130628-0ubuntu1

---------------
autopilot-gtk (1.3+13.10.20130628-0ubuntu1) saucy; urgency=low

  [ Martin Pitt ]
  * Handle enum and flags properties. (LP: #1193342). (LP: #1193342)
  * Expose GtkBuilder widget identifiers as "BuilderName" property. (LP:
    #1082391). (LP: #1082391)
  * This fixes the two test failures on raring which Francis saw in
    https://code.launchpad.net/~pitti/autopilot-gtk/add-
    tests/+merge/171036/comments/382574 I also sneaked in an unrelated,
    but trivial change for dropping a leftover debugging statement, in
    the interest of saving human reviewer and builder resources.
  * Support GtkTextBuffer properties, to introspect GtkTextView
    contents. (LP: #1194371)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 51
 -- Ubuntu daily release <email address hidden> Fri, 28 Jun 2013 00:01:10 +0000

Changed in autopilot-gtk (Ubuntu):
status: New → Fix Released
Martin Pitt (pitti)
Changed in autopilot-gtk:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.