Changeset 12659


Ignore:
Timestamp:
Aug 9, 2011, 6:31:33 AM (10 years ago)
Author:
jordan
Message:

(trunk gtk) in torrent-cell-renderer and tr-core, use the _parent_class field generated by G_DEFINE_TYPE.

Location:
trunk/gtk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/torrent-cell-renderer.c

    r12658 r12659  
    871871}
    872872
     873G_DEFINE_TYPE (TorrentCellRenderer, torrent_cell_renderer, GTK_TYPE_CELL_RENDERER)
     874
    873875static void
    874876torrent_cell_renderer_dispose( GObject * o )
    875877{
    876878    TorrentCellRenderer * r = TORRENT_CELL_RENDERER( o );
    877     GObjectClass *        parent;
    878879
    879880    if( r && r->priv )
     
    887888    }
    888889
    889     parent = g_type_class_peek( g_type_parent( TORRENT_CELL_RENDERER_TYPE ) );
    890     parent->dispose( o );
    891 }
    892 
    893 G_DEFINE_TYPE (TorrentCellRenderer, torrent_cell_renderer, GTK_TYPE_CELL_RENDERER)
     890    G_OBJECT_CLASS( torrent_cell_renderer_parent_class )->dispose( o );
     891}
    894892
    895893static void
  • trunk/gtk/tr-core.c

    r12658 r12659  
    9292}
    9393
     94G_DEFINE_TYPE (TrCore, tr_core, G_TYPE_OBJECT)
     95
    9496static void
    9597core_dispose( GObject * o )
    9698{
    9799    TrCore * core = TR_CORE( o );
    98     GObjectClass * parent = g_type_class_peek( g_type_parent( TR_CORE_TYPE ) );
    99100
    100101    if( core->priv->sorted_model != NULL )
     
    105106    }
    106107
    107     parent->dispose( o );
     108    G_OBJECT_CLASS( tr_core_parent_class )->dispose( o );
    108109}
    109110
     
    112113{
    113114    TrCore * core = TR_CORE( o );
    114     GObjectClass * parent = g_type_class_peek( g_type_parent( TR_CORE_TYPE ) );
    115115
    116116    g_string_chunk_free( core->priv->string_chunk );
    117117
    118     parent->finalize( o );
    119 }
    120 
    121 G_DEFINE_TYPE (TrCore, tr_core, G_TYPE_OBJECT)
     118    G_OBJECT_CLASS( tr_core_parent_class )->finalize( o );
     119}
    122120
    123121static void
Note: See TracChangeset for help on using the changeset viewer.