Changeset 1511


Ignore:
Timestamp:
Feb 23, 2007, 12:27:19 PM (15 years ago)
Author:
joshe
Message:

Have file window's progress bars notice theme changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/dialogs.c

    r1509 r1511  
    8787static void
    8888quitresp( GtkWidget * widget, gint resp, gpointer data );
     89static void
     90stylekludge( GObject * obj, GParamSpec * spec, gpointer data );
    8991static void
    9092setscroll( void * arg );
     
    466468    gtk_tree_view_column_add_attribute( col, rend, "progress", FC_PROG );
    467469    gtk_tree_view_append_column( GTK_TREE_VIEW( view ), col );
     470    /* XXX this shouldn't be necessary */
     471    g_signal_connect( view, "notify::style", G_CALLBACK( stylekludge ), rend );
    468472    /* set up view */
    469473    sel = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
     
    512516    /* show the window with a nice initial size */
    513517    windowsizehack( wind, scroll, view, setscroll, scroll );
     518}
     519
     520/* kludge to have the progress bars notice theme changes */
     521static void
     522stylekludge( GObject * obj, GParamSpec * spec, gpointer data )
     523{
     524    TrCellRendererProgress * rend = TR_CELL_RENDERER_PROGRESS( data );
     525
     526    if( 0 == strcmp( "style", spec->name ) )
     527    {
     528        tr_cell_renderer_progress_reset_style( rend );
     529        gtk_widget_queue_draw( GTK_WIDGET( obj ) );
     530    }
    514531}
    515532
Note: See TracChangeset for help on using the changeset viewer.