Permalink
Browse files

Merge branch 'master' into macvim73

  • Loading branch information...
2 parents 5679cb5 + c1a59b5 commit 370077b53992aa98e705565e9e9ffa2176f69d8a @b4winckler b4winckler committed Jul 25, 2010
Showing with 606 additions and 8,189 deletions.
  1. BIN src/MacVim/Advanced.png
  2. +0 −43 src/MacVim/AuthorizedShellCommand.h
  3. +0 −155 src/MacVim/AuthorizedShellCommand.m
  4. +0 −73 src/MacVim/CTGradient.h
  5. +0 −1,271 src/MacVim/CTGradient.m
  6. +0 −4 src/MacVim/Credits.rtf
  7. +98 −569 src/MacVim/English.lproj/Preferences.nib/designable.nib
  8. BIN src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib
  9. BIN src/MacVim/Integration.png
  10. +0 −10 src/MacVim/MMAppController.h
  11. +0 −81 src/MacVim/MMAppController.m
  12. +1 −0 src/MacVim/MMAtsuiTextView.h
  13. +6 −26 src/MacVim/MMAtsuiTextView.m
  14. +12 −0 src/MacVim/MMBackend.h
  15. +65 −1 src/MacVim/MMBackend.m
  16. +230 −0 src/MacVim/MMCoreTextView+ToolTip.m
  17. +13 −0 src/MacVim/MMCoreTextView.h
  18. +0 −29 src/MacVim/MMCoreTextView.m
  19. +3 −0 src/MacVim/MMFullscreenWindow.m
  20. +0 −31 src/MacVim/MMPlugInManager.h
  21. +0 −151 src/MacVim/MMPlugInManager.m
  22. +0 −13 src/MacVim/MMPreferenceController.h
  23. +2 −322 src/MacVim/MMPreferenceController.m
  24. +2 −0 src/MacVim/MMTextView.h
  25. +6 −26 src/MacVim/MMTextView.m
  26. +0 −6 src/MacVim/MMTextViewHelper.h
  27. +4 −71 src/MacVim/MMTextViewHelper.m
  28. +0 −10 src/MacVim/MMVimController.h
  29. +43 −19 src/MacVim/MMVimController.m
  30. +26 −21 src/MacVim/MMVimView.m
  31. +3 −0 src/MacVim/MMWindow.m
  32. +2 −7 src/MacVim/MacVim.h
  33. +2 −0 src/MacVim/MacVim.m
  34. +4 −116 src/MacVim/MacVim.xcodeproj/project.pbxproj
  35. +0 −3 src/MacVim/Miscellaneous.h
  36. +0 −3 src/MacVim/Miscellaneous.m
  37. +0 −57 src/MacVim/PlugInGUI.h
  38. +0 −334 src/MacVim/PlugInGUI.m
  39. +0 −37 src/MacVim/PlugInImpl.h
  40. +0 −237 src/MacVim/PlugInImpl.m
  41. +0 −72 src/MacVim/PlugInInterface.h
  42. +0 −98 src/MacVim/PlugInView.nib/classes.nib
  43. +0 −20 src/MacVim/PlugInView.nib/info.nib
  44. BIN src/MacVim/PlugInView.nib/keyedobjects.nib
  45. +0 −146 src/MacVim/RBSplitSubview.h
  46. +0 −929 src/MacVim/RBSplitSubview.m
  47. +0 −225 src/MacVim/RBSplitView.h
  48. +0 −1,736 src/MacVim/RBSplitView.m
  49. +0 −98 src/MacVim/RBSplitViewPrivateDefines.h
  50. +0 −288 src/MacVim/edit-in-odb/Edit in ODBEditor.xcodeproj/project.pbxproj
  51. +0 −7 src/MacVim/edit-in-odb/Edit in ODBEditor_Prefix.pch
  52. BIN src/MacVim/edit-in-odb/English.lproj/InfoPlist.strings
  53. +0 −17 src/MacVim/edit-in-odb/Info
  54. +0 −26 src/MacVim/edit-in-odb/Info.plist
  55. +0 −2 src/MacVim/edit-in-odb/Makefile
  56. +0 −16 src/MacVim/edit-in-odb/src/Edit in ODBEditor.h
  57. +0 −291 src/MacVim/edit-in-odb/src/Edit in ODBEditor.mm
  58. +0 −60 src/MacVim/edit-in-odb/src/NSTextView: Edit in ODBEditor.mm
  59. +0 −414 src/MacVim/edit-in-odb/src/WebView: Edit in ODBEditor.mm
  60. +0 −5 src/MacVim/edit-in-odb/url map.plist
  61. +61 −0 src/MacVim/gui_macvim.m
  62. +3 −3 src/Makefile
  63. +3 −2 src/feature.h
  64. +3 −0 src/gui.c
  65. +7 −7 src/gui_beval.c
  66. +5 −1 src/gui_beval.h
  67. +2 −0 src/menu.c
View
0 src/MacVim/Advanced.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,43 +0,0 @@
-/* vi:set ts=8 sts=4 sw=4 ft=objc:
- *
- * VIM - Vi IMproved by Bram Moolenaar
- * MacVim GUI port by Bjorn Winckler
- *
- * Do ":help uganda" in Vim to read copying and usage conditions.
- * Do ":help credits" in Vim to see a list of people who contributed.
- * See README.txt for an overview of the Vim source code.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <Security/Authorization.h>
-
-
-@interface AuthorizedShellCommand : NSObject {
-
- NSArray *commands;
-
- AuthorizationRef authorizationRef;
-
-}
-
-// Pass an array of dictionaries. Each dictionary has to have the following
-// keys:
-//
-// * MMCommand: The command to execute, an NSString (e.g. @"/usr/bin/rm").
-// * MMArguments: An array of NSStrings, the arguments that are passed to
-// the command.
-//
-- (AuthorizedShellCommand *)initWithCommands:(NSArray *)theCommands;
-
-// Runs the command passed in the constructor.
-- (OSStatus)run;
-
-// This pops up the permission dialog. Called by run.
-- (OSStatus)askUserForPermission;
-
-@end
-
-
-extern NSString *MMCommand;
-extern NSString *MMArguments;
-
@@ -1,155 +0,0 @@
-/* vi:set ts=8 sts=4 sw=4 ft=objc:
- *
- * VIM - Vi IMproved by Bram Moolenaar
- * MacVim GUI port by Bjorn Winckler
- *
- * Do ":help uganda" in Vim to read copying and usage conditions.
- * Do ":help credits" in Vim to see a list of people who contributed.
- * See README.txt for an overview of the Vim source code.
- */
-/*
- * AuthorizedCommand
- *
- * Runs a set of shell commands which may require authorization. Displays a
- * gui dialog to ask the user for authorized access.
- */
-
-#import "AuthorizedShellCommand.h"
-#import <Security/AuthorizationTags.h>
-
-
-@implementation AuthorizedShellCommand
-
-- (AuthorizedShellCommand *)initWithCommands:(NSArray *)theCommands
-{
- if (![super init])
- return nil;
-
- commands = [theCommands retain];
- return self;
-}
-
-- (void)dealloc
-{
- [super dealloc];
- [commands release];
-}
-
-- (OSStatus)run
-{
- OSStatus err;
- int i;
- const char** arguments = NULL;
- AuthorizationFlags flags = kAuthorizationFlagDefaults;
-
- err = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment,
- flags, &authorizationRef);
- if (err != errAuthorizationSuccess)
- return err;
-
- if ((err = [self askUserForPermission]) != errAuthorizationSuccess) {
- goto cleanup;
- }
-
- NSEnumerator* myIterator = [commands objectEnumerator];
- NSDictionary* currCommand;
-
- while ((currCommand = [myIterator nextObject])) {
- /* do something useful with currCommand */
- FILE *ioPipe = NULL;
- char junk[256];
-
- const char* toolPath = [[currCommand objectForKey:MMCommand] UTF8String];
- NSArray* argumentStrings = [currCommand objectForKey:MMArguments];
- arguments = (const char**)malloc(
- ([argumentStrings count] + 1) * sizeof(char*));
-
- for (i = 0; i < [argumentStrings count]; ++i) {
- arguments[i] = [[argumentStrings objectAtIndex:i] UTF8String];
- }
- arguments[i] = NULL;
-
- err = AuthorizationExecuteWithPrivileges (authorizationRef, toolPath,
- kAuthorizationFlagDefaults, (char*const*)arguments, &ioPipe);
- if (err != errAuthorizationSuccess)
- goto cleanup;
-
-#if 0
- // We use the pipe to signal us when the command has completed
- char *p;
- do {
- p = fgets(junk, sizeof(junk), ioPipe);
- } while (p);
-#else
- for(;;)
- {
- int bytesRead = read (fileno (ioPipe),
- junk, sizeof (junk));
- if (bytesRead < 1) break;
- write (fileno (stdout), junk, bytesRead);
- }
-#endif
-
- if (arguments != NULL) {
- free(arguments);
- arguments = NULL;
- }
- fclose(ioPipe);
- }
-
-
-
-cleanup:
- AuthorizationFree(authorizationRef, kAuthorizationFlagDefaults);
- authorizationRef = 0;
-
- if (arguments != NULL)
- free(arguments);
-
- return err;
-}
-
-- (OSStatus)askUserForPermission
-{
- int i;
-
- assert(authorizationRef != 0);
-
- // The documentation for AuthorizationItem says that `value` should be
- // the path to the full posix path for kAuthorizationRightExecute. But
- // the installer sample "Calling a Privileged Installer" sets it to NULL.
- // Gotta love Apple's documentation.
- //
- // If you don't set `value` correctly, you'll get an
- // `errAuthorizationToolEnvironmentError` when you try to execute the
- // command.
- AuthorizationItem* authItems =
- malloc([commands count] * sizeof(AuthorizationItem));
- for (i = 0; i < [commands count]; ++i) {
- authItems[i].name = kAuthorizationRightExecute;
- authItems[i].value = (void*)
- [[[commands objectAtIndex:i] objectForKey:MMCommand] UTF8String];
- authItems[i].valueLength = strlen(authItems[i].value);
- authItems[i].flags = 0;
- }
-
- AuthorizationRights rights = {
- [commands count], authItems
- };
-
- OSStatus err = AuthorizationCopyRights(authorizationRef, &rights, NULL,
- kAuthorizationFlagInteractionAllowed |
- kAuthorizationFlagPreAuthorize |
- kAuthorizationFlagExtendRights
- , NULL);
-
- free(authItems);
-
- return err;
-}
-
-@end
-
-NSString *MMCommand = @"MMCommand";
-NSString *MMArguments = @"MMArguments";
-
@@ -1,73 +0,0 @@
-//
-// CTGradient.h
-//
-// Created by Chad Weider on 2/14/07.
-// Writtin by Chad Weider.
-//
-// Released into public domain on 4/10/08.
-//
-// Version: 1.8
-
-#import <Cocoa/Cocoa.h>
-
-typedef struct _CTGradientElement
- {
- float red, green, blue, alpha;
- float position;
-
- struct _CTGradientElement *nextElement;
- } CTGradientElement;
-
-typedef enum _CTBlendingMode
- {
- CTLinearBlendingMode,
- CTChromaticBlendingMode,
- CTInverseChromaticBlendingMode
- } CTGradientBlendingMode;
-
-
-@interface CTGradient : NSObject <NSCopying, NSCoding>
- {
- CTGradientElement* elementList;
- CTGradientBlendingMode blendingMode;
-
- CGFunctionRef gradientFunction;
- }
-
-+ (id)gradientWithBeginningColor:(NSColor *)begin endingColor:(NSColor *)end;
-
-+ (id)aquaSelectedGradient;
-+ (id)aquaNormalGradient;
-+ (id)aquaPressedGradient;
-
-+ (id)unifiedSelectedGradient;
-+ (id)unifiedNormalGradient;
-+ (id)unifiedPressedGradient;
-+ (id)unifiedDarkGradient;
-
-+ (id)sourceListSelectedGradient;
-+ (id)sourceListUnselectedGradient;
-
-+ (id)rainbowGradient;
-+ (id)hydrogenSpectrumGradient;
-
-- (CTGradient *)gradientWithAlphaComponent:(float)alpha;
-
-- (CTGradient *)addColorStop:(NSColor *)color atPosition:(float)position; //positions given relative to [0,1]
-- (CTGradient *)removeColorStopAtIndex:(unsigned)index;
-- (CTGradient *)removeColorStopAtPosition:(float)position;
-
-- (CTGradientBlendingMode)blendingMode;
-- (NSColor *)colorStopAtIndex:(unsigned)index;
-- (NSColor *)colorAtPosition:(float)position;
-
-
-- (void)drawSwatchInRect:(NSRect)rect;
-- (void)fillRect:(NSRect)rect angle:(float)angle; //fills rect with axial gradient
- // angle in degrees
-- (void)radialFillRect:(NSRect)rect; //fills rect with radial gradient
- // gradient from center outwards
-- (void)fillBezierPath:(NSBezierPath *)path angle:(float)angle;
-- (void)radialFillBezierPath:(NSBezierPath *)path;
-
-@end
Oops, something went wrong.

0 comments on commit 370077b

Please sign in to comment.