Changeset 11563


Ignore:
Timestamp:
Dec 21, 2010, 7:20:58 PM (11 years ago)
Author:
charles
Message:

(trunk gtk) general cleanup to make function's naming scheme and API more consistent. This is only a fraction of what the GTK+ client's codebase needs, unfortunately.

Location:
trunk/gtk
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/actions.c

    r11513 r11563  
    3232#define UNUSED G_GNUC_UNUSED
    3333
    34 static TrCore *         myCore = NULL;
    35 
     34static TrCore * myCore = NULL;
    3635static GtkActionGroup * myGroup = NULL;
    3736
    3837static void
    39 action_cb( GtkAction * a,
    40            gpointer    user_data )
    41 {
    42     doAction ( gtk_action_get_name( a ), user_data );
     38action_cb( GtkAction * a, gpointer user_data )
     39{
     40    gtr_actions_handler( gtk_action_get_name( a ), user_data );
    4341}
    4442
     
    194192
    195193void
    196 actions_set_core( TrCore * core )
     194gtr_actions_set_core( TrCore * core )
    197195{
    198196    myCore = core;
     
    200198
    201199void
    202 actions_init( GtkUIManager * ui_manager,
    203               gpointer       callback_user_data )
     200gtr_actions_init( GtkUIManager * ui_manager, gpointer callback_user_data )
    204201{
    205202    int              i, n;
     
    293290
    294291void
    295 action_activate( const char * name )
     292gtr_action_activate( const char * name )
    296293{
    297294    GtkAction * action = get_action( name );
     
    302299
    303300void
    304 action_sensitize( const char * name,
    305                   gboolean     b )
     301gtr_action_set_sensitive( const char * name, gboolean b )
    306302{
    307303    GtkAction * action = get_action( name );
     
    312308
    313309void
    314 action_set_important( const char * name, gboolean b )
     310gtr_action_set_important( const char * name, gboolean b )
    315311{
    316312    GtkAction * action = get_action( name );
     
    321317
    322318void
    323 action_toggle( const char * name,
    324                gboolean     b )
     319gtr_action_set_toggled( const char * name, gboolean b )
    325320{
    326321    GtkAction * action = get_action( name );
     
    330325
    331326GtkWidget*
    332 action_get_widget( const char * path )
     327gtr_action_get_widget( const char * path )
    333328{
    334329    return gtk_ui_manager_get_widget( myUIManager, path );
  • trunk/gtk/actions.h

    r9989 r11563  
    1111 */
    1212
    13 #ifndef TR_ACTIONS_H
    14 #define TR_ACTIONS_H
     13#ifndef GTR_ACTIONS_H
     14#define GTR_ACTIONS_H
    1515
    1616#include <gtk/gtk.h>
     
    2222
    2323
    24 void       actions_init( GtkUIManager * ui_manager,
    25                          gpointer       callback_user_data );
     24void        gtr_actions_init( GtkUIManager * ui_manager, gpointer callback_user_data );
     25void        gtr_actions_set_core( TrCore * core );
     26void        gtr_actions_handler( const char * action_name, gpointer user_data );
    2627
    27 void       actions_set_core( TrCore * core );
    28 
    29 void       action_activate( const char * name );
    30 
    31 void       action_sensitize( const char * name,
    32                              gboolean     b );
    33 
    34 void       action_toggle( const char * name,
    35                           gboolean     b );
    36 
    37 void       action_set_important( const char * name, gboolean b );
    38 
    39 
    40 GtkWidget* action_get_widget( const char * path );
    41 
    42 void       doAction( const char * action_name,
    43                      gpointer     user_data );
     28void        gtr_action_activate      ( const char * action_name );
     29void        gtr_action_set_sensitive ( const char * action_name, gboolean is_sensitive );
     30void        gtr_action_set_toggled   ( const char * action_name, gboolean is_toggled );
     31void        gtr_action_set_important ( const char * action_name, gboolean is_important );
     32GtkWidget*  gtr_action_get_widget    ( const char * path );
    4433
    4534#endif
  • trunk/gtk/add-dialog.c

    r11350 r11563  
    207207        else if( new_file )
    208208        {
    209             addTorrentErrorDialog( GTK_WIDGET( b ), err, data->filename );
     209            gtr_add_torrent_error_dialog( GTK_WIDGET( b ), err, data->filename );
    210210        }
    211211
     
    253253
    254254GtkWidget*
    255 addSingleTorrentDialog( GtkWindow * parent, TrCore * core, tr_ctor * ctor )
     255gtr_torrent_options_dialog_new( GtkWindow * parent, TrCore * core, tr_ctor * ctor )
    256256{
    257257    int              row;
     
    385385
    386386    gtk_widget_grab_focus( grab );
    387     gtk_widget_show_all( d );
    388387    return d;
    389388}
     
    424423
    425424GtkWidget*
    426 addDialog( GtkWindow * parent,
    427            TrCore *    core )
     425gtr_torrent_add_from_file_dialog_new( GtkWindow * parent, TrCore * core )
    428426{
    429427    GtkWidget *  w;
     
    454452    gtk_widget_show( c );
    455453
    456     gtk_widget_show( w );
    457454    return w;
    458455}
     
    519516
    520517GtkWidget*
    521 addURLDialog( GtkWindow * parent, TrCore * core )
     518gtr_torrent_add_from_url_dialog_new( GtkWindow * parent, TrCore * core )
    522519{
    523520    int row;
     
    548545    gtk_box_pack_start( GTK_BOX( GTK_DIALOG( w )->vbox ), t, TRUE, TRUE, 0 );
    549546    gtk_widget_show_all( t );
    550     gtk_widget_show( w );
    551547    return w;
    552548}
  • trunk/gtk/add-dialog.h

    r9868 r11563  
    1111 */
    1212
    13 #ifndef TR_GTK_ADD_DIALOG_H
    14 #define TR_GTK_ADD_DIALOG_H
     13#ifndef GTR_ADD_DIALOG_H
     14#define GTR_ADD_DIALOG_H
    1515
    1616#include <gtk/gtk.h>
    1717#include "tr-core.h"
    1818
     19GtkWidget* gtr_torrent_add_from_url_dialog_new ( GtkWindow * parent, TrCore * core );
     20GtkWidget* gtr_torrent_add_from_file_dialog_new( GtkWindow * parent, TrCore * core );
     21
    1922/* This dialog assumes ownership of the ctor */
    20 GtkWidget* addSingleTorrentDialog( GtkWindow * parent,
    21                                    TrCore *    core,
    22                                    tr_ctor *   ctor );
     23GtkWidget* gtr_torrent_options_dialog_new( GtkWindow * parent, TrCore * core, tr_ctor * ctor );
    2324
    24 GtkWidget* addDialog( GtkWindow * parent,
    25                       TrCore *    core );
    26 
    27 GtkWidget* addURLDialog( GtkWindow * parent,
    28                          TrCore *    core );
    29 
    30 #endif /* TR_GTK_ADD_DIALOG */
     25#endif /* GTR_ADD_DIALOG */
  • trunk/gtk/conf.h

    r8929 r11563  
    2323 *****************************************************************************/
    2424
    25 #ifndef TG_CONF_H
    26 #define TG_CONF_H
     25#ifndef GTR_CONFIG_H
     26#define GTR_CONFIG_H
    2727
    2828#include <inttypes.h>
     
    7272                  char                 ** errstr );
    7373
    74 #endif /* TG_CONF_H */
     74#endif /* GTR_CONFIG_H */
  • trunk/gtk/details.c

    r11545 r11563  
    23212321
    23222322GtkWidget*
    2323 torrent_inspector_new( GtkWindow * parent, TrCore * core )
     2323gtr_torrent_details_dialog_new( GtkWindow * parent, TrCore * core )
    23242324{
    23252325    GtkWidget * d, * n, * w, * l;
     
    23772377
    23782378void
    2379 torrent_inspector_set_torrents( GtkWidget * w, GSList * ids )
     2379gtr_torrent_details_dialog_set_torrents( GtkWidget * w, GSList * ids )
    23802380{
    23812381    struct DetailsImpl * di = g_object_get_data( G_OBJECT( w ), DETAILS_KEY );
  • trunk/gtk/details.h

    r9868 r11563  
    1111 */
    1212
    13 #ifndef GTK_TORRENT_INSPECTOR_H
    14 #define GTK_TORRENT_INSPECTOR_H
     13#ifndef GTR_TORRENT_DETAILS_H
     14#define GTR_TORRENT_DETAILS_H
    1515
    1616#include <gtk/gtk.h>
    1717#include "tr-core.h"
    18 #include "tr-torrent.h"
    1918
    20 GtkWidget* torrent_inspector_new( GtkWindow * parent,
    21                                   TrCore    * core );
     19GtkWidget*  gtr_torrent_details_dialog_new          ( GtkWindow * parent,
     20                                                      TrCore    * core );
    2221
    23 void torrent_inspector_set_torrents( GtkWidget * widgets,
    24                                      GSList    * torrent_ids );
     22void        gtr_torrent_details_dialog_set_torrents ( GtkWidget * details_dialog,
     23                                                      GSList    * torrent_ids );
    2524
    26 #endif /* TG_PREFS_H */
     25#endif /* GTR_TORRENT_DETAILS_H */
  • trunk/gtk/dialogs.c

    r11132 r11563  
    6666
    6767GtkWidget *
    68 askquit( TrCore *       core,
    69          GtkWindow *    parent,
    70          callbackfunc_t func,
    71          void *         cbdata )
     68gtr_confirm_quit( GtkWindow *    parent,
     69                  TrCore *       core,
     70                  callbackfunc_t func,
     71                  void *         cbdata )
    7272{
    7373    struct quitdata * stuff;
     
    169169
    170170void
    171 confirmRemove( GtkWindow * parent,
    172                TrCore *    core,
    173                GSList *    torrents,
    174                gboolean    delete_files )
     171gtr_confirm_remove( GtkWindow * parent,
     172                    TrCore     * core,
     173                    GSList     * torrents,
     174                    gboolean     delete_files )
    175175{
    176176    GtkWidget *         d;
  • trunk/gtk/dialogs.h

    r10993 r11563  
    2323 *****************************************************************************/
    2424
    25 #ifndef TG_PREFS_H
    26 #define TG_PREFS_H
     25#ifndef GTR_DIALOGS_H
     26#define GTR_DIALOGS_H
    2727
    2828#include "tr-core.h"
     
    3434typedef void ( *callbackfunc_t )( gpointer );
    3535
    36 /* prompt if the user wants to quit, calls func with cbdata if they do */
    37 GtkWidget *  askquit( TrCore          * core,
    38                       GtkWindow       * parent,
    39                       callbackfunc_t    func,
    40                       gpointer          cbdata );
     36/**
     37 * Prompt the user to confirm exiting the app.
     38 * Call func(cbdata) if user confirms.
     39 */
     40GtkWidget * gtr_confirm_quit   ( GtkWindow       * parent,
     41                                 TrCore          * core,
     42                                 callbackfunc_t    func,
     43                                 gpointer          cbdata );
    4144
    42 void confirmRemove( GtkWindow * parent,
    43                     TrCore    * core,
    44                     GSList    * gtorrents,
    45                     gboolean    doDelete );
     45/**
     46 * Prompt the user to confirm removing a torrent.
     47 */
     48void        gtr_confirm_remove ( GtkWindow * parent,
     49                                 TrCore    * core,
     50                                 GSList    * gtorrents,
     51                                 gboolean    doDelete );
    4652
    47 #endif /* TG_PREFS_H */
     53#endif /* GTR_DIALOGS_H */
  • trunk/gtk/file-list.c

    r11522 r11563  
    429429    const gboolean isLeaf = node->children == NULL;
    430430
    431     const char * mime_type = isLeaf ? get_mime_type_from_filename( child_data->name ) : DIRECTORY_MIME_TYPE;
    432     GdkPixbuf * icon = get_mime_type_icon( mime_type, GTK_ICON_SIZE_MENU, build->w );
     431    const char * mime_type = isLeaf ? gtr_get_mime_type_from_filename( child_data->name ) : DIRECTORY_MIME_TYPE;
     432    GdkPixbuf * icon = gtr_get_mime_type_icon( mime_type, GTK_ICON_SIZE_MENU, build->w );
    433433    const tr_info * inf = tr_torrentInfo( build->tor );
    434434    const int priority = isLeaf ? inf->files[ child_data->index ].priority : 0;
  • trunk/gtk/hig.h

    r11562 r11563  
    1111 */
    1212
    13 #ifndef __HIG_H__
    14 #define __HIG_H__
     13#ifndef GTR_HIG_H
     14#define GTR_HIG_H
    1515
    1616#include <gtk/gtk.h>
     
    8484};
    8585
    86 #endif /* __HIG_H__ */
     86#endif /* GTR_HIG_H */
  • trunk/gtk/icons.c

    r11284 r11563  
    257257
    258258GdkPixbuf *
    259 get_mime_type_icon( const char   * mime_type,
    260                     GtkIconSize    icon_size,
    261                     GtkWidget    * for_widget )
     259gtr_get_mime_type_icon( const char   * mime_type,
     260                        GtkIconSize    icon_size,
     261                        GtkWidget    * for_widget )
    262262{
    263263    int n;
     
    281281
    282282const char *
    283 get_mime_type_from_filename( const char * file G_GNUC_UNUSED )
     283gtr_get_mime_type_from_filename( const char * file G_GNUC_UNUSED )
    284284{
    285285#ifdef USE_GIO_ICONS
  • trunk/gtk/icons.h

    r11284 r11563  
    66 */
    77
    8 #ifndef ICONS_H
    9 #define ICONS_H
     8#ifndef GTR_ICONS_H
     9#define GTR_ICONS_H
    1010
    1111#define DIRECTORY_MIME_TYPE "folder"
    1212#define UNKNOWN_MIME_TYPE "unknown"
    1313
    14 const char * get_mime_type_from_filename( const char *file );
     14const char * gtr_get_mime_type_from_filename( const char *file );
    1515
    16 GdkPixbuf * get_mime_type_icon( const char   * mime_type,
    17                                 GtkIconSize    icon_size,
    18                                 GtkWidget    * for_widget );
     16GdkPixbuf * gtr_get_mime_type_icon( const char   * mime_type,
     17                                    GtkIconSize    icon_size,
     18                                    GtkWidget    * for_widget );
    1919
    2020#endif
  • trunk/gtk/main.c

    r11547 r11563  
    142142
    143143    /* build a list of the selected torrents' ids */
    144     s = tr_window_get_selection( data->wind );
     144    s = gtr_window_get_selection( data->wind );
    145145    for( paths=l=gtk_tree_selection_get_selected_rows(s,&model); l; l=l->next ) {
    146146        GtkTreeIter iter;
     
    194194***/
    195195
    196 static void           appsetup( TrWindow * wind,
    197                                 GSList *   args,
    198                                 struct     cbdata *,
    199                                 gboolean   paused,
    200                                 gboolean   minimized );
    201 
    202 static void           winsetup( struct cbdata * cbdata,
    203                                 TrWindow *      wind );
    204 
    205 static void           wannaquit( gpointer vdata );
     196static void appsetup( TrWindow       * wind,
     197                      GSList         * args,
     198                      struct cbdata  * cbdata,
     199                      gboolean         paused,
     200                      gboolean         minimized );
     201
     202static void winsetup( struct cbdata * cbdata, TrWindow * wind );
     203
     204static void wannaquit( gpointer vdata );
    206205
    207206static void coreerr( TrCore *, guint, const char *, struct cbdata * );
    208207
    209 static void           onAddTorrent( TrCore *,
    210                                     tr_ctor *,
    211                                     gpointer );
    212 
    213 static void           prefschanged( TrCore *     core,
    214                                     const char * key,
    215                                     gpointer     data );
    216 
    217 static gboolean       updatemodel( gpointer gdata );
     208static void onAddTorrent( TrCore *, tr_ctor *, gpointer );
     209
     210static void prefschanged( TrCore * core, const char * key, gpointer );
     211
     212static gboolean updatemodel( gpointer gdata );
    218213
    219214/***
     
    317312
    318313    getTorrentCounts( data, &counts );
    319     action_sensitize( "pause-torrent", counts.activeCount != 0 );
    320     action_sensitize( "start-torrent", counts.inactiveCount != 0 );
    321     action_sensitize( "remove-torrent", counts.totalCount != 0 );
    322     action_sensitize( "delete-torrent", counts.totalCount != 0 );
    323     action_sensitize( "verify-torrent", counts.totalCount != 0 );
    324     action_sensitize( "relocate-torrent", counts.totalCount != 0 );
    325     action_sensitize( "show-torrent-properties", counts.totalCount != 0 );
    326     action_sensitize( "open-torrent-folder", counts.totalCount == 1 );
    327     action_sensitize( "copy-magnet-link-to-clipboard", counts.totalCount == 1 );
     314    gtr_action_set_sensitive( "pause-torrent", counts.activeCount != 0 );
     315    gtr_action_set_sensitive( "start-torrent", counts.inactiveCount != 0 );
     316    gtr_action_set_sensitive( "remove-torrent", counts.totalCount != 0 );
     317    gtr_action_set_sensitive( "delete-torrent", counts.totalCount != 0 );
     318    gtr_action_set_sensitive( "verify-torrent", counts.totalCount != 0 );
     319    gtr_action_set_sensitive( "relocate-torrent", counts.totalCount != 0 );
     320    gtr_action_set_sensitive( "show-torrent-properties", counts.totalCount != 0 );
     321    gtr_action_set_sensitive( "open-torrent-folder", counts.totalCount == 1 );
     322    gtr_action_set_sensitive( "copy-magnet-link-to-clipboard", counts.totalCount == 1 );
    328323
    329324    canUpdate = 0;
    330325    gtk_tree_selection_selected_foreach( data->sel, accumulateCanUpdateForeach, &canUpdate );
    331     action_sensitize( "update-tracker", canUpdate != 0 );
     326    gtr_action_set_sensitive( "update-tracker", canUpdate != 0 );
    332327
    333328    {
     
    335330        GtkTreeModel * model = gtk_tree_view_get_model( view );
    336331        const int torrentCount = gtk_tree_model_iter_n_children( model, NULL ) != 0;
    337         action_sensitize( "select-all", torrentCount != 0 );
    338         action_sensitize( "deselect-all", torrentCount != 0 );
     332        gtr_action_set_sensitive( "select-all", torrentCount != 0 );
     333        gtr_action_set_sensitive( "deselect-all", torrentCount != 0 );
    339334    }
    340335
     
    342337        const size_t total = tr_core_get_torrent_count( data->core );
    343338        const size_t active = tr_core_get_active_torrent_count( data->core );
    344         action_sensitize( "pause-all-torrents", active != 0 );
    345         action_sensitize( "start-all-torrents", active != total );
     339        gtr_action_set_sensitive( "pause-all-torrents", active != 0 );
     340        gtr_action_set_sensitive( "start-all-torrents", active != total );
    346341    }
    347342
     
    394389        case SIGTERM:
    395390            g_message( _( "Got signal %d; trying to shut down cleanly.  Do it again if it gets stuck." ), sig );
    396             doAction( "quit", sighandler_cbdata );
     391            gtr_actions_handler( "quit", sighandler_cbdata );
    397392            break;
    398393
     
    717712        configDir = (char*) tr_getDefaultConfigDir( MY_CONFIG_NAME );
    718713
    719     tr_notify_init( );
     714    gtr_notify_init( );
    720715    didinit = cf_init( configDir, NULL ); /* must come before actions_init */
    721716
     
    795790        /* init the ui manager */
    796791        myUIManager = gtk_ui_manager_new ( );
    797         actions_init ( myUIManager, cbdata );
     792        gtr_actions_init ( myUIManager, cbdata );
    798793        gtk_ui_manager_add_ui_from_string ( myUIManager, fallback_ui_file, -1, NULL );
    799794        gtk_ui_manager_ensure_update ( myUIManager );
     
    801796
    802797        /* create main window now to be a parent to any error dialogs */
    803         win = GTK_WINDOW( tr_window_new( myUIManager, cbdata->core ) );
     798        win = GTK_WINDOW( gtr_window_new( myUIManager, cbdata->core ) );
    804799        g_signal_connect( win, "size-allocate", G_CALLBACK( onMainWindowSizeAllocated ), cbdata );
    805800
     
    840835onCoreBusy( TrCore * core UNUSED, gboolean busy, struct cbdata * c )
    841836{
    842     tr_window_set_busy( c->wind, busy );
     837    gtr_window_set_busy( c->wind, busy );
    843838}
    844839
     
    868863        pref_flag_set( PREF_KEY_SHOW_TRAY_ICON, TRUE );
    869864
    870     actions_set_core( cbdata->core );
     865    gtr_actions_set_core( cbdata->core );
    871866
    872867    /* set up core handlers */
     
    901896                                          cbdata->icon != NULL );
    902897        cbdata->isIconified = FALSE; // ensure that the next toggle iconifies
    903         action_toggle( "toggle-main-window", FALSE );
     898        gtr_action_set_toggled( "toggle-main-window", FALSE );
    904899    }
    905900
     
    940935toggleMainWindow( struct cbdata * cbdata )
    941936{
    942     GtkWindow * window = GTK_WINDOW( cbdata->wind );
     937    GtkWindow * window = cbdata->wind;
    943938    const int   doShow = cbdata->isIconified;
    944939    static int  x = 0;
     
    976971    else {
    977972        if( cbdata->quit_dialog == NULL ) {
    978             cbdata->quit_dialog = askquit( cbdata->core, cbdata->wind, wannaquit, cbdata );
     973            cbdata->quit_dialog = gtr_confirm_quit( cbdata->wind, cbdata->core, wannaquit, cbdata );
    979974            g_object_add_weak_pointer( G_OBJECT( cbdata->quit_dialog ), &cbdata->quit_dialog );
    980975        }
     
    991986
    992987    if( cbdata->icon != NULL )
    993         action_activate ( "toggle-main-window" );
     988        gtr_action_activate ( "toggle-main-window" );
    994989    else
    995990        maybeaskquit( cbdata );
     
    10621057    g_assert( NULL == cbdata->wind );
    10631058    cbdata->wind = GTK_WINDOW( wind );
    1064     cbdata->sel = sel = GTK_TREE_SELECTION( tr_window_get_selection( cbdata->wind ) );
     1059    cbdata->sel = sel = GTK_TREE_SELECTION( gtr_window_get_selection( cbdata->wind ) );
    10651060
    10661061    g_signal_connect( sel, "changed", G_CALLBACK( selectionChangedCB ), cbdata );
     
    11261121
    11271122static void
    1128 do_exit_cb( GtkWidget *w  UNUSED,
    1129             gpointer data UNUSED )
     1123exit_now_cb( GtkWidget *w UNUSED, gpointer data UNUSED )
    11301124{
    11311125    exit( 0 );
     
    11691163    b = gtk_alignment_new( 0.0, 1.0, 0.01, 0.01 );
    11701164    w = gtk_button_new_with_mnemonic( _( "_Quit Now" ) );
    1171     g_signal_connect( w, "clicked", G_CALLBACK( do_exit_cb ), NULL );
     1165    g_signal_connect( w, "clicked", G_CALLBACK( exit_now_cb ), NULL );
    11721166    gtk_container_add( GTK_CONTAINER( b ), w );
    11731167    gtk_table_attach( GTK_TABLE( p ), b, 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 10 );
     
    12281222{
    12291223    if( cbdata->errqueue )
    1230         flushAddTorrentErrors( GTK_WINDOW( cbdata->wind ),
     1224        flushAddTorrentErrors( cbdata->wind,
    12311225                               gtr_ngettext( "Couldn't add corrupt torrent",
    12321226                                             "Couldn't add corrupt torrents",
     
    12351229
    12361230    if( cbdata->dupqueue )
    1237         flushAddTorrentErrors( GTK_WINDOW( cbdata->wind ),
     1231        flushAddTorrentErrors( cbdata->wind,
    12381232                               gtr_ngettext( "Couldn't add duplicate torrent",
    12391233                                             "Couldn't add duplicate torrents",
     
    12751269
    12761270    if( cbdata->wind )
    1277         gtk_window_set_urgency_hint( GTK_WINDOW( cbdata->wind ), FALSE );
     1271        gtk_window_set_urgency_hint( cbdata->wind, FALSE );
    12781272}
    12791273
     
    12811275
    12821276static void
    1283 onAddTorrent( TrCore *  core,
    1284               tr_ctor * ctor,
    1285               gpointer  gdata )
     1277onAddTorrent( TrCore * core, tr_ctor * ctor, gpointer gdata )
    12861278{
    12871279    struct cbdata * cbdata = gdata;
    1288     GtkWidget *     w = addSingleTorrentDialog( cbdata->wind, core, ctor );
     1280    GtkWidget * w = gtr_torrent_options_dialog_new( cbdata->wind, core, ctor );
    12891281
    12901282#if GTK_CHECK_VERSION( 2, 8, 0 )
     
    13301322        const int show = pref_flag_get( key );
    13311323        if( show && !cbdata->icon )
    1332             cbdata->icon = tr_icon_new( cbdata->core );
     1324            cbdata->icon = gtr_icon_new( cbdata->core );
    13331325        else if( !show && cbdata->icon ) {
    13341326            g_object_unref( cbdata->icon );
     
    14281420        const gboolean b = pref_flag_get( key );
    14291421        tr_sessionUseAltSpeed( tr, b );
    1430         action_toggle( key, b );
     1422        gtr_action_set_toggled( key, b );
    14311423    }
    14321424    else if( !strcmp( key, TR_PREFS_KEY_ALT_SPEED_TIME_BEGIN ) )
     
    14871479        tr_core_update( data->core );
    14881480
    1489         /* update the main window's statusbar and toolbar buttons */
     1481        /* refresh the main window's statusbar and toolbar buttons */
    14901482        if( data->wind != NULL )
    1491             tr_window_update( data->wind );
     1483            gtr_window_refresh( data->wind );
    14921484
    14931485        /* update the actions */
     
    14961488        /* update the status tray icon */
    14971489        if( data->icon != NULL )
    1498             tr_icon_refresh( data->icon );
     1490            gtr_icon_refresh( data->icon );
    14991491    }
    15001492
     
    15591551    gboolean invoked = FALSE;
    15601552    tr_session * session = tr_core_session( data->core );
    1561     GtkTreeSelection * s = tr_window_get_selection( data->wind );
     1553    GtkTreeSelection * s = gtr_window_get_selection( data->wind );
    15621554
    15631555    tr_bencInitDict( &top, 2 );
     
    15961588msgwinclosed( void )
    15971589{
    1598     action_toggle( "toggle-message-log", FALSE );
     1590    gtr_action_set_toggled( "toggle-message-log", FALSE );
    15991591    return FALSE;
    16001592}
     
    16181610{
    16191611    GSList * l = NULL;
    1620     GtkTreeSelection * s = tr_window_get_selection( data->wind );
     1612    GtkTreeSelection * s = gtr_window_get_selection( data->wind );
    16211613
    16221614    gtk_tree_selection_selected_foreach( s, accumulateSelectedTorrents, &l );
     
    16241616    if( l != NULL ) {
    16251617        l = g_slist_reverse( l );
    1626         confirmRemove( data->wind, data->core, l, delete_files );
     1618        gtr_confirm_remove( data->wind, data->core, l, delete_files );
    16271619    }
    16281620}
     
    16481640{
    16491641    tr_torrent * tor = NULL;
    1650     GtkTreeSelection * s = tr_window_get_selection( data->wind );
     1642    GtkTreeSelection * s = gtr_window_get_selection( data->wind );
    16511643    GtkTreeModel * m;
    16521644    GList * l = gtk_tree_selection_get_selected_rows( s, &m );
     
    16991691
    17001692void
    1701 doAction( const char * action_name, gpointer user_data )
     1693gtr_actions_handler( const char * action_name, gpointer user_data )
    17021694{
    17031695    struct cbdata * data = user_data;
     
    17061698    if( !strcmp( action_name, "add-torrent-from-url" ) )
    17071699    {
    1708         addURLDialog( data->wind, data->core );
     1700        GtkWidget * w = gtr_torrent_add_from_url_dialog_new( data->wind, data->core );
     1701        gtk_widget_show( w );
    17091702    }
    17101703    else if(  !strcmp( action_name, "add-torrent-menu" )
    17111704      || !strcmp( action_name, "add-torrent-toolbar" ) )
    17121705    {
    1713         addDialog( data->wind, data->core );
     1706        GtkWidget * w = gtr_torrent_add_from_file_dialog_new( data->wind, data->core );
     1707        gtk_widget_show( w );
    17141708    }
    17151709    else if( !strcmp( action_name, "show-stats" ) )
    17161710    {
    1717         GtkWidget * dialog = stats_dialog_create( data->wind, data->core );
     1711        GtkWidget * dialog = gtr_stats_dialog_new( data->wind, data->core );
    17181712        gtk_widget_show( dialog );
    17191713    }
     
    17431737        if( ids != NULL )
    17441738        {
    1745             GtkWindow * parent = GTK_WINDOW( data->wind );
     1739            GtkWindow * parent = data->wind;
    17461740            GtkWidget * w = gtr_relocate_dialog_new( parent, data->core, ids );
    17471741            gtk_widget_show( w );
     
    17661760    else if( !strcmp( action_name, "open-torrent-folder" ) )
    17671761    {
    1768         GtkTreeSelection * s = tr_window_get_selection( data->wind );
     1762        GtkTreeSelection * s = gtr_window_get_selection( data->wind );
    17691763        gtk_tree_selection_selected_foreach( s, openFolderForeach, data );
    17701764    }
     
    17791773            h = g_new( struct DetailsDialogHandle, 1 );
    17801774            h->key = getDetailsDialogKey( ids );
    1781             h->dialog = w = torrent_inspector_new( GTK_WINDOW( data->wind ), data->core );
    1782             torrent_inspector_set_torrents( w, ids );
     1775            h->dialog = w = gtr_torrent_details_dialog_new( data->wind, data->core );
     1776            gtr_torrent_details_dialog_set_torrents( w, ids );
    17831777            data->details = g_slist_append( data->details, h );
    17841778            g_object_weak_ref( G_OBJECT( w ), detailsClosed, data );
     1779            gtk_widget_show( w );
    17851780        }
    17861781        gtk_window_present( GTK_WINDOW( w ) );
     
    17891784    else if( !strcmp( action_name, "new-torrent" ) )
    17901785    {
    1791         GtkWidget * w = make_meta_ui( GTK_WINDOW( data->wind ), data->core );
    1792         gtk_widget_show_all( w );
     1786        GtkWidget * w = gtr_torrent_creation_dialog_new( data->wind, data->core );
     1787        gtk_widget_show( w );
    17931788    }
    17941789    else if( !strcmp( action_name, "remove-torrent" ) )
     
    18061801    else if( !strcmp( action_name, "select-all" ) )
    18071802    {
    1808         GtkTreeSelection * s = tr_window_get_selection( data->wind );
     1803        GtkTreeSelection * s = gtr_window_get_selection( data->wind );
    18091804        gtk_tree_selection_select_all( s );
    18101805    }
    18111806    else if( !strcmp( action_name, "deselect-all" ) )
    18121807    {
    1813         GtkTreeSelection * s = tr_window_get_selection( data->wind );
     1808        GtkTreeSelection * s = gtr_window_get_selection( data->wind );
    18141809        gtk_tree_selection_unselect_all( s );
    18151810    }
     
    18181813        if( NULL == data->prefs )
    18191814        {
    1820             data->prefs = tr_prefs_dialog_new( G_OBJECT( data->core ),
    1821                                                data->wind );
     1815            data->prefs = gtr_prefs_dialog_new( data->wind, G_OBJECT( data->core ) );
    18221816            g_signal_connect( data->prefs, "destroy",
    18231817                              G_CALLBACK( gtk_widget_destroyed ), &data->prefs );
     
    18291823        if( !data->msgwin )
    18301824        {
    1831             GtkWidget * win = msgwin_new( data->core, data->wind );
     1825            GtkWidget * win = gtr_message_log_window_new( data->core, data->wind );
    18321826            g_signal_connect( win, "destroy", G_CALLBACK( msgwinclosed ), NULL );
    18331827            data->msgwin = win;
     
    18351829        else
    18361830        {
    1837             action_toggle( "toggle-message-log", FALSE );
     1831            gtr_action_set_toggled( "toggle-message-log", FALSE );
    18381832            gtk_widget_destroy( data->msgwin );
    18391833            data->msgwin = NULL;
  • trunk/gtk/makemeta-ui.c

    r11522 r11563  
    422422
    423423GtkWidget*
    424 make_meta_ui( GtkWindow  * parent, TrCore * core )
     424gtr_torrent_creation_dialog_new( GtkWindow  * parent, TrCore * core )
    425425{
    426426    int row = 0;
     
    524524    g_signal_connect( d, "drag-data-received", G_CALLBACK( on_drag_data_received ), ui );
    525525
     526    gtk_widget_show_all( t );
    526527    return d;
    527528}
  • trunk/gtk/makemeta-ui.h

    r9868 r11563  
    1111 */
    1212
    13 #ifndef MAKE_META_UI__H
    14 #define MAKE_META_UI__H
     13#ifndef GTR_TORRENT_CREATION_DIALOG_H
     14#define GTR_TORRENT_CREATION_DIALOG_H
    1515
    1616#include <gtk/gtk.h>
    1717#include "tr-core.h"
    1818
    19 GtkWidget* make_meta_ui( GtkWindow * parent, TrCore * core );
     19GtkWidget* gtr_torrent_creation_dialog_new( GtkWindow * parent, TrCore * core );
    2020
    2121#endif
  • trunk/gtk/msgwin.c

    r11560 r11563  
    375375
    376376GtkWidget *
    377 msgwin_new( TrCore * core, GtkWindow * parent )
     377gtr_message_log_window_new( TrCore * core, GtkWindow * parent )
    378378{
    379379    GtkWidget *      win;
  • trunk/gtk/msgwin.h

    r11337 r11563  
    1111 */
    1212
    13 #ifndef TG_MSGWIN_H
    14 #define TG_MSGWIN_H
     13#ifndef GTR_MSGWIN_H
     14#define GTR_MSGWIN_H
    1515
    16 GtkWidget * msgwin_new( TrCore * core, GtkWindow * parent );
     16GtkWidget * gtr_message_log_window_new( TrCore * core, GtkWindow * parent );
    1717
    1818#endif
  • trunk/gtk/notify.c

    r11511 r11563  
    3030#ifndef HAVE_LIBNOTIFY
    3131
    32 void tr_notify_init( void ) { }
    33 void tr_notify_send( TrTorrent * tor UNUSED ) { }
    34 void tr_notify_added( const char * name UNUSED ) { }
     32void gtr_notify_init( void ) { }
     33void gtr_notify_send( TrTorrent * tor UNUSED ) { }
     34void gtr_notify_added( const char * name UNUSED ) { }
    3535
    3636#else
     
    3838
    3939void
    40 tr_notify_init( void )
     40gtr_notify_init( void )
    4141{
    4242    notify_init( "Transmission" );
     
    110110
    111111void
    112 tr_notify_send( TrTorrent *tor )
     112gtr_notify_send( TrTorrent *tor )
    113113{
    114114#ifdef HAVE_LIBCANBERRA
     
    156156
    157157void
    158 tr_notify_added( const char * name )
     158gtr_notify_added( const char * name )
    159159{
    160160    if( pref_flag_get( PREF_KEY_SHOW_DESKTOP_NOTIFICATION ) )
  • trunk/gtk/notify.h

    r9868 r11563  
    1111 */
    1212
    13 #ifndef __TR_NOTIFY_H__
    14 #define __TR_NOTIFY_H__
     13#ifndef GTR_NOTIFY_H
     14#define GTR_NOTIFY_H
    1515
    1616#include "tr-torrent.h"
    1717
    18 void tr_notify_init( void );
     18void gtr_notify_init( void );
    1919
    20 void tr_notify_send( TrTorrent * tor );
     20void gtr_notify_send( TrTorrent * tor );
    2121
    22 void tr_notify_added( const char * name );
     22void gtr_notify_added( const char * name );
    2323
    2424#endif
  • trunk/gtk/stats.c

    r11132 r11563  
    135135
    136136GtkWidget*
    137 stats_dialog_create( GtkWindow * parent,
    138                      TrCore *    core )
     137gtr_stats_dialog_new( GtkWindow * parent, TrCore * core )
    139138{
    140139    guint            i;
  • trunk/gtk/stats.h

    r9868 r11563  
    1111 */
    1212
    13 #ifndef __TR_GTK_STATS_H__
    14 #define __TR_GTK_STATS_H__
     13#ifndef GTR_STATS_DIALOG_H
     14#define GTR_STATS_DIALOG_H
    1515
    1616#include <gtk/gtk.h>
    1717#include "tr-core.h"
    1818
    19 GtkWidget* stats_dialog_create( GtkWindow * parent,
    20                                 TrCore *    core );
     19GtkWidget* gtr_stats_dialog_new( GtkWindow * parent, TrCore * core );
    2120
    22 #endif
     21#endif /* GTR_STATS_DIALOG_H */
  • trunk/gtk/torrent-cell-renderer.c

    r11522 r11563  
    362362        mime_type = DIRECTORY_MIME_TYPE;
    363363    else
    364         mime_type = get_mime_type_from_filename( info->files[0].name );
    365 
    366     return get_mime_type_icon( mime_type, icon_size, for_widget );
     364        mime_type = gtr_get_mime_type_from_filename( info->files[0].name );
     365
     366    return gtr_get_mime_type_icon( mime_type, icon_size, for_widget );
    367367}
    368368
  • trunk/gtk/torrent-cell-renderer.h

    r9868 r11563  
    1111 */
    1212
    13 #ifndef TORRENT_CELL_RENDERER_H
    14 #define TORRENT_CELL_RENDERER_H
     13#ifndef GTR_TORRENT_CELL_RENDERER_H
     14#define GTR_TORRENT_CELL_RENDERER_H
    1515
    1616#include <glib-object.h>
     
    4343GtkCellRenderer * torrent_cell_renderer_new( void );
    4444
    45 #endif
     45#endif /* GTR_TORRENT_CELL_RENDERER_H */
  • trunk/gtk/tr-core.c

    r11559 r11563  
    905905
    906906    if( doNotify )
    907         tr_notify_added( inf->name );
     907        gtr_notify_added( inf->name );
    908908
    909909    /* cleanup */
     
    11811181    /* Setting the toggle-main-window GtkCheckMenuItem to
    11821182       make sure its state is correctly set */
    1183     action_toggle( "toggle-main-window", TRUE);
     1183    gtr_action_set_toggled( "toggle-main-window", TRUE);
    11841184
    11851185    *success = TRUE;
  • trunk/gtk/tr-core.h

    r11559 r11563  
    2323 *****************************************************************************/
    2424
    25 #ifndef TR_CORE_H
    26 #define TR_CORE_H
     25#ifndef GTR_CORE_H
     26#define GTR_CORE_H
    2727
    2828#include <glib-object.h>
     
    203203};
    204204
    205 #endif
     205#endif /* GTR_CORE_H */
  • trunk/gtk/tr-icon.c

    r11124 r11563  
    2525
    2626#ifndef STATUS_ICON_SUPPORTED
    27 
    28 gpointer
    29 tr_icon_new( TrCore * core )
    30 {
    31     return NULL;
    32 }
    33 
    34 void
    35 tr_icon_refresh( gpointer vicon UNUSED )
    36 {
    37 }
    38 
     27gpointer gtr_icon_new( TrCore * core UNUSED ) { return NULL; }
     28void gtr_icon_refresh( gpointer vicon UNUSED ) { }
    3929#else
    4030
    4131#ifdef HAVE_LIBAPPINDICATOR
    4232void
    43 tr_icon_refresh( gpointer vindicator UNUSED )
     33gtr_icon_refresh( gpointer vindicator UNUSED )
    4434{
    4535}
    4636#else
    4737static void
    48 activated( GtkStatusIcon   * self      UNUSED,
    49            gpointer          user_data UNUSED )
     38activated( GtkStatusIcon * self UNUSED, gpointer user_data UNUSED )
    5039{
    51     action_activate ( "toggle-main-window" );
     40    gtr_action_activate( "toggle-main-window" );
    5241}
    5342
     
    5847       gpointer         data UNUSED )
    5948{
    60     GtkWidget * w = action_get_widget( "/icon-popup" );
     49    GtkWidget * w = gtr_action_get_widget( "/icon-popup" );
    6150
    6251    gtk_menu_popup ( GTK_MENU( w ), NULL, NULL,
     
    6655
    6756void
    68 tr_icon_refresh( gpointer vicon )
     57gtr_icon_refresh( gpointer vicon )
    6958{
    7059    double KBps;
     
    148137#ifdef HAVE_LIBAPPINDICATOR
    149138gpointer
    150 tr_icon_new( TrCore * core)
     139gtr_icon_new( TrCore * core)
    151140{
    152141    GtkWidget * w;
     
    154143    AppIndicator * indicator = app_indicator_new( ICON_NAME, icon_name, APP_INDICATOR_CATEGORY_SYSTEM_SERVICES );
    155144    app_indicator_set_status( indicator, APP_INDICATOR_STATUS_ACTIVE );
    156     w = action_get_widget( "/icon-popup" );
     145    w = gtr_action_get_widget( "/icon-popup" );
    157146    app_indicator_set_menu( indicator, GTK_MENU ( w ) );
    158147    g_object_set_data( G_OBJECT( indicator ), "tr-core", core );
     
    161150#else
    162151gpointer
    163 tr_icon_new( TrCore * core )
     152gtr_icon_new( TrCore * core )
    164153{
    165154    const char * icon_name = getIconName( );
  • trunk/gtk/tr-icon.h

    r9868 r11563  
    1111 */
    1212
    13 #ifndef TR_ICON_H
    14 #define TR_ICON_H
     13#ifndef GTR_ICON_H
     14#define GTR_ICON_H
    1515
    1616#include <gtk/gtk.h>
    1717#include "tr-core.h"
    1818
    19 #if GTK_CHECK_VERSION( 2, 10, 0 )
     19#if GTK_CHECK_VERSION( 2,10,0 )
    2020 #define STATUS_ICON_SUPPORTED
    2121#endif
    2222
    23 gpointer tr_icon_new( TrCore * core );
     23gpointer  gtr_icon_new      ( TrCore * core );
     24void      gtr_icon_refresh  ( gpointer );
    2425
    25 void tr_icon_refresh( gpointer );
    26 
    27 #endif
     26#endif /* GTR_ICON_H */
  • trunk/gtk/tr-prefs.c

    r11513 r11563  
    12331233
    12341234GtkWidget *
    1235 tr_prefs_dialog_new( GObject *   core,
    1236                      GtkWindow * parent )
     1235gtr_prefs_dialog_new( GtkWindow * parent, GObject * core )
    12371236{
    12381237    GtkWidget * d;
  • trunk/gtk/tr-prefs.h

    r11128 r11563  
    1111 */
    1212
    13 #ifndef TR_PREFS_H
    14 #define TR_PREFS_H
     13#ifndef GTR_PREFS_H
     14#define GTR_PREFS_H
    1515
    1616#include <gtk/gtk.h>
    1717
    18 GtkWidget * tr_prefs_dialog_new( GObject *   core,
    19                                  GtkWindow * parent );
     18GtkWidget * gtr_prefs_dialog_new( GtkWindow * parent, GObject * core );
    2019
    2120/* if you add a key here,  you /must/ add its
     
    5655};
    5756
    58 #endif
     57#endif /* GTR_PREFS_H */
  • trunk/gtk/tr-torrent.c

    r11538 r11563  
    148148notifyInMainThread( gpointer user_data )
    149149{
    150     tr_notify_send( TR_TORRENT( user_data ) );
     150    gtr_notify_send( TR_TORRENT( user_data ) );
    151151    return FALSE;
    152152}
  • trunk/gtk/tr-torrent.h

    r11538 r11563  
    2323 *****************************************************************************/
    2424
    25 #ifndef TR_TORRENT_H
    26 #define TR_TORRENT_H
     25#ifndef GTR_TORRENT_H
     26#define GTR_TORRENT_H
    2727
    2828#include <glib-object.h>
  • trunk/gtk/tr-window.c

    r11522 r11563  
    2929
    3030#include <libtransmission/transmission.h>
     31#include <libtransmission/utils.h> /* tr_formatter_speed_KBps() */
    3132
    3233#include "actions.h"
     
    9697               GdkEventButton * event )
    9798{
    98     GtkWidget * menu = action_get_widget ( "/main-window-popup" );
     99    GtkWidget * menu = gtr_action_get_widget ( "/main-window-popup" );
    99100
    100101    gtk_menu_popup ( GTK_MENU( menu ), NULL, NULL, NULL, NULL,
     
    109110                    gpointer            user_data UNUSED )
    110111{
    111     action_activate( "show-torrent-properties" );
     112    gtr_action_activate( "show-torrent-properties" );
    112113}
    113114
     
    196197    else if( !strcmp( key, PREF_KEY_STATUSBAR_STATS ) )
    197198    {
    198         tr_window_update( (TrWindow*)wind );
     199        gtr_window_refresh( (TrWindow*)wind );
    199200    }
    200201    else if( !strcmp( key, TR_PREFS_KEY_ALT_SPEED_ENABLED ) ||
     
    565566
    566567GtkWidget *
    567 tr_window_new( GtkUIManager * ui_mgr, TrCore * core )
     568gtr_window_new( GtkUIManager * ui_mgr, TrCore * core )
    568569{
    569570    int           i, n;
     
    598599
    599600    /* main menu */
    600     mainmenu = action_get_widget( "/main-window-menu" );
    601     w = action_get_widget( "/main-window-menu/torrent-menu/update-tracker" );
     601    mainmenu = gtr_action_get_widget( "/main-window-menu" );
     602    w = gtr_action_get_widget( "/main-window-menu/torrent-menu/update-tracker" );
    602603#if GTK_CHECK_VERSION( 2, 12, 0 )
    603604    g_signal_connect( w, "query-tooltip",
     
    606607
    607608    /* toolbar */
    608     toolbar = p->toolbar = action_get_widget( "/main-window-toolbar" );
    609     action_set_important( "add-torrent-toolbar", TRUE );
    610     action_set_important( "show-torrent-properties", TRUE );
     609    toolbar = p->toolbar = gtr_action_get_widget( "/main-window-toolbar" );
     610    gtr_action_set_important( "add-torrent-toolbar", TRUE );
     611    gtr_action_set_important( "show-torrent-properties", TRUE );
    611612
    612613    /* filter */
     
    842843
    843844void
    844 tr_window_update( TrWindow * self )
     845gtr_window_refresh( TrWindow * self )
    845846{
    846847    PrivateData * p = get_private_data( self );
     
    856857
    857858GtkTreeSelection*
    858 tr_window_get_selection( TrWindow * w )
     859gtr_window_get_selection( TrWindow * w )
    859860{
    860861    return get_private_data( w )->selection;
     
    862863
    863864void
    864 tr_window_set_busy( TrWindow * w, gboolean isBusy )
     865gtr_window_set_busy( TrWindow * w, gboolean isBusy )
    865866{
    866867    if( w && gtr_widget_get_realized( GTK_WIDGET( w ) ) )
  • trunk/gtk/tr-window.h

    r10937 r11563  
    2323 *****************************************************************************/
    2424
    25 #ifndef TR_WINDOW_H
    26 #define TR_WINDOW_H
     25#ifndef GTR_WINDOW_H
     26#define GTR_WINDOW_H
    2727
    2828#include <gtk/gtk.h>
    29 #include <libtransmission/utils.h> /* tr_formatter_speed_KBps() */
    3029#include "tr-core.h"
    3130
    3231typedef GtkWindow TrWindow;
    3332
    34 GtkTreeSelection * tr_window_get_selection( TrWindow * );
     33GtkWidget        * gtr_window_new( GtkUIManager * uim, TrCore * core );
     34GtkTreeSelection * gtr_window_get_selection( TrWindow * );
     35void               gtr_window_set_busy( TrWindow *, gboolean isBusy );
     36void               gtr_window_refresh( TrWindow * );
    3537
    36 GtkWidget        * tr_window_new( GtkUIManager * uim, TrCore * core );
    37 
    38 void               tr_window_update( TrWindow * );
    39 
    40 void               tr_window_set_busy( TrWindow *, gboolean isBusy );
    41 
    42 #endif
     38#endif /* GTR_WINDOW_H */
  • trunk/gtk/util.c

    r11560 r11563  
    313313
    314314void
    315 addTorrentErrorDialog( GtkWidget *  child,
    316                        int          err,
    317                        const char * filename )
     315gtr_add_torrent_error_dialog( GtkWidget * child, int err, const char * file )
    318316{
    319317    char * secondary;
     
    328326        default: fmt = _( "The torrent file \"%s\" encountered an unknown error." ); break;
    329327    }
    330     secondary = g_strdup_printf( fmt, filename );
     328    secondary = g_strdup_printf( fmt, file );
    331329
    332330    w = gtk_message_dialog_new( win,
  • trunk/gtk/util.h

    r11560 r11563  
    171171void gtr_http_failure_dialog( GtkWidget * parent, const char * url, long response_code );
    172172
    173 void addTorrentErrorDialog( GtkWidget  * window_or_child,
    174                             int          err,
    175                             const char * filename );
     173void gtr_add_torrent_error_dialog( GtkWidget  * window_or_child,
     174                                   int          err,
     175                                   const char * filename );
    176176
    177177/* pop up the context menu if a user right-clicks.
Note: See TracChangeset for help on using the changeset viewer.