Ticket #3644: windows.patch

File windows.patch, 2.1 KB (added by charles, 11 years ago)
  • gtk/msgwin.c

     
    374374**/
    375375
    376376GtkWidget *
    377 msgwin_new( TrCore * core )
     377msgwin_new( TrCore * core, GtkWindow * parent )
    378378{
    379379    GtkWidget *      win;
    380380    GtkWidget *      vbox;
     
    388388    data->core = core;
    389389
    390390    win = gtk_window_new( GTK_WINDOW_TOPLEVEL );
     391    gtk_window_set_transient_for( GTK_WINDOW( win ), parent );
    391392    gtk_window_set_title( GTK_WINDOW( win ), _( "Message Log" ) );
    392393    gtk_window_set_default_size( GTK_WINDOW( win ), 560, 350 );
    393394    gtk_window_set_role( GTK_WINDOW( win ), "message-log" );
  • gtk/msgwin.h

     
    1313#ifndef TG_MSGWIN_H
    1414#define TG_MSGWIN_H
    1515
    16 GtkWidget * msgwin_new( TrCore * core );
     16GtkWidget * msgwin_new( TrCore * core, GtkWindow * parent );
    1717
    1818#endif
  • gtk/main.c

     
    14071407}
    14081408
    14091409static void
    1410 about( GtkWindow * parent UNUSED )
     1410about( GtkWindow * parent )
    14111411{
    14121412    GtkWidget * d;
    14131413    const char * website_uri = "http://www.transmissionbt.com/";
     
    14371437                      "wrap-license", TRUE,
    14381438#endif
    14391439                      NULL );
    1440 
    1441     gtk_dialog_run( GTK_DIALOG( d ) );
    1442     gtk_widget_destroy( d );
     1440    gtk_window_set_transient_for( GTK_WINDOW( d ), parent );
     1441    g_signal_connect_swapped( d, "response", G_CALLBACK (gtk_widget_destroy), d );
     1442    gtk_widget_show_all( d );
    14431443}
    14441444
    14451445static void
     
    17271727    {
    17281728        if( !data->msgwin )
    17291729        {
    1730             GtkWidget * win = msgwin_new( data->core );
    1731             g_signal_connect( win, "destroy", G_CALLBACK( msgwinclosed ),
    1732                               NULL );
     1730            GtkWidget * win = msgwin_new( data->core, data->wind );
     1731            g_signal_connect( win, "destroy", G_CALLBACK( msgwinclosed ), NULL );
    17331732            data->msgwin = win;
    17341733        }
    17351734        else