Skip to content

Commit

Permalink
Support new engine for reloading of themes.
Browse files Browse the repository at this point in the history
Still needs optimization and a progress indicators to show over view during reload so
that the user does not see an abrupt change in the view.
  • Loading branch information
emsquared committed Aug 6, 2012
1 parent 6e71f93 commit 5dd96be
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 87 deletions.
9 changes: 5 additions & 4 deletions Classes/Headers/TVCLogController.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@

#import "TextualApplication.h"

typedef BOOL (^TVCLogMessageBlock)(void);
typedef id (^TVCLogMessageBlock)(void);

@interface TVCLogController : NSObject
@property (nonatomic, strong) NSString *html;
@property (nonatomic, weak) IRCWorld *world;
@property (nonatomic, weak) IRCClient *client;
@property (nonatomic, weak) IRCChannel *channel;
Expand Down Expand Up @@ -69,7 +68,8 @@ typedef BOOL (^TVCLogMessageBlock)(void);
@property (nonatomic, assign) NSInteger lastVisitedHighlight;
@property (nonatomic, strong) NSMutableArray *highlightedLineNumbers;

@property (strong) NSMutableArray *messageQueue;
@property (strong) NSMutableArray *normalMessageQueue; // Priority: Low
@property (strong) NSMutableArray *specialMessageQueue; // Priority: High
@property (assign) BOOL queueInProgress;

- (void)setUp;
Expand All @@ -93,8 +93,9 @@ typedef BOOL (^TVCLogMessageBlock)(void);
- (void)unmark;
- (void)goToMark;

- (void)clear TEXTUAL_DEPRECATED; // See IRCWorld.h for replacements.

- (void)reloadTheme;
- (void)clear;

- (void)changeTextSize:(BOOL)bigger;

Expand Down
4 changes: 3 additions & 1 deletion Classes/IRC/IRCWorld.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ - (void)setChannelMenuItem:(NSMenuItem *)item

- (void)fireMessageQueue:(TVCLogController *)log
{
if (log.messageQueue.count >= 25) {
if (log.normalMessageQueue.count >= 25 ||
log.specialMessageQueue.count >= 25) {

static dispatch_once_t once;

/* Not 100% sure dispatch_once is
Expand Down
Loading

0 comments on commit 5dd96be

Please sign in to comment.