Changeset 8846 for trunk/gtk/main.c


Ignore:
Timestamp:
Jul 22, 2009, 3:55:48 PM (13 years ago)
Author:
charles
Message:

remove some unused utilities. better commenting on the utils that remain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r8766 r8846  
    102102                                TrWindow *      wind );
    103103
    104 static void           wannaquit( void * vdata );
     104static void           wannaquit( gpointer vdata );
    105105
    106106static void           setupdrag( GtkWidget *    widget,
     
    472472    else if( err )
    473473    {
    474         gtk_widget_show( errmsg_full( NULL, (callbackfunc_t)gtk_main_quit,
    475                                       NULL, "%s", err ) );
     474        const char * primary_text = _( "Transmission cannot be started." );
     475        GtkWidget * w = gtk_message_dialog_new( NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, primary_text, NULL );
     476        gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( w ), "%s", err );
     477        g_signal_connect( w, "response", G_CALLBACK(gtk_main_quit), NULL );
     478        gtk_widget_show( w );
    476479        g_free( err );
    477480        gtk_main( );
     
    671674
    672675static void
    673 wannaquit( void * vdata )
     676wannaquit( gpointer vdata )
    674677{
    675678    GtkWidget *r, *p, *b, *w, *c;
     
    832835
    833836    gtk_drag_dest_set( widget, GTK_DEST_DEFAULT_ALL, targets,
    834                        ALEN( targets ), GDK_ACTION_COPY | GDK_ACTION_MOVE );
     837                       G_N_ELEMENTS( targets ), GDK_ACTION_COPY | GDK_ACTION_MOVE );
    835838}
    836839
     
    902905        case TR_CORE_ERR_NO_MORE_TORRENTS:
    903906            showTorrentErrors( c );
    904             break;
    905 
    906         case TR_CORE_ERR_SAVE_STATE:
    907             errmsg( c->wind, "%s", msg );
    908907            break;
    909908
Note: See TracChangeset for help on using the changeset viewer.