Changeset 12999 for branches


Ignore:
Timestamp:
Oct 20, 2011, 12:46:26 AM (10 years ago)
Author:
jordan
Message:

(2.4x gtk) backport r12980: "hiding, then re-showing, Transmission always pops up the About dialog" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4x/gtk/util.c

    r12997 r12999  
    507507
    508508        for( l=windows; l!=NULL; l=l->next )
    509             if( GTK_IS_WINDOW( l->data ) )
    510                 if( gtk_window_get_transient_for( GTK_WINDOW( l->data ) ) == window )
    511                     gtr_widget_set_visible( GTK_WIDGET( l->data ), b );
     509        {
     510            if( !GTK_IS_WINDOW( l->data ) )
     511                continue;
     512            if( gtk_window_get_transient_for( GTK_WINDOW( l->data ) ) != window )
     513                continue;
     514            if( gtk_widget_get_visible( GTK_WIDGET( l->data ) ) == b )
     515                continue;
     516
     517            if( b && g_object_get_data( G_OBJECT( l->data ), GTR_CHILD_HIDDEN ) != NULL )
     518            {
     519                g_object_steal_data( G_OBJECT( l->data ), GTR_CHILD_HIDDEN );
     520                gtr_widget_set_visible( GTK_WIDGET( l->data ), TRUE );
     521            }
     522            else if( !b )
     523            {
     524                g_object_set_data( G_OBJECT( l->data ), GTR_CHILD_HIDDEN, GINT_TO_POINTER( 1 ) );
     525                gtr_widget_set_visible( GTK_WIDGET( l->data ), FALSE );
     526            }
     527        }
    512528
    513529        g_list_free( windows );
Note: See TracChangeset for help on using the changeset viewer.