Changeset 5646
- Timestamp:
- Apr 19, 2008, 12:41:32 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/transmissioncli.1
r5409 r5646 57 57 The options are as follows: 58 58 .Bl -tag -width Ds 59 .It Fl g, Fl -config-dir Ar directory 60 Where to look for configuration files. 59 61 .It Fl c, Fl -create-from Ar source-file 60 62 Create torrent from the specified source file. -
trunk/cli/transmissioncli.c
r5588 r5646 44 44 45 45 const char * USAGE = 46 "Usage: %s [-car[-m]] [-df inpsuv] [-h] file.torrent [output-dir]\n\n"46 "Usage: %s [-car[-m]] [-dfginpsuv] [-h] file.torrent [output-dir]\n\n" 47 47 "Options:\n" 48 " -h, --help Print this help and exit\n" 49 " -i, --info Print metainfo and exit\n" 50 " -s, --scrape Print counts of seeders/leechers and exit\n" 51 " -V, --version Print the version number and exit\n" 48 52 " -c, --create-from <file> Create torrent from the specified source file.\n" 49 " -a, --announce <url> Used in conjunction with -c.\n" 50 " -r, --private Used in conjunction with -c.\n" 51 " -m, --comment <text> Adds an optional comment when creating a torrent.\n" 52 " -d, --download <int> Maximum download rate (-1 = no limit, default = -1)\n" 53 " -f, --finish <shell script> Command you wish to run on completion\n" 54 " -h, --help Print this help and exit\n" 55 " -i, --info Print metainfo and exit\n" 56 " -n --nat-traversal Attempt NAT traversal using NAT-PMP or UPnP IGD\n" 57 " -p, --port <int> Port we should listen on (default = %d)\n" 58 " -s, --scrape Print counts of seeders/leechers and exit\n" 59 " -u, --upload <int> Maximum upload rate (-1 = no limit, default = 20)\n" 60 " -v, --verbose <int> Verbose level (0 to 2, default = 0)\n" 61 " -V, --version Print the version number and exit\n" 62 " -y, --recheck Force a recheck of the torrent data\n"; 53 " -a, --announce <url> Used in conjunction with -c.\n" 54 " -g, --config-dir <path> Where to look for configuration files\n" 55 " -r, --private Used in conjunction with -c.\n" 56 " -m, --comment <text> Adds an optional comment when creating a torrent.\n" 57 " -d, --download <int> Max download rate (-1 = no limit, default = -1)\n" 58 " -f, --finish <script> Command you wish to run on completion\n" 59 " -n --nat-traversal Attempt NAT traversal using NAT-PMP or UPnP IGD\n" 60 " -p, --port <int> Port we should listen on (default = %d)\n" 61 " -u, --upload <int> Maximum upload rate (-1 = no limit, default = 20)\n" 62 " -v, --verbose <int> Verbose level (0 to 2, default = 0)\n" 63 " -y, --recheck Force a recheck of the torrent data\n"; 63 64 64 65 static int showHelp = 0; … … 80 81 static char * finishCall = NULL; 81 82 static char * announce = NULL; 83 static char * configdir = NULL; 82 84 static char * sourceFile = NULL; 83 85 static char * comment = NULL; … … 145 147 bindPort = -1; 146 148 149 if( configdir == NULL ) 150 configdir = strdup( tr_getDefaultConfigDir( ) ); 151 147 152 /* Initialize libtransmission */ 148 h = tr_initFull( TR_DEFAULT_CONFIG_DIR,153 h = tr_initFull( configdir, 149 154 "cli", /* tag */ 150 155 1, /* pex enabled */ … … 378 383 for( ;; ) 379 384 { 380 static struct option long_options[] = 381 { { "help", no_argument, NULL, 'h' }, 382 { "info", no_argument, NULL, 'i' }, 383 { "scrape", no_argument, NULL, 's' }, 384 { "private", no_argument, NULL, 'r' }, 385 { "version", no_argument, NULL, 'V' }, 386 { "verbose", required_argument, NULL, 'v' }, 387 { "port", required_argument, NULL, 'p' }, 388 { "upload", required_argument, NULL, 'u' }, 389 { "download", required_argument, NULL, 'd' }, 390 { "finish", required_argument, NULL, 'f' }, 391 { "create-from", required_argument, NULL, 'c' }, 392 { "comment", required_argument, NULL, 'm' }, 393 { "announce", required_argument, NULL, 'a' }, 394 { "nat-traversal", no_argument, NULL, 'n' }, 395 { "recheck", no_argument, NULL, 'y' }, 396 { "output-dir", required_argument, NULL, 'o' }, 385 static const struct option long_options[] = { 386 { "announce", required_argument, NULL, 'a' }, 387 { "create-from", required_argument, NULL, 'c' }, 388 { "download", required_argument, NULL, 'd' }, 389 { "finish", required_argument, NULL, 'f' }, 390 { "config-dir", required_argument, NULL, 'g' }, 391 { "help", no_argument, NULL, 'h' }, 392 { "info", no_argument, NULL, 'i' }, 393 { "comment", required_argument, NULL, 'm' }, 394 { "nat-traversal", no_argument, NULL, 'n' }, 395 { "output-dir", required_argument, NULL, 'o' }, 396 { "port", required_argument, NULL, 'p' }, 397 { "private", no_argument, NULL, 'r' }, 398 { "scrape", no_argument, NULL, 's' }, 399 { "upload", required_argument, NULL, 'u' }, 400 { "verbose", required_argument, NULL, 'v' }, 401 { "version", no_argument, NULL, 'V' }, 402 { "recheck", no_argument, NULL, 'y' }, 397 403 { 0, 0, 0, 0} }; 398 399 int c , optind = 0;400 c = getopt_long( argc, argv, "hisrVv:p:u:d:f:c:m:a:no:y",401 long_options, &optind );404 int optind = 0; 405 int c = getopt_long( argc, argv, 406 "a:c:d:f:g:him:no:p:rsu:v:Vy", 407 long_options, &optind ); 402 408 if( c < 0 ) 403 409 { … … 406 412 switch( c ) 407 413 { 408 case 'h': 409 showHelp = 1; 410 break; 411 case 'i': 412 showInfo = 1; 413 break; 414 case 's': 415 showScrape = 1; 416 break; 417 case 'r': 418 isPrivate = 1; 419 break; 420 case 'v': 421 verboseLevel = atoi( optarg ); 422 break; 423 case 'V': 424 showVersion = 1; 425 break; 426 case 'p': 427 bindPort = atoi( optarg ); 428 break; 429 case 'u': 430 uploadLimit = atoi( optarg ); 431 break; 432 case 'd': 433 downloadLimit = atoi( optarg ); 434 break; 435 case 'f': 436 finishCall = optarg; 437 break; 438 case 'c': 439 sourceFile = optarg; 440 break; 441 case 'm': 442 comment = optarg; 443 break; 444 case 'a': 445 announce = optarg; 446 break; 447 case 'n': 448 natTraversal = 1; 449 break; 450 case 'y': 451 recheckData = 1; 452 break; 453 case 'o': 454 savePath = optarg; 455 default: 456 return 1; 414 case 'a': announce = optarg; break; 415 case 'c': sourceFile = optarg; break; 416 case 'd': downloadLimit = atoi( optarg ); break; 417 case 'f': finishCall = optarg; break; 418 case 'g': configdir = strdup( optarg ); break; 419 case 'h': showHelp = 1; break; 420 case 'i': showInfo = 1; break; 421 case 'm': comment = optarg; break; 422 case 'n': natTraversal = 1; break; 423 case 'o': savePath = optarg; 424 case 'p': bindPort = atoi( optarg ); break; 425 case 'r': isPrivate = 1; break; 426 case 's': showScrape = 1; break; 427 case 'u': uploadLimit = atoi( optarg ); break; 428 case 'v': verboseLevel = atoi( optarg ); break; 429 case 'V': showVersion = 1; break; 430 case 'y': recheckData = 1; break; 431 default: return 1; 457 432 } 458 433 } -
trunk/daemon/client.c
r5511 r5646 137 137 struct con * con; 138 138 139 assert( NULL != gl_base ); 139 assert( gl_base ); 140 assert( path ); 140 141 assert( 0 > gl_proxy ); 141 assert( NULL != path );142 142 143 143 gl_proxy = 0; -
trunk/daemon/daemon.c
r5167 r5646 51 51 52 52 static void usage ( const char *, ... ); 53 static void readargs ( int, char **, int *, int *, char **, char ** );54 static int trylocksock ( const char * );53 static void readargs ( int, char **, int *, int *, char **, char **, char ** ); 54 static int trylocksock ( const char * configdir, const char * sockpath ); 55 55 static int getsock ( const char * ); 56 56 static void exitcleanup ( void ); … … 69 69 struct event_base * evbase; 70 70 int nofork, debug, sockfd; 71 char * sockpath, * pidfile;71 char * configdir, * sockpath, * pidfile; 72 72 73 73 setmyname( argv[0] ); 74 readargs( argc, argv, &nofork, &debug, &sockpath, &pidfile ); 75 76 if( !nofork ) 77 { 78 if( 0 > daemon( 1, 0 ) ) 79 { 74 readargs( argc, argv, &nofork, &debug, &configdir, &sockpath, &pidfile ); 75 76 if( !nofork ) { 77 if( 0 > daemon( 1, 0 ) ) { 80 78 errnomsg( "failed to daemonize" ); 81 79 exit( 1 ); … … 84 82 } 85 83 84 if( configdir == NULL ) 85 configdir = (char*) tr_getDefaultConfigDir( ); 86 86 87 atexit( exitcleanup ); 87 sockfd = trylocksock( sockpath );88 sockfd = trylocksock( configdir, sockpath ); 88 89 if( 0 > sockfd ) 89 90 { … … 97 98 evbase = event_init(); 98 99 setupsigs( evbase ); 99 torrent_init( evbase );100 torrent_init( configdir, evbase ); 100 101 server_init( evbase ); 101 102 server_debug( debug ); … … 129 130 " -d --debug Print data send and received, implies -f\n" 130 131 " -f --foreground Run in the foreground and log to stderr\n" 132 " -g --config-dir <path> Where to look for configuration files\n" 131 133 " -h --help Display this message and exit\n" 132 134 " -p --pidfile <path> Save the process id in a file at <path>\n" … … 139 141 140 142 void 141 readargs( int argc, char ** argv, int * nofork, int * debug, char ** sock,142 char ** pidfile )143 { 144 char optstr[] = "df hp:s:";143 readargs( int argc, char ** argv, int * nofork, int * debug, 144 char ** configdir, char ** sock, char ** pidfile ) 145 { 146 char optstr[] = "dfg:hp:s:"; 145 147 struct option longopts[] = 146 148 { 147 149 { "debug", no_argument, NULL, 'd' }, 148 150 { "foreground", no_argument, NULL, 'f' }, 151 { "config-dir", required_argument, NULL, 'g' }, 149 152 { "help", no_argument, NULL, 'h' }, 150 153 { "pidfile", required_argument, NULL, 'p' }, … … 158 161 *sock = NULL; 159 162 *pidfile = NULL; 160 161 while( 0 <= ( opt = getopt_long( argc, argv, optstr, longopts, NULL ) ) ) 162 { 163 switch( opt ) 164 { 165 case 'd': 166 *debug = 1; 167 /* FALLTHROUGH */ 168 case 'f': 169 *nofork = 1; 170 break; 171 case 'p': 172 *pidfile = optarg; 173 break; 174 case 's': 175 *sock = optarg; 176 break; 177 default: 178 usage( NULL ); 179 break; 163 *configdir = NULL; 164 165 while( 0 <= ( opt = getopt_long( argc, argv, optstr, longopts, NULL ) ) ) { 166 switch( opt ) { 167 case 'd': *debug = 1; /* FALLTHROUGH */ 168 case 'f': *nofork = 1; break; 169 case 'g': *configdir = strdup( optarg ); break; 170 case 'p': *pidfile = optarg; break; 171 case 's': *sock = optarg; break; 172 default: usage( NULL ); break; 180 173 } 181 174 } … … 205 198 206 199 int 207 trylocksock( const char * sockpath ) 208 { 200 trylocksock( const char * configdir, const char * sockpath ) 201 { 202 int fd; 209 203 char path[MAXPATHLEN]; 210 int fd; 211 212 confpath( path, sizeof path, NULL, CONF_PATH_TYPE_DAEMON ); 204 205 confpath( path, sizeof path, configdir, NULL, CONF_PATH_TYPE_DAEMON ); 213 206 if( 0 > mkdir( path, 0777 ) && EEXIST != errno ) 214 207 { … … 217 210 } 218 211 219 confpath( path, sizeof path, CONF_FILE_LOCK, 0 );212 confpath( path, sizeof path, configdir, CONF_FILE_LOCK, 0 ); 220 213 if( !getlock( path ) ) 221 214 return -1; 222 215 strlcpy( gl_lockpath, path, sizeof gl_lockpath ); 223 216 224 if( NULL ==sockpath )225 { 226 confpath( path, sizeof path, CONF_FILE_SOCKET, 0 );217 if( !sockpath ) 218 { 219 confpath( path, sizeof path, configdir, CONF_FILE_SOCKET, 0 ); 227 220 sockpath = path; 228 221 } -
trunk/daemon/misc.c
r5517 r5646 78 78 79 79 void 80 confpath( char * buf, size_t len, const char * file, enum confpathtype type ) 81 { 82 strlcpy( buf, tr_getDefaultConfigDir(), len ); 80 confpath( char * buf, 81 size_t len, 82 const char * configDir, 83 const char * file, 84 enum confpathtype type ) 85 { 86 strlcpy( buf, configDir, len ); 83 87 84 88 switch( type ) -
trunk/daemon/misc.h
r5151 r5646 137 137 void setmyname ( const char * ); 138 138 const char * getmyname ( void ); 139 void confpath ( char *, size_t, const char *, enum confpathtype );139 void confpath ( char *, size_t, const char *, const char *, enum confpathtype ); 140 140 void absolutify( char *, size_t, const char * ); 141 141 int writefile ( const char *, uint8_t *, ssize_t ); -
trunk/daemon/proxy.c
r4390 r5646 43 43 44 44 static void usage ( const char *, ... ); 45 static enum confpathtype readargs ( int, char **, char ** );46 static int makesock ( enum confpathtype, const char * );45 static enum confpathtype readargs ( int, char **, char **, char ** ); 46 static int makesock ( enum confpathtype, const char *, const char * ); 47 47 static void inread ( struct bufferevent *, void * ); 48 48 static void noop ( struct bufferevent *, void * ); … … 63 63 struct event_base * base; 64 64 enum confpathtype type; 65 char * configdir; 65 66 char * sockpath; 66 67 int sockfd; 67 68 68 69 setmyname( argv[0] ); 69 type = readargs( argc, argv, &sockpath ); 70 type = readargs( argc, argv, &configdir, &sockpath ); 71 if( configdir == NULL ) 72 configdir = strdup( tr_getDefaultConfigDir( ) ); 73 70 74 base = event_init(); 71 75 72 sockfd = makesock( type, sockpath );76 sockfd = makesock( type, configdir, sockpath ); 73 77 if( 0 > sockfd ) 74 78 { … … 133 137 "\n" 134 138 " -h --help Display this message and exit\n" 139 " -g --config-dir <path> Where to look for configuration files\n" 135 140 " -t --type daemon Use the daemon frontend, transmission-daemon\n" 136 141 " -t --type gtk Use the GTK+ frontend, transmission\n" … … 141 146 142 147 enum confpathtype 143 readargs( int argc, char ** argv, char ** sockpath )144 { 145 char optstr[] = " ht:";148 readargs( int argc, char ** argv, char ** configdir, char ** sockpath ) 149 { 150 char optstr[] = "g:ht:"; 146 151 struct option longopts[] = 147 152 { 153 { "config-dir", required_argument, NULL, 'g' }, 148 154 { "help", no_argument, NULL, 'h' }, 149 155 { "type", required_argument, NULL, 't' }, … … 153 159 int opt; 154 160 155 type = CONF_PATH_TYPE_DAEMON; 156 *sockpath = NULL; 161 type = CONF_PATH_TYPE_DAEMON; 162 *configdir = NULL; 163 *sockpath = NULL; 157 164 158 165 while( 0 <= ( opt = getopt_long( argc, argv, optstr, longopts, NULL ) ) ) … … 160 167 switch( opt ) 161 168 { 169 case 'g': 170 *configdir = strdup( optarg ); 171 break; 172 162 173 case 't': 163 174 if( 0 == strcasecmp( "daemon", optarg ) ) … … 194 205 195 206 int 196 makesock( enum confpathtype type, const char * path ) 207 makesock( enum confpathtype type, 208 const char * configdir, 209 const char * sockpath ) 197 210 { 198 211 struct sockaddr_un sa; … … 201 214 memset( &sa, 0, sizeof sa ); 202 215 sa.sun_family = AF_LOCAL; 203 if( NULL ==path )204 { 205 confpath( sa.sun_path, sizeof sa.sun_path, CONF_FILE_SOCKET, type );216 if( !sockpath ) 217 { 218 confpath( sa.sun_path, sizeof sa.sun_path, configdir, CONF_FILE_SOCKET, type ); 206 219 } 207 220 else 208 221 { 209 strlcpy( sa.sun_path, path, sizeof sa.sun_path );222 strlcpy( sa.sun_path, sockpath, sizeof sa.sun_path ); 210 223 } 211 224 -
trunk/daemon/remote.c
r5514 r5646 75 75 int pex; 76 76 const char * crypto; 77 const char * configdir; 77 78 }; 78 79 … … 145 146 struct event_base * evbase; 146 147 struct opts o; 147 char sockpath[MAXPATHLEN];148 148 149 149 setmyname( argv[0] ); 150 150 151 if( 0 > readargs( argc, argv, &o ) ) 151 {152 152 exit( 1 ); 153 } 153 154 if( o.configdir == NULL ) 155 o.configdir = strdup( tr_getDefaultConfigDir( ) ); 154 156 155 157 signal( SIGPIPE, SIG_IGN ); … … 164 166 else 165 167 { 166 if( NULL == o.sock ) 167 { 168 confpath( sockpath, sizeof sockpath, CONF_FILE_SOCKET, o.type ); 168 if( o.sock ) 169 client_new_sock( o.sock ); 170 else { 171 char sockpath[MAXPATHLEN]; 172 confpath( sockpath, sizeof sockpath, o.configdir, CONF_FILE_SOCKET, o.type ); 169 173 client_new_sock( sockpath ); 170 }171 else172 {173 client_new_sock( o.sock );174 174 } 175 175 } … … 245 245 " -E --disable-pex Disable peer exchange\n" 246 246 " -f --folder <path> Folder to set for new torrents\n" 247 " -g --config-dir <path> Where to look for configuration files\n" 247 248 " -h --help Display this message and exit\n" 248 249 " -i --info List all torrents with info hashes\n" … … 272 273 readargs( int argc, char ** argv, struct opts * opts ) 273 274 { 274 char optstr[] = "a:c:d:DeEf: hilmMp:qr:s:S:t:u:Uxv:";275 char optstr[] = "a:c:d:DeEf:g:hilmMp:qr:s:S:t:u:Uxv:"; 275 276 struct option longopts[] = 276 277 { … … 282 283 { "disable-pex", no_argument, NULL, 'E' }, 283 284 { "folder", required_argument, NULL, 'f' }, 285 { "config-dir", required_argument, NULL, 'g' }, 284 286 { "help", no_argument, NULL, 'h' }, 285 287 { "info", no_argument, NULL, 'i' }, … … 307 309 opts->map = -1; 308 310 opts->pex = -1; 311 opts->configdir = NULL; 309 312 SLIST_INIT( &opts->start ); 310 313 SLIST_INIT( &opts->stop ); … … 347 350 case 'f': 348 351 absolutify( opts->dir, sizeof opts->dir, optarg ); 352 break; 353 case 'g': 354 opts->configdir = strdup( optarg ); 349 355 break; 350 356 case 'i': -
trunk/daemon/torrents.c
r5643 r5646 105 105 106 106 void 107 torrent_init( struct event_base * base )107 torrent_init( const char * configdir, struct event_base * base ) 108 108 { 109 109 assert( NULL == gl_handle && NULL == gl_base ); 110 110 111 111 gl_base = base; 112 gl_handle = tr_init( tr_getDefaultConfigDir(), "daemon" );113 114 confpath( gl_state, sizeof gl_state, CONF_FILE_STATE, 0 );112 gl_handle = tr_init( configdir, "daemon" ); 113 114 confpath( gl_state, sizeof gl_state, configdir, CONF_FILE_STATE, 0 ); 115 115 strlcpy( gl_newstate, gl_state, sizeof gl_state ); 116 116 strlcat( gl_newstate, ".new", sizeof gl_state ); -
trunk/daemon/torrents.h
r5579 r5646 32 32 struct event_base; 33 33 34 void torrent_init ( struct event_base * );34 void torrent_init ( const char * configDir, struct event_base * ); 35 35 int torrent_add_file ( const char *, const char *, int ); 36 36 int torrent_add_data ( uint8_t *, size_t, const char *, int ); -
trunk/daemon/transmission-daemon.1
r4758 r5646 56 56 Save the daemon's process ID in 57 57 .Ar pid-file . 58 .It Fl g, Fl -config-dir Ar directory 59 Where to look for configuration files. 58 60 .It Fl s Fl -socket Ar socket-file 59 61 Create the unix-domain socket file at -
trunk/daemon/transmission-proxy.1
r4758 r5646 42 42 or 43 43 .Xr transmission 1 . 44 .It Fl g, Fl -config-dir Ar directory 45 Where to look for configuration files. 44 46 .It Fl h Fl -help 45 47 Print command-line option descriptions. -
trunk/daemon/transmission-remote.1
r5141 r5646 117 117 .Ar directory 118 118 as the default location for newly added torrents to download files to. 119 .It Fl g, Fl -config-dir Ar directory 120 Where to look for configuration files. 119 121 .It Fl h Fl -help 120 122 Print command-line option descriptions. -
trunk/gtk/main.c
r5637 r5646 276 276 gboolean startminimized = FALSE; 277 277 char * domain = "transmission"; 278 c onst char * configDir = tr_getDefaultConfigDir( );278 char * configDir = NULL; 279 279 280 280 GOptionEntry entries[] = { … … 287 287 _( "Start minimized in system tray"), NULL }, 288 288 #endif 289 { "config-dir", 'g', 0, G_OPTION_ARG_FILENAME, &configDir, 290 _( "Where to look for configuration files" ), NULL }, 289 291 { NULL, 0, 0, 0, NULL, NULL, NULL } 290 292 }; … … 308 310 return 0; 309 311 } 312 if( !configDir ) 313 configDir = (char*) tr_getDefaultConfigDir( ); 310 314 311 315 tr_notify_init( ); … … 326 330 ( didlock || cf_lock( &err ) ) ) 327 331 { 328 cbdata->core = tr_core_new( ); 332 tr_handle * h = tr_initFull( configDir, 333 "gtk", 334 pref_flag_get( PREF_KEY_PEX ), 335 pref_flag_get( PREF_KEY_NAT ), 336 pref_int_get( PREF_KEY_PORT ), 337 pref_flag_get( PREF_KEY_ENCRYPTED_ONLY ) 338 ? TR_ENCRYPTION_REQUIRED 339 : TR_ENCRYPTION_PREFERRED, 340 pref_flag_get( PREF_KEY_UL_LIMIT_ENABLED ), 341 pref_int_get( PREF_KEY_UL_LIMIT ), 342 pref_flag_get( PREF_KEY_DL_LIMIT_ENABLED ), 343 pref_int_get( PREF_KEY_DL_LIMIT ), 344 pref_int_get( PREF_KEY_MAX_PEERS_GLOBAL ), 345 pref_int_get( PREF_KEY_MSGLEVEL ), 346 TRUE, /* message queueing */ 347 pref_flag_get( PREF_KEY_BLOCKLIST_ENABLED ), 348 pref_int_get( PREF_KEY_PEER_SOCKET_TOS ) ); 349 cbdata->core = tr_core_new( h ); 329 350 330 351 /* create main window now to be a parent to any error dialogs */ -
trunk/gtk/tr-core.c
r5637 r5646 458 458 tr_core_init( GTypeInstance * instance, gpointer g_class UNUSED ) 459 459 { 460 tr_handle * h;461 460 TrCore * self = (TrCore *) instance; 462 461 GtkListStore * store; … … 479 478 struct TrCorePrivate ); 480 479 481 482 h = tr_initFull( tr_getDefaultConfigDir( ),483 "gtk",484 pref_flag_get( PREF_KEY_PEX ),485 pref_flag_get( PREF_KEY_NAT ),486 pref_int_get( PREF_KEY_PORT ),487 pref_flag_get( PREF_KEY_ENCRYPTED_ONLY )488 ? TR_ENCRYPTION_REQUIRED489 : TR_ENCRYPTION_PREFERRED,490 pref_flag_get( PREF_KEY_UL_LIMIT_ENABLED ),491 pref_int_get( PREF_KEY_UL_LIMIT ),492 pref_flag_get( PREF_KEY_DL_LIMIT_ENABLED ),493 pref_int_get( PREF_KEY_DL_LIMIT ),494 pref_int_get( PREF_KEY_MAX_PEERS_GLOBAL ),495 pref_int_get( PREF_KEY_MSGLEVEL ),496 TRUE, /* message queueing */497 pref_flag_get( PREF_KEY_BLOCKLIST_ENABLED ),498 pref_int_get( PREF_KEY_PEER_SOCKET_TOS ) );499 500 480 /* create the model used to store torrent data */ 501 481 g_assert( ALEN( types ) == MC_ROW_COUNT ); … … 503 483 504 484 p->model = GTK_TREE_MODEL( store ); 505 p->handle = h;506 485 p->nextid = 1; 507 486 } … … 538 517 539 518 TrCore * 540 tr_core_new( void)519 tr_core_new( tr_handle * h ) 541 520 { 542 521 TrCore * core = TR_CORE( g_object_new( TR_CORE_TYPE, NULL ) ); 522 core->priv->handle = h; 543 523 544 524 /* init from prefs & listen to pref changes */ -
trunk/gtk/tr-core.h
r5637 r5646 90 90 GType tr_core_get_type( void ); 91 91 92 TrCore * tr_core_new( void);92 TrCore * tr_core_new( tr_handle * ); 93 93 94 94 void tr_core_close( TrCore* ); -
trunk/gtk/transmission.1
r5311 r5646 54 54 .It Fl m Fl -minimized 55 55 Start minimized in system tray 56 .It Fl g, Fl -config-dir Ar directory 57 Where to look for configuration files 56 58 .El 57 59 .Pp
Note: See TracChangeset
for help on using the changeset viewer.