Changeset 7020


Ignore:
Timestamp:
Nov 2, 2008, 8:16:08 PM (12 years ago)
Author:
charles
Message:

(gtk) #1407: gtk client doesn't support --version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r6978 r7020  
    358358    gboolean            didinit = FALSE;
    359359    gboolean            didlock = FALSE;
     360    gboolean            showversion = FALSE;
    360361    gboolean            startpaused = FALSE;
    361362    gboolean            startminimized = FALSE;
     
    367368        { "paused",     'p', 0, G_OPTION_ARG_NONE,
    368369          &startpaused, _( "Start with all torrents paused" ), NULL },
     370        { "version",    '\0', 0, G_OPTION_ARG_NONE,
     371          &showversion, _( "Show version number and exit" ), NULL },
    369372#ifdef STATUS_ICON_SUPPORTED
    370373        { "minimized",  'm', 0, G_OPTION_ARG_NONE,
     
    396399                             domain, &gerr ) )
    397400    {
    398         g_message( "%s", gerr->message );
     401        fprintf( stderr, "%s\n", gerr->message );
    399402        g_clear_error( &gerr );
    400403        return 0;
    401404    }
     405
     406    if( showversion )
     407    {
     408        fprintf( stderr, "%s %s\n", g_get_application_name( ), LONG_VERSION_STRING );
     409        return 0;
     410    }
     411
    402412    if( configDir == NULL )
    403413        configDir = (char*) tr_getDefaultConfigDir( );
Note: See TracChangeset for help on using the changeset viewer.