]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkstyle.c
removed the "widget &&" part from "widget && GTK_IS_FOO (widget)" checks.
[~andy/gtk] / gtk / gtkstyle.c
index d7199df6558088299599a4b3d7c45d607984f525..58f4d0ef9aefba05d35ed9c5e1c31ba1fa01930e 100644 (file)
@@ -1614,10 +1614,10 @@ gtk_style_real_copy (GtkStyle *style,
   style->ythickness = src->ythickness;
 
   if (style->rc_style)
-    gtk_rc_style_unref (style->rc_style);
+    g_object_unref (style->rc_style);
   style->rc_style = src->rc_style;
   if (src->rc_style)
-    gtk_rc_style_ref (src->rc_style);
+    g_object_ref (src->rc_style);
 
   /* don't copy, just clear cache */
   clear_property_cache (style);
@@ -1739,7 +1739,7 @@ _gtk_style_peek_property_value (GtkStyle           *style,
       gchar *contents = g_strdup_value_contents (&rcprop->value);
       
       g_message ("%s: failed to retrieve property `%s::%s' of type `%s' from rc file value \"%s\" of type `%s'",
-                rcprop->origin,
+                rcprop->origin ? rcprop->origin : "(for origin information, set GTK_DEBUG)",
                 g_type_name (pspec->owner_type), pspec->name,
                 g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
                 contents,
@@ -2458,7 +2458,7 @@ gtk_default_draw_shadow (GtkStyle      *style,
   
   if (shadow_type == GTK_SHADOW_IN)
     {
-      if (detail && (strcmp (detail, "buttondefault") == 0))
+      if (detail && strcmp (detail, "buttondefault") == 0)
        {
          sanitize_size (window, &width, &height);
 
@@ -2473,7 +2473,7 @@ gtk_default_draw_shadow (GtkStyle      *style,
                            x, y, width, height);
          return;
        }
-      if (widget && GTK_IS_SPIN_BUTTON (widget) &&
+      if (GTK_IS_SPIN_BUTTON (widget) &&
          detail && strcmp (detail, "spinbutton") == 0)
        {
          draw_spinbutton_shadow (style, window, state_type, 
@@ -2711,7 +2711,7 @@ gtk_default_draw_shadow (GtkStyle      *style,
     }
 
   if (shadow_type == GTK_SHADOW_IN &&
-      widget && GTK_IS_SPIN_BUTTON (widget) &&
+      GTK_IS_SPIN_BUTTON (widget) &&
       detail && strcmp (detail, "entry") == 0)
     {
       if (get_direction (widget) == GTK_TEXT_DIR_LTR)
@@ -3261,7 +3261,7 @@ gtk_default_draw_box (GtkStyle      *style,
   
   sanitize_size (window, &width, &height);
 
-  if (widget && GTK_IS_SPIN_BUTTON (widget) && detail)
+  if (GTK_IS_SPIN_BUTTON (widget) && detail)
     {
       if (strcmp (detail, "spinbutton_up") == 0)
        {
@@ -4264,7 +4264,7 @@ gtk_default_draw_box_gap (GtkStyle       *style,
               gdk_draw_line (window, gc2,
                              x, y + gap_x, x, y + gap_x);
             }
-          if ((width - (gap_x + gap_width)) > 0)
+          if ((height - (gap_x + gap_width)) > 0)
             {
               gdk_draw_line (window, gc1,
                              x, y + gap_x + gap_width, x, y + height - 2);
@@ -4297,7 +4297,7 @@ gtk_default_draw_box_gap (GtkStyle       *style,
               gdk_draw_line (window, gc3,
                              x + width - 1, y + gap_x, x + width - 1, y + gap_x);
             }
-          if ((width - (gap_x + gap_width)) > 0)
+          if ((height - (gap_x + gap_width)) > 0)
             {
               gdk_draw_line (window, gc4,
                              x + width - 1, y + gap_x + gap_width, x + width - 1, y + height - 2);