Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cleanup #11

Merged
merged 4 commits into from

2 participants

@JanX2

While reading through the code to understand how markdownlive does what it does, I changed a few things in a way which I hope will improve things.

Thanks for markdownlive!

Jan Weiß added some commits
Jan Weiß Replacing string defines in Obj-C code with const NSString objects. bf5850c
Jan Weiß Improving “.gitignore”. 28d8f5e
Jan Weiß Adding missing references header files to the “Classes” group of the …
…project.

This had resulted in Interface Builder complaining that several outlets were unavailable.
15287c0
Jan Weiß Replacing string defines in Obj-C code with const NSString objects in…
… previously missing header files.
f8f6d89
@rentzsch rentzsch merged commit 463734d into from
@rentzsch
Owner

Pulled. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2011
  1. Improving “.gitignore”.

    Jan Weiß authored
  2. Adding missing references header files to the “Classes” group of the …

    Jan Weiß authored
    …project.
    
    This had resulted in Interface Builder complaining that several outlets were unavailable.
  3. Replacing string defines in Obj-C code with const NSString objects in…

    Jan Weiß authored
    … previously missing header files.
This page is out of date. Refresh to see the latest.
View
25 .gitignore
@@ -1,9 +1,18 @@
# Xcode
-/build/
-/*.xcodeproj/*.mode1v3
-/*.xcodeproj/*.mode2v3
-/*.xcodeproj/*.pbxuser
-/*.xcodeproj/xcuserdata/*
-/*.xcodeproj/*.perspectivev3
-/*.xcodeproj/project.xcworkspace/*
-*~.nib
+build/*
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+*.xcworkspace
+!default.xcworkspace
+xcuserdata
+profile
+*.moved-aside
+
+## Ignore incredibly annoying .DS_Store files
+.DS_Store
View
3  EditPaneTextView.h
@@ -7,7 +7,8 @@
//
#import <Foundation/Foundation.h>
-#define kEditPaneTextViewChangedNotification @"EditPaneTextViewChangedNotification"
+
+extern NSString * const kEditPaneTextViewChangedNotification;
@class EditPaneLayoutManager;
View
1  EditPaneTextView.m
@@ -11,6 +11,7 @@
#import "PreferencesManager.h"
#import "PreferencesController.h"
+NSString * const kEditPaneTextViewChangedNotification = @"EditPaneTextViewChangedNotification";
@implementation EditPaneTextView
View
10 MarkdownLive.xcodeproj/project.pbxproj
@@ -91,6 +91,11 @@
2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 3DD161871431FCED0003F6C7 /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesController.h; sourceTree = "<group>"; };
+ 3DD161881431FCF40003F6C7 /* EditPaneTypesetter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditPaneTypesetter.h; sourceTree = "<group>"; };
+ 3DD161891431FCFC0003F6C7 /* EditPaneTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditPaneTextView.h; sourceTree = "<group>"; };
+ 3DD1618A1431FD030003F6C7 /* EditPaneLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditPaneLayoutManager.h; sourceTree = "<group>"; };
+ 3DD1618B1431FD0B0003F6C7 /* PreferencesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesManager.h; sourceTree = "<group>"; };
795F6C4E105D6EC400D1F90A /* mkdio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mkdio.c; sourceTree = "<group>"; };
795F6C50105D6ECE00D1F90A /* markdown.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = markdown.c; sourceTree = "<group>"; };
795F6C52105D6ED800D1F90A /* generate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = generate.c; sourceTree = "<group>"; };
@@ -198,10 +203,15 @@
2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
isa = PBXGroup;
children = (
+ 3DD1618A1431FD030003F6C7 /* EditPaneLayoutManager.h */,
ABF75D6E13CDEBBA00B5E7AB /* EditPaneLayoutManager.m */,
+ 3DD161891431FCFC0003F6C7 /* EditPaneTextView.h */,
ABF75D6F13CDEBBA00B5E7AB /* EditPaneTextView.m */,
+ 3DD161881431FCF40003F6C7 /* EditPaneTypesetter.h */,
ABF75D7013CDEBBA00B5E7AB /* EditPaneTypesetter.m */,
+ 3DD161871431FCED0003F6C7 /* PreferencesController.h */,
ABF75D7113CDEBBA00B5E7AB /* PreferencesController.m */,
+ 3DD1618B1431FD0B0003F6C7 /* PreferencesManager.h */,
ABF75D7213CDEBBA00B5E7AB /* PreferencesManager.m */,
2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */,
2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */,
View
2  PreferencesController.h
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
-#define kEditPaneFontNameChangedNotification @"EditPaneFontNameChangedNotification"
+extern NSString * const kEditPaneFontNameChangedNotification;
@interface PreferencesController : NSObject {
IBOutlet NSWindow *prefWindow;
View
7 PreferencesController.m
@@ -9,8 +9,9 @@
#import "PreferencesController.h"
#import "PreferencesManager.h"
-#define FONT_DISPLAY_FORMAT @"%@ %g pt."
+NSString * const kEditPaneFontNameChangedNotification = @"EditPaneFontNameChangedNotification";
+NSString * const kFontDisplayFormat = @"%@ %g pt.";
@interface PreferencesController (Private)
@@ -35,7 +36,7 @@ - (IBAction)showFonts:(id)sender {
- (void)updateFontDisplay {
NSString *fontName = [PreferencesManager editPaneFontName];
float fontSize = [PreferencesManager editPaneFontSize];
- [fontPreviewField setStringValue:[NSString stringWithFormat:FONT_DISPLAY_FORMAT, fontName, fontSize]];
+ [fontPreviewField setStringValue:[NSString stringWithFormat:kFontDisplayFormat, fontName, fontSize]];
}
- (IBAction)resetEditPanePreferences:(id)sender {
@@ -56,7 +57,7 @@ - (void)changeFont:(id)sender {
if (newFont && fontName) {
[PreferencesManager setEditPaneFontName:fontName];
[PreferencesManager setEditPaneFontSize:fontSize];
- [fontPreviewField setStringValue:[NSString stringWithFormat:FONT_DISPLAY_FORMAT, fontName, fontSize]];
+ [fontPreviewField setStringValue:[NSString stringWithFormat:kFontDisplayFormat, fontName, fontSize]];
[[NSNotificationCenter defaultCenter] postNotificationName:kEditPaneFontNameChangedNotification
object:nil];
View
13 PreferencesManager.h
@@ -8,13 +8,12 @@
#import <Foundation/Foundation.h>
-#define kEditPaneFontName @"EditPaneFontName"
-#define kEditPaneFontSize @"EditPaneFontSize"
-#define kEditPaneForegroundColor @"EditPaneForegroundColor"
-#define kEditPaneBackgroundColor @"EditPaneBackgroundColor"
-#define kEditPaneSelectionColor @"EditPaneSelectionColor"
-#define kEditPaneCaretColor @"EditPaneCaretColor"
-
+extern NSString * const kEditPaneFontName;
+extern NSString * const kEditPaneFontSize;
+extern NSString * const kEditPaneForegroundColor;
+extern NSString * const kEditPaneBackgroundColor;
+extern NSString * const kEditPaneSelectionColor;
+extern NSString * const kEditPaneCaretColor;
@interface PreferencesManager : NSObject {
View
7 PreferencesManager.m
@@ -8,6 +8,13 @@
#import "PreferencesManager.h"
+NSString * const kEditPaneFontName = @"EditPaneFontName";
+NSString * const kEditPaneFontSize = @"EditPaneFontSize";
+NSString * const kEditPaneForegroundColor = @"EditPaneForegroundColor";
+NSString * const kEditPaneBackgroundColor = @"EditPaneBackgroundColor";
+NSString * const kEditPaneSelectionColor = @"EditPaneSelectionColor";
+NSString * const kEditPaneCaretColor = @"EditPaneCaretColor";
+
@interface PreferencesManager (Private)
+ (NSColor *)colorForKey:(NSString *)key;
Something went wrong with that request. Please try again.