]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) update some of the gtk+ calls s.t. we're not using deprecated API calls...
authorCharles Kerr <charles@transmissionbt.com>
Sat, 20 Jun 2009 23:55:36 +0000 (23:55 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sat, 20 Jun 2009 23:55:36 +0000 (23:55 +0000)
gtk/msgwin.c
gtk/tr-icon.c
gtk/util.c
gtk/util.h

index d8d8e4843f839c5065be9506ee6e82be5580c68c..0caf1456188916cdc27b673fbe835c7ec57c40de 100644 (file)
@@ -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 );
index 64dba8942e51922b25655cfe356c5a035af699fd..8dc54e6ebcbd4c24aa2d3c8bfc7bf79d1d847270 100644 (file)
@@ -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;
 }
index cacd7ecbf88f50c34752f36a02d0a5279bebaf16..f39c961474c486c7dcfe29e0927e08d472e51a47 100644 (file)
@@ -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
+}
index 5e5291a75f70ca32fb8e96689e7eaaf2ca549a23..37999543e76e64dc627aa6f3d11a2d2c0bf01ca0 100644 (file)
@@ -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,