~ubuntu-branches/ubuntu/jaunty/transmission/jaunty-security

« back to all changes in this revision

Viewing changes to macosx/CreatorWindowController.m

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Starr-Bochicchio, Andrew Starr-Bochicchio, Martin Pitt
  • Date: 2009-02-26 11:55:50 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20090226115550-3rnhgt9qhe3y6g74
Tags: 1.50-1ubuntu1
[ Andrew Starr-Bochicchio ]
* Merge from debian unstable (LP: #329161), remaining changes:
 - debian/control: 
  + Added replaces & provides clutch (now included as part of transmission).
  + Build-depends on quilt.
 - debian/rules: 
  + Uncommented "include /usr/share/quilt/quilt.make".
  + Added patch/unpatch targets for Quilt.
  + Create a PO template during package build.
 - 20_add_X-Ubuntu-Gettext-Domain.diff: Add X-Ubuntu-Gettext-Domain 
   to .desktop file.

[ Martin Pitt ]
* Add 01_check_notification_actions.diff: Check if notification
  agent supports actions, and do not use actions if not. (LP: #334252)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: CreatorWindowController.m 7032 2008-11-04 01:31:24Z livings124 $
 
2
 * $Id: CreatorWindowController.m 7780 2009-01-23 02:39:42Z livings124 $
3
3
 *
4
4
 * Copyright (c) 2007-2008 Transmission authors and contributors
5
5
 *
45
45
 
46
46
@implementation CreatorWindowController
47
47
 
48
 
+ (void) createTorrentFile: (tr_handle *) handle
 
48
+ (void) createTorrentFile: (tr_session *) handle
49
49
{
50
50
    //get file/folder for torrent
51
51
    NSString * path;
56
56
    [creator showWindow: nil];
57
57
}
58
58
 
59
 
+ (void) createTorrentFile: (tr_handle *) handle forFile: (NSString *) file
 
59
+ (void) createTorrentFile: (tr_session *) handle forFile: (NSString *) file
60
60
{
61
61
    CreatorWindowController * creator = [[self alloc] initWithHandle: handle path: file];
62
62
    [creator showWindow: nil];
63
63
}
64
64
 
65
 
- (id) initWithHandle: (tr_handle *) handle path: (NSString *) path
 
65
- (id) initWithHandle: (tr_session *) handle path: (NSString *) path
66
66
{
67
67
    if ((self = [super initWithWindowNibName: @"Creator"]))
68
68
    {
468
468
                else if (fInfo->result == TR_MAKEMETA_IO_WRITE)
469
469
                    [alert setInformativeText: [NSString stringWithFormat: NSLocalizedString(@"Could not write \"%s\": %s.",
470
470
                        "Create torrent -> failed -> warning"), fInfo->errfile, strerror(fInfo->my_errno)]];
471
 
                else; //invalid url should have been caught before creating
 
471
                else //invalid url should have been caught before creating
 
472
                    [alert setInformativeText: [NSString stringWithFormat: @"%@ (%d)",
 
473
                        NSLocalizedString(@"An unknown error has occurred.", "Create torrent -> failed -> warning"), fInfo->result]];
472
474
                
473
475
                [alert beginSheetModalForWindow: [self window] modalDelegate: self
474
476
                        didEndSelector: @selector(failureSheetClosed:returnCode:contextInfo:) contextInfo: nil];