(trunk gtk) make compatability wrapper call around gtk_widget_set_visible() so that it works with GTK+ < 2.18
This commit is contained in:
parent
3655047e85
commit
7a8e623301
|
@ -278,7 +278,7 @@ refreshOptions( struct DetailsImpl * di, tr_torrent ** torrents, int n )
|
|||
GtkWidget * w = di->ratio_combo;
|
||||
g_signal_handler_block( w, di->ratio_combo_tag );
|
||||
gtr_combo_box_set_active_enum( GTK_COMBO_BOX( w ), baseline );
|
||||
gtk_widget_set_visible( di->ratio_spin, baseline == TR_RATIOLIMIT_SINGLE );
|
||||
gtr_widget_set_visible( di->ratio_spin, baseline == TR_RATIOLIMIT_SINGLE );
|
||||
g_signal_handler_unblock( w, di->ratio_combo_tag );
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ refreshOptions( struct DetailsImpl * di, tr_torrent ** torrents, int n )
|
|||
GtkWidget * w = di->idle_combo;
|
||||
g_signal_handler_block( w, di->idle_combo_tag );
|
||||
gtr_combo_box_set_active_enum( GTK_COMBO_BOX( w ), baseline );
|
||||
gtk_widget_set_visible( di->idle_spin, baseline == TR_IDLELIMIT_SINGLE );
|
||||
gtr_widget_set_visible( di->idle_spin, baseline == TR_IDLELIMIT_SINGLE );
|
||||
g_signal_handler_unblock( w, di->idle_combo_tag );
|
||||
}
|
||||
}
|
||||
|
|
13
gtk/util.c
13
gtk/util.c
|
@ -759,6 +759,19 @@ gtr_widget_get_realized( GtkWidget * w )
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
gtr_widget_set_visible( GtkWidget * w, gboolean b )
|
||||
{
|
||||
#if GTK_CHECK_VERSION( 2,18,0 )
|
||||
gtk_widget_set_visible( w, b );
|
||||
#else
|
||||
if( b )
|
||||
gtk_widget_show( w );
|
||||
else
|
||||
gtk_widget_hide( w );
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
gtr_toolbar_set_orientation( GtkToolbar * toolbar,
|
||||
GtkOrientation orientation )
|
||||
|
|
|
@ -152,6 +152,9 @@ void gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip );
|
|||
/* backwards-compatible wrapper around gtk_widget_get_realized() */
|
||||
gboolean gtr_widget_get_realized( GtkWidget * w );
|
||||
|
||||
/* backwards-compatible wrapper around gtk_widget_set_visible() */
|
||||
void gtr_widget_set_visible( GtkWidget *, gboolean );
|
||||
|
||||
/* backwards-compatible wrapper around g_object_ref_sink() */
|
||||
gpointer gtr_object_ref_sink( gpointer object );
|
||||
|
||||
|
|
Loading…
Reference in New Issue