]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkaccessible.c
Do without GtkSelectionWindow
[~andy/gtk] / gtk / gtkaccessible.c
index bcd6cbb6256ad2ad35b1ccdba58d8a99f79a7810..27d88ca00ea35b178118fdd8dd0cf5eefba11e27 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser 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/>.
  */
 
 #include "config.h"
@@ -129,6 +127,16 @@ gtk_accessible_real_widget_unset (GtkAccessible *accessible)
   atk_object_notify_state_change (ATK_OBJECT (accessible), ATK_STATE_DEFUNCT, TRUE);
 }
 
+static void
+gtk_accessible_dispose (GObject *object)
+{
+  GtkAccessible *accessible = GTK_ACCESSIBLE (object);
+  
+  gtk_accessible_set_widget (accessible, NULL);
+
+  G_OBJECT_CLASS (gtk_accessible_parent_class)->dispose (object);
+}
+
 static void
 gtk_accessible_class_init (GtkAccessibleClass *klass)
 {
@@ -142,6 +150,7 @@ gtk_accessible_class_init (GtkAccessibleClass *klass)
   atkobject_class->ref_state_set = gtk_accessible_ref_state_set;
   gobject_class->get_property = gtk_accessible_get_property;
   gobject_class->set_property = gtk_accessible_set_property;
+  gobject_class->dispose = gtk_accessible_dispose;
 
   g_object_class_install_property (gobject_class,
                                   PROP_WIDGET,
@@ -187,7 +196,7 @@ gtk_accessible_set_widget (GtkAccessible *accessible,
 
   priv->widget = widget;
 
-  if (widget);
+  if (widget)
     klass->widget_set (accessible);
 
   g_object_notify (G_OBJECT (accessible), "widget");
@@ -220,6 +229,8 @@ gtk_accessible_get_widget (GtkAccessible *accessible)
  *
  * This function specifies the callback function to be called
  * when the widget corresponding to a GtkAccessible is destroyed.
+ *
+ * Deprecated: 3.4: Use gtk_accessible_set_widget() and its vfuncs.
  */
 void
 gtk_accessible_connect_widget_destroyed (GtkAccessible *accessible)