mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
(trunk gtk) in torrent-cell-renderer and tr-core, use the _parent_class field generated by G_DEFINE_TYPE.
This commit is contained in:
parent
6290169099
commit
7ab14ad4b1
2 changed files with 7 additions and 11 deletions
|
@ -870,11 +870,12 @@ torrent_cell_renderer_get_property( GObject * object,
|
|||
}
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE (TorrentCellRenderer, torrent_cell_renderer, GTK_TYPE_CELL_RENDERER)
|
||||
|
||||
static void
|
||||
torrent_cell_renderer_dispose( GObject * o )
|
||||
{
|
||||
TorrentCellRenderer * r = TORRENT_CELL_RENDERER( o );
|
||||
GObjectClass * parent;
|
||||
|
||||
if( r && r->priv )
|
||||
{
|
||||
|
@ -886,12 +887,9 @@ torrent_cell_renderer_dispose( GObject * o )
|
|||
r->priv = NULL;
|
||||
}
|
||||
|
||||
parent = g_type_class_peek( g_type_parent( TORRENT_CELL_RENDERER_TYPE ) );
|
||||
parent->dispose( o );
|
||||
G_OBJECT_CLASS( torrent_cell_renderer_parent_class )->dispose( o );
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE (TorrentCellRenderer, torrent_cell_renderer, GTK_TYPE_CELL_RENDERER)
|
||||
|
||||
static void
|
||||
torrent_cell_renderer_class_init( TorrentCellRendererClass * klass )
|
||||
{
|
||||
|
|
|
@ -91,11 +91,12 @@ core_is_disposed( const TrCore * core )
|
|||
return !core || !core->priv->sorted_model;
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE (TrCore, tr_core, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
core_dispose( GObject * o )
|
||||
{
|
||||
TrCore * core = TR_CORE( o );
|
||||
GObjectClass * parent = g_type_class_peek( g_type_parent( TR_CORE_TYPE ) );
|
||||
|
||||
if( core->priv->sorted_model != NULL )
|
||||
{
|
||||
|
@ -104,22 +105,19 @@ core_dispose( GObject * o )
|
|||
core->priv->raw_model = NULL;
|
||||
}
|
||||
|
||||
parent->dispose( o );
|
||||
G_OBJECT_CLASS( tr_core_parent_class )->dispose( o );
|
||||
}
|
||||
|
||||
static void
|
||||
core_finalize( GObject * o )
|
||||
{
|
||||
TrCore * core = TR_CORE( o );
|
||||
GObjectClass * parent = g_type_class_peek( g_type_parent( TR_CORE_TYPE ) );
|
||||
|
||||
g_string_chunk_free( core->priv->string_chunk );
|
||||
|
||||
parent->finalize( o );
|
||||
G_OBJECT_CLASS( tr_core_parent_class )->finalize( o );
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE (TrCore, tr_core, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
tr_core_class_init( TrCoreClass * core_class )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue