]> www.fi.muni.cz Git - evince.git/commitdiff
[shell] Remove GtkObject
authorChristian Persch <chpe@gnome.org>
Mon, 27 Sep 2010 17:36:05 +0000 (19:36 +0200)
committerChristian Persch <chpe@gnome.org>
Mon, 27 Sep 2010 17:36:56 +0000 (19:36 +0200)
Use GObjectClass:dispose instead of GtkObjectClass:destroy.

Based on a patch by Matthias Clasen.

Bug #630676.

shell/ev-sidebar-attachments.c
shell/ev-sidebar-thumbnails.c
shell/ev-sidebar.c

index 3d2cce29b024f077dd71c475d10ddc56f75b72a5..5b717896ac1a913732a58c6dcaaa8d3040ca4e81 100644 (file)
@@ -472,7 +472,7 @@ ev_sidebar_attachments_get_property (GObject    *object,
 }
 
 static void
-ev_sidebar_attachments_destroy (GtkObject *object)
+ev_sidebar_attachments_dispose (GObject *object)
 {
        EvSidebarAttachments *ev_attachbar = EV_SIDEBAR_ATTACHMENTS (object);
 
@@ -494,22 +494,20 @@ ev_sidebar_attachments_destroy (GtkObject *object)
                ev_attachbar->priv->icon_cache = NULL;
        }
 
-       (* GTK_OBJECT_CLASS (ev_sidebar_attachments_parent_class)->destroy) (object);
+       G_OBJECT_CLASS (ev_sidebar_attachments_parent_class)->dispose (object);
 }
 
 static void
 ev_sidebar_attachments_class_init (EvSidebarAttachmentsClass *ev_attachbar_class)
 {
        GObjectClass   *g_object_class;
-       GtkObjectClass *gtk_object_class;
        GtkWidgetClass *gtk_widget_class;
 
        g_object_class = G_OBJECT_CLASS (ev_attachbar_class);
-       gtk_object_class = GTK_OBJECT_CLASS (ev_attachbar_class);
        gtk_widget_class = GTK_WIDGET_CLASS (ev_attachbar_class);
 
        g_object_class->get_property = ev_sidebar_attachments_get_property;
-       gtk_object_class->destroy = ev_sidebar_attachments_destroy;
+       g_object_class->dispose = ev_sidebar_attachments_dispose;
        gtk_widget_class->popup_menu = ev_sidebar_attachments_popup_menu;
        gtk_widget_class->screen_changed = ev_sidebar_attachments_screen_changed;
 
index 4854e930bab3bec1f5f5c3bf0f444dfec86631ad..a860c5e1fcf6390e1826081b7c22ee27c8809dfa 100644 (file)
@@ -273,11 +273,9 @@ static void
 ev_sidebar_thumbnails_class_init (EvSidebarThumbnailsClass *ev_sidebar_thumbnails_class)
 {
        GObjectClass *g_object_class;
-       GtkObjectClass *gtk_object_class;
        GtkWidgetClass *widget_class;
 
        g_object_class = G_OBJECT_CLASS (ev_sidebar_thumbnails_class);
-       gtk_object_class = GTK_OBJECT_CLASS (ev_sidebar_thumbnails_class);
        widget_class = GTK_WIDGET_CLASS (ev_sidebar_thumbnails_class);
 
        g_object_class->dispose = ev_sidebar_thumbnails_dispose;
index cf5f2a306c348819f4612cd58b34f8c845edcfb3..3a99b556a5079da7596d1d25e8e19045b869fa0d 100644 (file)
@@ -64,7 +64,7 @@ G_DEFINE_TYPE (EvSidebar, ev_sidebar, GTK_TYPE_VBOX)
                (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR, EvSidebarPrivate))
 
 static void
-ev_sidebar_destroy (GtkObject *object)
+ev_sidebar_dispose (GObject *object)
 {
        EvSidebar *ev_sidebar = EV_SIDEBAR (object);
 
@@ -79,7 +79,7 @@ ev_sidebar_destroy (GtkObject *object)
        }
                
           
-       (* GTK_OBJECT_CLASS (ev_sidebar_parent_class)->destroy) (object);
+       G_OBJECT_CLASS (ev_sidebar_parent_class)->dispose (object);
 }
 
 static void
@@ -175,17 +175,11 @@ ev_sidebar_get_property (GObject *object,
 static void
 ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class)
 {
-       GObjectClass *g_object_class;
-       GtkWidgetClass *widget_class;
-       GtkObjectClass *gtk_object_klass;
-       g_object_class = G_OBJECT_CLASS (ev_sidebar_class);
-       widget_class = GTK_WIDGET_CLASS (ev_sidebar_class);
-       gtk_object_klass = GTK_OBJECT_CLASS (ev_sidebar_class);
-          
+        GObjectClass *g_object_class = G_OBJECT_CLASS (ev_sidebar_class);
+
        g_type_class_add_private (g_object_class, sizeof (EvSidebarPrivate));
-          
-       gtk_object_klass->destroy = ev_sidebar_destroy;
+
+       g_object_class->dispose = ev_sidebar_dispose;
        g_object_class->get_property = ev_sidebar_get_property;
        g_object_class->set_property = ev_sidebar_set_property;