]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkcellrendererprogress.c
filechooserbutton: When the combo box changes, set the *file*, not the current folder
[~andy/gtk] / gtk / gtkcellrendererprogress.c
index 82abe680f0c6443e704061b8716488f3de392dae..2e4b9b31c37376564d589b907b5723f90a3afa47 100644 (file)
@@ -14,9 +14,7 @@
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 /*
  * Modified by the GTK+ Team and others 1997-2007.  See the AUTHORS
@@ -355,7 +353,7 @@ gtk_cell_renderer_progress_set_property (GObject *object,
       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);
@@ -548,7 +546,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer      *cell,
   GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (cell);
   GtkCellRendererProgressPrivate *priv= cellprogress->priv;
   GtkStyleContext *context;
-  GtkBorder padding, border;
+  GtkBorder padding;
   PangoLayout *layout;
   PangoRectangle logical_rect;
   gint x, y, w, h, x_pos, y_pos, bar_position, bar_size, start, full_size;
@@ -571,13 +569,12 @@ gtk_cell_renderer_progress_render (GtkCellRenderer      *cell,
   gtk_render_background (context, cr, x, y, w, h);
   gtk_render_frame (context, cr, x, y, w, h);
 
-  gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &border);
   gtk_style_context_get_padding (context, GTK_STATE_FLAG_NORMAL, &padding);
 
-  x += border.left + padding.left;
-  y += border.top + padding.top;
-  w -= border.left + border.right + padding.left + padding.right;
-  h -= border.top + border.bottom + padding.top + padding.bottom;
+  x += padding.left;
+  y += padding.top;
+  w -= padding.left + padding.right;
+  h -= padding.top + padding.bottom;
 
   gtk_style_context_restore (context);