And gdk_drawable_unref is in turn deprecated in favor of g_object_unref

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp 2006-04-04 14:06:00 +00:00
parent f368b5b9ab
commit f5af73080a
4 changed files with 16 additions and 16 deletions

View File

@ -82,7 +82,7 @@ wxMask::wxMask( const wxBitmap& bitmap )
wxMask::~wxMask()
{
if (m_bitmap)
gdk_drawable_unref( m_bitmap );
g_object_unref (G_OBJECT (m_bitmap));
}
bool wxMask::Create( const wxBitmap& bitmap,
@ -90,7 +90,7 @@ bool wxMask::Create( const wxBitmap& bitmap,
{
if (m_bitmap)
{
gdk_drawable_unref( m_bitmap );
g_object_unref (G_OBJECT (m_bitmap));
m_bitmap = (GdkBitmap*) NULL;
}
@ -196,7 +196,7 @@ bool wxMask::Create( const wxBitmap& bitmap )
{
if (m_bitmap)
{
gdk_drawable_unref( m_bitmap );
g_object_unref (G_OBJECT (m_bitmap));
m_bitmap = (GdkBitmap*) NULL;
}
@ -257,9 +257,9 @@ wxBitmapRefData::wxBitmapRefData()
wxBitmapRefData::~wxBitmapRefData()
{
if (m_pixmap)
gdk_drawable_unref( m_pixmap );
g_object_unref (G_OBJECT (m_pixmap));
if (m_bitmap)
gdk_drawable_unref( m_bitmap );
g_object_unref (G_OBJECT (m_bitmap));
if (m_pixbuf)
gdk_pixbuf_unref( m_pixbuf );
delete m_mask;
@ -1518,7 +1518,7 @@ void wxBitmap::PurgeOtherRepresentations(wxBitmap::Representation keep)
}
if (keep == Pixbuf && HasPixmap())
{
gdk_drawable_unref( M_BMPDATA->m_pixmap );
g_object_unref (G_OBJECT (M_BMPDATA->m_pixmap));
M_BMPDATA->m_pixmap = NULL;
}
}

View File

@ -144,8 +144,8 @@ wxCursor::wxCursor(const char bits[], int width, int height,
data, mask, fg->GetColor(), bg->GetColor(),
hotSpotX, hotSpotY );
gdk_drawable_unref( data );
gdk_drawable_unref( mask );
g_object_unref (G_OBJECT (data));
g_object_unref (G_OBJECT (mask));
}
#if wxUSE_IMAGE
@ -296,8 +296,8 @@ wxCursor::wxCursor( const wxImage & image )
hotSpotX, hotSpotY
);
gdk_drawable_unref( data );
gdk_drawable_unref( mask );
g_object_unref (G_OBJECT (data));
g_object_unref (G_OBJECT (mask));
delete [] bits;
delete [] maskBits;
}

View File

@ -1158,7 +1158,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
gdk_draw_drawable( m_window, m_textGC, bitmap2, 0, 0, xx, yy, -1, -1 );
gdk_drawable_unref( bitmap2 );
g_object_unref (G_OBJECT (bitmap2));
gdk_gc_unref( gc );
}
else
@ -1200,7 +1200,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
}
if (new_mask)
gdk_drawable_unref( new_mask );
g_object_unref (G_OBJECT (new_mask));
}
bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
@ -1412,7 +1412,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
gdk_draw_drawable( m_window, m_textGC, bitmap, xsrc, ysrc, cx, cy, cw, ch );
gdk_drawable_unref( bitmap );
g_object_unref (G_OBJECT (bitmap));
gdk_gc_unref( gc );
}
else
@ -1441,7 +1441,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
}
if (new_mask)
gdk_drawable_unref( new_mask );
g_object_unref (G_OBJECT (new_mask));
}
else // use_bitmap_method
{

View File

@ -290,8 +290,8 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
);
GtkWidget *pw = gtk_pixmap_new( pixmap, mask );
gdk_drawable_unref( mask );
gdk_drawable_unref( pixmap );
g_object_unref (G_OBJECT (mask));
g_object_unref (G_OBJECT (pixmap));
gtk_widget_show( pw );
GtkWidget *close_button = gtk_button_new();