mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +00:00
(trunk gtk) update some of the gtk+ calls s.t. we're not using deprecated API calls anymore
This commit is contained in:
@@ -459,8 +459,7 @@ msgwin_new( TrCore * core )
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
toolbar = gtk_toolbar_new( );
|
toolbar = gtk_toolbar_new( );
|
||||||
gtk_toolbar_set_orientation( GTK_TOOLBAR(
|
gtr_toolbar_set_orientation( GTK_TOOLBAR( toolbar ), GTK_ORIENTATION_HORIZONTAL );
|
||||||
toolbar ), GTK_ORIENTATION_HORIZONTAL );
|
|
||||||
gtk_toolbar_set_style( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_BOTH_HORIZ );
|
gtk_toolbar_set_style( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_BOTH_HORIZ );
|
||||||
|
|
||||||
item = gtk_tool_button_new_from_stock( GTK_STOCK_SAVE );
|
item = gtk_tool_button_new_from_stock( GTK_STOCK_SAVE );
|
||||||
|
|||||||
@@ -70,7 +70,11 @@ refresh_tooltip_cb( gpointer data )
|
|||||||
stats.seedingCount,
|
stats.seedingCount,
|
||||||
stats.downloadCount,
|
stats.downloadCount,
|
||||||
downStr, upStr );
|
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 );
|
gtk_status_icon_set_tooltip( GTK_STATUS_ICON( icon ), tip );
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
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 );
|
gtk_tooltips_set_tip( tips, w, tip, NULL );
|
||||||
#endif
|
#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
|
#ifdef GTK_MAJOR_VERSION
|
||||||
|
|
||||||
|
void gtr_toolbar_set_orientation( GtkToolbar * toolbar,
|
||||||
|
GtkOrientation orientation );
|
||||||
|
|
||||||
void gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip );
|
void gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip );
|
||||||
|
|
||||||
GtkWidget * gtr_button_new_from_stock( const char * stock,
|
GtkWidget * gtr_button_new_from_stock( const char * stock,
|
||||||
|
|||||||
Reference in New Issue
Block a user