~ubuntu-branches/ubuntu/quantal/terminal.app/quantal

« back to all changes in this revision

Viewing changes to main.m

  • Committer: Package Import Robot
  • Author(s): Yavor Doganov
  • Date: 2012-06-14 13:55:31 UTC
  • mfrom: (4.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120614135531-xbagikvsm7nmcq25
Tags: 0.9.8-1
* New upstream release:
  + Fixes FTBFS with ld that defaults to --as-needed (Closes: #639040).
* TerminalParser_LinuxPrefs.m:
* TerminalView.m (-initWithFrame:):
* TerminalViewPrefs.m:
* ServicesPrefs.m: Revert all direct modifications.
* debian/control (Maintainer, Uploaders): Make the team maintainer, add
  myself.
  (Section): Change to `gnustep'.
  (Build-Depends): Require debhelper >= 8.  Remove version requirement
  for libgnustep-gui-dev.  Add dpkg-dev (>= 1.16.1~) and imagemagick.
  Drop gnustep-make.
  (Homepage): Point to the new location.
  (Vcs-Git, Vcs-Browser): New fields.
  (Conflicts, Replaces): Remove, no longer needed.
  (Depends): Add ${misc:Depends}.
  (Standards-Version): Claim compliance with 3.9.3 as of this release.
* debian/compat: Bump to 8.
* debian/rules: Get rid of gs_make.  Enable hardening, verbose builds,
  support for `noopt'.
  (d_app): New convenience variable.
  (build-stamp): Convert the app icon in XPM format.
  (clean): Delete the generated icon.
  (install): Replace the deprecated `dh_clean -k' with dh_prep.  Don't
  install lintian overrides.  Install the XPM icon.
  (binary-arch): Remove unnecessary arguments to dh_installman and
  dh_shlibdeps.  Move arch-independent Resources to /usr/share.
* debian/source/format: New file; set format to 3.0 (quilt).
* debian/overrides: Delete.
* debian/prerm: Don't ignore errors.
* debian/preinst:
* debian/watch: New file.
* debian/menu: Add icon.
* debian/Terminal.desktop: Make it valid.  Add Bulgarian translation.
* debian/Terminal.1: Fix errors from man.  Update homepage.
* debian/docs: Delete; duplicated by the manpage.
* debian/copyright: Switch to format 1.0, update copyright years, add
  many copyright holders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
copyright 2002, 2003 Alexander Malmberg <alexander@malmberg.org>
3
3
 
 
4
2009-2010 GAP Project
 
5
 
4
6
  This program is free software; you can redistribute it and/or modify
5
7
  it under the terms of the GNU General Public License as published by
6
8
  the Free Software Foundation; version 2 of the License.
15
17
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
18
*/
17
19
 
18
 
#include <Foundation/NSAutoreleasePool.h>
19
 
#include <Foundation/NSBundle.h>
20
 
#include <Foundation/NSDebug.h>
21
 
#include <Foundation/NSNotification.h>
22
 
#include <Foundation/NSProcessInfo.h>
23
 
#include <Foundation/NSRunLoop.h>
24
 
#include <Foundation/NSUserDefaults.h>
25
 
#include <AppKit/NSApplication.h>
26
 
#include <AppKit/NSMenu.h>
27
 
#include <AppKit/NSPanel.h>
28
 
#include <AppKit/NSView.h>
 
20
#import <Foundation/NSAutoreleasePool.h>
 
21
#import <Foundation/NSString.h>
 
22
#import <Foundation/NSBundle.h>
 
23
#import <Foundation/NSDebug.h>
 
24
#import <Foundation/NSNotification.h>
 
25
#import <Foundation/NSProcessInfo.h>
 
26
#import <Foundation/NSRunLoop.h>
 
27
#import <Foundation/NSUserDefaults.h>
 
28
#import <AppKit/NSApplication.h>
 
29
#import <AppKit/NSControl.h>
 
30
#import <AppKit/NSMenu.h>
 
31
#import <AppKit/NSMenuItem.h>
 
32
#import <AppKit/NSPanel.h>
 
33
#import <AppKit/NSView.h>
29
34
 
30
35
/* For the quit panel: */
31
 
#include <AppKit/NSButton.h>
32
 
#include <AppKit/NSImage.h>
33
 
#include <AppKit/NSImageView.h>
34
 
#include <AppKit/NSScreen.h>
35
 
#include <GNUstepGUI/GSVbox.h>
36
 
#include <GNUstepGUI/GSHbox.h>
37
 
#include "Label.h"
38
 
 
39
 
 
40
 
#include "PreferencesWindowController.h"
41
 
#include "Services.h"
42
 
#include "TerminalView.h"
43
 
#include "TerminalWindow.h"
44
 
 
 
36
#import <AppKit/NSTextField.h>
 
37
#import <AppKit/NSButton.h>
 
38
#import <AppKit/NSImage.h>
 
39
#import <AppKit/NSImageView.h>
 
40
#import <AppKit/NSScreen.h>
 
41
#import <AppKit/NSBox.h>
 
42
#import <GNUstepGUI/GSVbox.h>
 
43
#import <GNUstepGUI/GSHbox.h>
 
44
#import "Label.h"
 
45
 
 
46
 
 
47
#import "PreferencesWindowController.h"
 
48
#import "Services.h"
 
49
#import "ServicesPrefs.h"
 
50
#import "TerminalView.h"
 
51
#import "TerminalViewPrefs.h"
 
52
#import "TerminalWindow.h"
 
53
#import "TerminalWindowPrefs.h"
 
54
#import "TerminalParser_LinuxPrefs.h"
45
55
 
46
56
@interface NSMenu (helpers)
47
57
-(id <NSMenuItem>) addItemWithTitle: (NSString *)s;
88
98
}
89
99
 
90
100
 
91
 
@class TerminalViewDisplayPrefs;
92
 
@class TerminalViewShellPrefs;
93
 
@class TerminalViewKeyboardPrefs;
94
 
@class TerminalServicesPrefs;
95
 
@class TerminalWindowPrefs;
96
 
@class TerminalParser_LinuxPrefs;
97
 
 
98
101
-(void) openPreferences: (id)sender
99
102
{
100
103
        if (!pwc)
228
231
{
229
232
        NSArray *args=[[NSProcessInfo processInfo] arguments];
230
233
 
 
234
        [TerminalServices updateServicesPlist];
 
235
 
231
236
        [NSApp setServicesProvider: [[TerminalServices alloc] init]];
232
237
 
233
238
        if ([args count]>1)
263
268
                        [vb setBorder: 10.0];
264
269
 
265
270
                        {
266
 
                                NSButton *b;
 
271
                                NSButton *butt;
267
272
                                GSHbox *hb;
268
273
 
269
274
                                hb=[[GSHbox alloc] init];
270
275
                                [hb setAutoresizingMask: NSViewMinXMargin];
271
276
 
272
 
                                b=b_quit=[[NSButton alloc] init];
273
 
                                [b setTitle: _(@"Quit anyway")];
274
 
                                [b setTarget: self];
275
 
                                [b setAction: @selector(quitAnyway:)];
276
 
                                [b sizeToFit];
277
 
                                [hb addView: b  enablingXResizing: NO];
278
 
                                DESTROY(b);
 
277
                                butt=b_quit=[[NSButton alloc] init];
 
278
                                [butt setTitle: _(@"Quit anyway")];
 
279
                                [butt setTarget: self];
 
280
                                [butt setAction: @selector(quitAnyway:)];
 
281
                                [butt sizeToFit];
 
282
                                [hb addView: butt  enablingXResizing: NO];
 
283
                                DESTROY(butt);
279
284
 
280
 
                                b=b_dont=[[NSButton alloc] init];
281
 
                                [b setTitle: _(@"Don't quit")];
282
 
                                [b setImagePosition: NSImageRight];
283
 
                                [b setImage: [NSImage imageNamed: @"common_ret"]];
284
 
                                [b setTarget: self];
285
 
                                [b setAction: @selector(dontQuit:)];
286
 
                                [b sizeToFit];
287
 
                                [hb addView: b  enablingXResizing: NO withMinXMargin: 8.0];
288
 
                                DESTROY(b);
 
285
                                butt=b_dont=[[NSButton alloc] init];
 
286
                                [butt setTitle: _(@"Don't quit")];
 
287
                                [butt setImagePosition: NSImageRight];
 
288
                                [butt setImage: [NSImage imageNamed: @"common_ret"]];
 
289
                                [butt setTarget: self];
 
290
                                [butt setAction: @selector(dontQuit:)];
 
291
                                [butt sizeToFit];
 
292
                                [hb addView: butt  enablingXResizing: NO withMinXMargin: 8.0];
 
293
                                DESTROY(butt);
289
294
 
290
295
                                [vb addView: hb enablingYResizing: NO];
291
296
                                DESTROY(hb);
360
365
                [quitPanel setFrameOrigin: o];
361
366
        }
362
367
 
 
368
        [quitPanel setExcludedFromWindowsMenu: NO];
363
369
        [quitPanel makeKeyAndOrderFront: self];
364
370
        quitPanelOpen=YES;
365
371
 
376
382
        [NSApp replyToApplicationShouldTerminate: NO];
377
383
        quitPanelOpen=NO;
378
384
        [quitPanel orderOut: self];
 
385
        [quitPanel setExcludedFromWindowsMenu: YES];
379
386
}
380
387
 
381
388
-(void) noMoreActiveWindows: (NSNotification *)n
461
468
 
462
469
 
463
470
/* TODO */
464
 
@interface TerminalViewKeyboardPrefs
465
 
-(BOOL) commandAsMeta;
466
 
@end
467
471
 
468
472
#include <AppKit/NSWindow.h>
469
473
#include <AppKit/NSEvent.h>
493
497
 
494
498
int main(int argc, char **argv)
495
499
{
 
500
        Terminal *term;
 
501
 
496
502
        CREATE_AUTORELEASE_POOL(arp);
497
503
 
498
504
/*      [NSObject enableDoubleReleaseCheck: YES];*/
499
505
 
500
506
        [TerminalApplication sharedApplication];
501
507
 
502
 
        [NSApp setDelegate: [[Terminal alloc] init]];
 
508
        term = [[Terminal alloc] init];
 
509
        [NSApp setDelegate: term];
503
510
        [NSApp run];
504
511
 
 
512
        [term release];
 
513
 
505
514
        DESTROY(arp);
506
515
        return 0;
507
516
}