gtksidebarrow: remove unused property
authorCarlos Soriano <csoriano@gnome.org>
Tue, 7 Jul 2015 20:57:51 +0000 (22:57 +0200)
committerCarlos Soriano <csoriano@gnome.org>
Tue, 7 Jul 2015 21:01:47 +0000 (23:01 +0200)
The sensitive property was a workaround which commit
3f8982a0cd7b779fe023bbd fixed.
Just remove it now that is not necessary.

gtk/gtksidebarrow.c

index d1000b7b3cb4f5c991ae01f0a183ebb94e4f7707..64e1b209a4dea06829c3bc0b2d522306f0656051 100644 (file)
@@ -44,7 +44,6 @@ struct _GtkSidebarRow
   GDrive *drive;
   GVolume *volume;
   GMount *mount;
-  gboolean sensitive;
   gboolean placeholder;
   GtkPlacesSidebar *sidebar;
   GtkWidget *event_box;
@@ -68,7 +67,6 @@ enum
   PROP_DRIVE,
   PROP_VOLUME,
   PROP_MOUNT,
-  PROP_SENSITIVE,
   PROP_PLACEHOLDER,
   LAST_PROP
 };
@@ -133,10 +131,6 @@ gtk_sidebar_row_get_property (GObject    *object,
       g_value_set_object (value, self->mount);
       break;
 
-    case PROP_SENSITIVE:
-      g_value_set_boolean (value, self->sensitive);
-      break;
-
     case PROP_PLACEHOLDER:
       g_value_set_boolean (value, self->placeholder);
       break;
@@ -222,20 +216,6 @@ gtk_sidebar_row_set_property (GObject      *object,
       g_set_object (&self->mount, g_value_get_object (value));
       break;
 
-    case PROP_SENSITIVE:
-      self->sensitive = g_value_get_boolean (value);
-      context = gtk_widget_get_style_context (GTK_WIDGET (self));
-      /* Modifying the actual sensitivity of the widget makes the drag state
-       * to change and calling drag-leave wich modifies the gtklistbox and a
-       * style race ocurs. So since we only use it for show which rows are
-       * drop targets, we can simple use a dim-label style
-       */
-      if (self->sensitive)
-        gtk_style_context_remove_class (context, "dim-label");
-      else
-        gtk_style_context_add_class (context, "dim-label");
-      break;
-
     case PROP_PLACEHOLDER:
       self->placeholder = g_value_get_boolean (value);
       if (self->placeholder)
@@ -439,14 +419,6 @@ gtk_sidebar_row_class_init (GtkSidebarRowClass *klass)
                           G_PARAM_CONSTRUCT_ONLY |
                           G_PARAM_STATIC_STRINGS));
 
-  properties [PROP_SENSITIVE] =
-    g_param_spec_boolean ("sensitive",
-                          "Sensitive",
-                          "Make the row sensitive or not",
-                          TRUE,
-                          (G_PARAM_READWRITE |
-                           G_PARAM_STATIC_STRINGS));
-
   properties [PROP_PLACEHOLDER] =
     g_param_spec_boolean ("placeholder",
                           "Placeholder",