(trunk gtk) update some of the gtk+ calls s.t. we're not using deprecated API calls anymore
This commit is contained in:
parent
e4d8d305ba
commit
a8a4259f3a
|
@ -459,8 +459,7 @@ msgwin_new( TrCore * core )
|
|||
**/
|
||||
|
||||
toolbar = gtk_toolbar_new( );
|
||||
gtk_toolbar_set_orientation( GTK_TOOLBAR(
|
||||
toolbar ), GTK_ORIENTATION_HORIZONTAL );
|
||||
gtr_toolbar_set_orientation( GTK_TOOLBAR( toolbar ), GTK_ORIENTATION_HORIZONTAL );
|
||||
gtk_toolbar_set_style( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_BOTH_HORIZ );
|
||||
|
||||
item = gtk_tool_button_new_from_stock( GTK_STOCK_SAVE );
|
||||
|
|
|
@ -70,7 +70,11 @@ refresh_tooltip_cb( gpointer data )
|
|||
stats.seedingCount,
|
||||
stats.downloadCount,
|
||||
downStr, upStr );
|
||||
#if GTK_CHECK_VERSION( 2,16,0 )
|
||||
gtk_status_icon_set_tooltip_text( GTK_STATUS_ICON( icon ), tip );
|
||||
#else
|
||||
gtk_status_icon_set_tooltip( GTK_STATUS_ICON( icon ), tip );
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
11
gtk/util.c
11
gtk/util.c
|
@ -689,3 +689,14 @@ gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip )
|
|||
gtk_tooltips_set_tip( tips, w, tip, NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
gtr_toolbar_set_orientation( GtkToolbar * toolbar,
|
||||
GtkOrientation orientation )
|
||||
{
|
||||
#if GTK_CHECK_VERSION( 2,16,0 )
|
||||
gtk_orientable_set_orientation( GTK_ORIENTABLE( toolbar ), orientation );
|
||||
#else
|
||||
gtk_toolbar_set_orientation( toolbar, orientation );
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -94,6 +94,9 @@ char* gtr_get_help_url( void );
|
|||
|
||||
#ifdef GTK_MAJOR_VERSION
|
||||
|
||||
void gtr_toolbar_set_orientation( GtkToolbar * toolbar,
|
||||
GtkOrientation orientation );
|
||||
|
||||
void gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip );
|
||||
|
||||
GtkWidget * gtr_button_new_from_stock( const char * stock,
|
||||
|
|
Loading…
Reference in New Issue