Changeset 11337


Ignore:
Timestamp:
Oct 18, 2010, 10:18:15 PM (11 years ago)
Author:
charles
Message:

(trunk gtk) #3644 "About Dialog appear with main window" -- handle another special case. Fix confirmed by kovalev

Location:
trunk/gtk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r11336 r11337  
    14081408
    14091409static void
    1410 about( GtkWindow * parent UNUSED )
     1410about( GtkWindow * parent )
    14111411{
    14121412    GtkWidget * d;
     
    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
     
    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        }
  • trunk/gtk/msgwin.c

    r11040 r11337  
    375375
    376376GtkWidget *
    377 msgwin_new( TrCore * core )
     377msgwin_new( TrCore * core, GtkWindow * parent )
    378378{
    379379    GtkWidget *      win;
     
    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 );
  • trunk/gtk/msgwin.h

    r10863 r11337  
    1414#define TG_MSGWIN_H
    1515
    16 GtkWidget * msgwin_new( TrCore * core );
     16GtkWidget * msgwin_new( TrCore * core, GtkWindow * parent );
    1717
    1818#endif
Note: See TracChangeset for help on using the changeset viewer.