From ea2a5ae3a666ef7c37949bf8bd7b18cb9c11c2d8 Mon Sep 17 00:00:00 2001
From: Florian Zeitz <florob@babelmonkeys.de>
Date: Sun, 23 Jun 2013 22:34:58 +0200
Subject: [PATCH] Move away from BOOL

---
 src/core/JubChatClient.m     |  2 +-
 src/gui/cli/JubCLIUI.h       |  2 +-
 src/gui/cli/JubCLIUI.m       | 14 +++++++-------
 src/gui/gtk/JubGtkChatUI.h   |  2 +-
 src/gui/gtk/JubGtkChatUI.m   | 10 +++++-----
 src/gui/gtk/JubGtkRosterUI.m |  4 ++--
 6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/core/JubChatClient.m b/src/core/JubChatClient.m
index 3184b89..fa4bd9e 100644
--- a/src/core/JubChatClient.m
+++ b/src/core/JubChatClient.m
@@ -160,7 +160,7 @@
 	if ([presence.from isEqual: connection.JID]) {
 		[_ui         client: self
 		  didChangePresence: presence];
-		OF_SETTER(_presence, presence, YES, 0);
+		OF_SETTER(_presence, presence, true, 0);
 	}
 }
 
diff --git a/src/gui/cli/JubCLIUI.h b/src/gui/cli/JubCLIUI.h
index 6d3a3e4..20cd119 100644
--- a/src/gui/cli/JubCLIUI.h
+++ b/src/gui/cli/JubCLIUI.h
@@ -22,7 +22,7 @@
 @property (retain) JubCLIChatUI *sink;
 @property (readonly) OFMutableSet *subRequests;
 
-- (BOOL)Jub_userInputWithStream: (OFStream*)stream
+- (bool)Jub_userInputWithStream: (OFStream*)stream
 			   line: (OFString*)line
 		      exception: (OFException*)exception;
 - (void)addCommand: (id<JubCLICommand>)command;
diff --git a/src/gui/cli/JubCLIUI.m b/src/gui/cli/JubCLIUI.m
index 9a62767..bcae480 100644
--- a/src/gui/cli/JubCLIUI.m
+++ b/src/gui/cli/JubCLIUI.m
@@ -298,7 +298,7 @@ static void completionCallback(OFString *buf, OFList *lc)
 		      forKey: command.command];
 }
 
-- (BOOL)Jub_userInputWithStream: (OFStream*)stream
+- (bool)Jub_userInputWithStream: (OFStream*)stream
 			   line: (OFString*)line
 		      exception: (OFException*)exception
 {
@@ -306,18 +306,18 @@ static void completionCallback(OFString *buf, OFList *lc)
 		[OFApplication terminate];
 
 	if ([line length] == 0)
-		return YES;
+		return true;
 
 	if ([line characterAtIndex: 0] != ':') {
 		if (_sink == nil) {
 			[of_stdout writeLine: @"No default sink selected, "
 			    @"type `:h` for help"];
-			return YES;
+			return true;
 		}
 
 		[_sink send: line];
 
-		return YES;
+		return true;
 	}
 
 	line = [line stringByDeletingTrailingWhitespaces];
@@ -359,7 +359,7 @@ static void completionCallback(OFString *buf, OFList *lc)
 			[of_stdout writeFormat: @"- %@\n", command.help];
 		};
 
-		return YES;
+		return true;
 	}
 
 	id<JubCLICommand> command = _commands[input[0]];
@@ -368,12 +368,12 @@ static void completionCallback(OFString *buf, OFList *lc)
 		[command callWithParameters:
 		    [input arrayByRemovingObject: [input firstObject]]];
 
-		return YES;
+		return true;
 	}
 
 	[of_stdout writeLine: @"Invalid command, type `:h` for help"];
 
-	return YES;
+	return true;
 }
 
 - (void)contactManager: (XMPPContactManager*)manager
diff --git a/src/gui/gtk/JubGtkChatUI.h b/src/gui/gtk/JubGtkChatUI.h
index 4694d3f..eff55e2 100644
--- a/src/gui/gtk/JubGtkChatUI.h
+++ b/src/gui/gtk/JubGtkChatUI.h
@@ -11,6 +11,6 @@
 	GtkTextBuffer *_chat_buffer;
 	jub_send_block_t _sendBlock;
 	jub_close_block_t _closeBlock;
-	BOOL _bufferEmpty;
+	bool _bufferEmpty;
 }
 @end
diff --git a/src/gui/gtk/JubGtkChatUI.m b/src/gui/gtk/JubGtkChatUI.m
index c4e5505..1b020f2 100644
--- a/src/gui/gtk/JubGtkChatUI.m
+++ b/src/gui/gtk/JubGtkChatUI.m
@@ -37,13 +37,13 @@ static void call_close_block(GtkWidget *object, gpointer data)
 	self = [super init];
 
 	@try {
-		__block volatile BOOL initialized = NO;
+		__block volatile bool initialized = false;
 		__block GtkWidget *chat_window;
 		__block GtkTextBuffer *chat_buffer;
 
 		_closeBlock = [closeBlock copy];
 		_sendBlock = [sendBlock copy];
-		_bufferEmpty = YES;
+		_bufferEmpty = true;
 
 		g_idle_add_block(^{
 			GtkEntry *chat_entry;
@@ -76,7 +76,7 @@ static void call_close_block(GtkWidget *object, gpointer data)
 			    [title UTF8String]);
 			gtk_widget_show(chat_window);
 
-			initialized = YES;
+			initialized = true;
 
 			g_object_unref(builder);
 		});
@@ -105,8 +105,8 @@ static void call_close_block(GtkWidget *object, gpointer data)
 - (void)addMessage: (OFString*)text
 	    sender: (OFString*)sender
 {
-	BOOL first = _bufferEmpty;
-	if (OF_UNLIKELY(_bufferEmpty)) _bufferEmpty = NO;
+	bool first = _bufferEmpty;
+	if (OF_UNLIKELY(_bufferEmpty)) _bufferEmpty = false;
 
 	g_idle_add_block(^{
 		GtkTextIter end_iter;
diff --git a/src/gui/gtk/JubGtkRosterUI.m b/src/gui/gtk/JubGtkRosterUI.m
index 5711ee6..432677c 100644
--- a/src/gui/gtk/JubGtkRosterUI.m
+++ b/src/gui/gtk/JubGtkRosterUI.m
@@ -32,7 +32,7 @@ static void roster_row_activated(GtkTreeView *tree_view, GtkTreePath *path,
 
 	[client performSelectorOnMainThread: @selector(chatForContact:)
 				 withObject: contact
-			      waitUntilDone: NO];
+			      waitUntilDone: false];
 	[pool release];
 }
 
@@ -526,7 +526,7 @@ static void dialog_response_callback(GtkDialog *dialog, gint response_id,
 
 - (bool)showOffline
 {
-	OF_GETTER(_showOffline, YES);
+	OF_GETTER(_showOffline, true);
 }
 
 - (void)setShowOffline: (bool)showOffline
-- 
2.39.5