mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Replacing deprecated gtk_widget_ref/unref
This commit is contained in:
parent
491aee4b19
commit
dc6faca5b0
3 changed files with 7 additions and 7 deletions
|
@ -310,7 +310,7 @@ bool UpdateSel( int iIndex, eclass_t *pec ){
|
|||
GtkWidget* widget = EntWidgets[EntCheck1 + i];
|
||||
gtk_label_set_text( GTK_LABEL( GTK_BIN( widget )->child ), " " );
|
||||
gtk_widget_hide( widget );
|
||||
gtk_widget_ref( widget );
|
||||
g_object_ref( widget );
|
||||
gtk_container_remove( GTK_CONTAINER( LayoutTable ), widget );
|
||||
}
|
||||
last_count = spawnflag_count;
|
||||
|
@ -328,7 +328,7 @@ bool UpdateSel( int iIndex, eclass_t *pec ){
|
|||
gtk_table_attach( GTK_TABLE( LayoutTable ), widget, i % 4, i % 4 + 1, i / 4, i / 4 + 1,
|
||||
(GtkAttachOptions) ( GTK_FILL ),
|
||||
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
|
||||
gtk_widget_unref( widget );
|
||||
g_object_unref( widget );
|
||||
|
||||
gtk_label_set_text( GTK_LABEL( GTK_BIN( widget )->child ), str.GetBuffer() );
|
||||
}
|
||||
|
@ -1334,7 +1334,7 @@ void GroupDlg::Create(){
|
|||
for ( int i = 0; i < MAX_FLAGS; i++ )
|
||||
{
|
||||
GtkWidget* check = gtk_check_button_new_with_label( "" );
|
||||
gtk_widget_ref( check );
|
||||
g_object_ref( check );
|
||||
g_signal_connect( G_OBJECT( check ), "toggled", G_CALLBACK( entity_check ), NULL );
|
||||
EntWidgets[EntCheck1 + i] = check;
|
||||
}
|
||||
|
|
|
@ -1713,10 +1713,10 @@ void CheckMenuSplitting( GtkWidget *&menu ){
|
|||
for ( int i = 0; i < 3; i++ )
|
||||
{
|
||||
item = GTK_WIDGET( g_list_last( gtk_container_get_children( GTK_CONTAINER( menu ) ) )->data );
|
||||
gtk_widget_ref( item );
|
||||
g_object_ref( item );
|
||||
gtk_container_remove( GTK_CONTAINER( menu ), item );
|
||||
gtk_menu_append( GTK_MENU( menu2 ), item );
|
||||
gtk_widget_unref( item );
|
||||
g_object_unref( item );
|
||||
}
|
||||
|
||||
item = gtk_menu_item_new_with_label( "--------" );
|
||||
|
|
|
@ -1086,7 +1086,7 @@ GtkWidget* CGameDialog::GetGlobalFrame(){
|
|||
AddDialogData( check, &m_bLogConsole, DLG_CHECK_BOOL );
|
||||
|
||||
// incref it so we can pass it around
|
||||
gtk_widget_ref( GTK_WIDGET( mFrame ) );
|
||||
g_object_ref( GTK_WIDGET( mFrame ) );
|
||||
|
||||
return mFrame;
|
||||
}
|
||||
|
@ -1341,7 +1341,7 @@ void CGameDialog::Init(){
|
|||
CGameDialog::~CGameDialog(){
|
||||
if ( mFrame ) {
|
||||
// NOTE I'm not too sure how reliable this is
|
||||
gtk_widget_unref( GTK_WIDGET( mFrame ) );
|
||||
g_object_unref( GTK_WIDGET( mFrame ) );
|
||||
}
|
||||
// free all the game descriptions
|
||||
list<CGameDescription *>::iterator iGame;
|
||||
|
|
Loading…
Reference in a new issue