Bug 747761

Summary: gtk_cell_renderer_progress_set_property improperly handles "inverted" property
Product: [Fedora] Fedora Reporter: Vallimar <vallimar>
Component: gtk3Assignee: Matthias Clasen <mclasen>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-24 17:54:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch used with Transmission none

Description Vallimar 2011-10-20 23:53:00 UTC
Created attachment 529406 [details]
Patch used with Transmission

Description of problem:
This problem was noticed in forward-porting the inverted cell progressbar rendering from transmission-2.33 to an updated 2.42 version compiled using gtk3. Essentially, instead of the progress bar having an inverted orientation, it switches from horizontal to vertical. Examing the code, the inverted property sets the orientation variable instead of the inverted variable. The orientation property in gtk3 is an enum that only has horizontal and vertical as options, unlike in gtk2.

Version-Release number of selected component (if applicable):
Tested 3.2.1, may affect all 3.x versions

How reproducible:
Always

Steps to Reproduce:
1. Set "inverted" property using g_object_set, to true (see attached)
2. Compile
3. Run
  
Actual results:
Cell progress bars when seeding change orientation to vertical instead of right-to-left

Expected results:
Cell progress bars when seeding should display right-to-left, instead of left-to-right as when downloading.

Additional info:
Recompiling gtk3-3.2.1-1 with this patch fixes the problem for me.

--- a/gtk/gtkcellrendererprogress.c
+++ b/gtk/gtkcellrendererprogress.c
@@ -355,7 +355,7 @@ gtk_cell_renderer_progress_set_property
       priv->orientation = g_value_get_enum (value);
       break;
     case PROP_INVERTED:
-      priv->orientation = g_value_get_boolean (value);
+      priv->inverted = g_value_get_boolean (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);

Comment 1 Matthias Clasen 2011-10-24 17:54:50 UTC
Thanks, fixed upstream.