Changeset 5782 for trunk/gtk/tr-prefs.c


Ignore:
Timestamp:
May 9, 2008, 3:20:34 AM (14 years ago)
Author:
charles
Message:

(gtk) #927: "help" button in the preferences dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-prefs.c

    r5702 r5782  
    1717#include <libtransmission/transmission.h>
    1818#include <libtransmission/utils.h>
     19#include <libtransmission/version.h>
    1920#include <libtransmission/web.h>
    2021#include "conf.h"
     
    101102
    102103static void
    103 response_cb( GtkDialog * dialog, int response UNUSED, gpointer unused UNUSED )
    104 {
    105     gtk_widget_destroy( GTK_WIDGET(dialog) );
     104response_cb( GtkDialog * dialog, int response, gpointer unused UNUSED )
     105{
     106    if( response == GTK_RESPONSE_HELP )
     107        gtr_open_file( "http://www.transmissionbt.com/help/gtk/"
     108                       SHORT_VERSION_STRING "/html/preferences.html" );
     109
     110    if( response == GTK_RESPONSE_CLOSE )
     111        gtk_widget_destroy( GTK_WIDGET(dialog) );
    106112}
    107113
     
    557563    d = gtk_dialog_new_with_buttons( _( "Transmission Preferences" ), parent,
    558564                                     GTK_DIALOG_DESTROY_WITH_PARENT,
     565                                     GTK_STOCK_HELP, GTK_RESPONSE_HELP,
    559566                                     GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
    560567                                     NULL );
Note: See TracChangeset for help on using the changeset viewer.