Changeset 8143


Ignore:
Timestamp:
Apr 5, 2009, 2:19:27 PM (13 years ago)
Author:
charles
Message:

(1.5x gtk) backport gtk_widget_set_tooltip_text() from trunk to 1.5x

Location:
branches/1.5x/gtk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/gtk/tr-prefs.c

    r8048 r8143  
    737737        page->whitelist_widgets = g_slist_append( page->whitelist_widgets, w );
    738738        v = page->view = GTK_TREE_VIEW( w );
    739 #if GTK_CHECK_VERSION( 2,12,0 )
    740         gtk_widget_set_tooltip_text( w,
    741                   _( "IP addresses may use wildcards, such as 192.168.*.*" ) );
    742 #endif
     739        gtr_widget_set_tooltip_text( w, _( "IP addresses may use wildcards, such as 192.168.*.*" ) );
    743740        sel = gtk_tree_view_get_selection( v );
    744741        g_signal_connect( sel, "changed",
  • branches/1.5x/gtk/util.c

    r7776 r8143  
    667667#endif
    668668}
     669
     670void
     671gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip )
     672{
     673#if GTK_CHECK_VERSION( 2,12,0 )
     674    gtk_widget_set_tooltip_text( w, tip );
     675#else
     676    static GtkTooltips * tips = NULL;
     677    if( tips == NULL )
     678        tips = gtk_tooltips_new( );
     679    gtk_tooltips_set_tip( tips, w, tip, NULL );
     680#endif
     681}
  • branches/1.5x/gtk/util.h

    r7776 r8143  
    9393#ifdef GTK_MAJOR_VERSION
    9494
     95void        gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip );
     96
    9597GtkWidget * gtr_button_new_from_stock( const char * stock,
    9698                                       const char * mnemonic );
Note: See TracChangeset for help on using the changeset viewer.