]> git.babelmonkeys.de Git - jubjub.git/commitdiff
Move away from BOOL
authorFlorian Zeitz <florob@babelmonkeys.de>
Sun, 23 Jun 2013 20:34:58 +0000 (22:34 +0200)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sun, 23 Jun 2013 20:34:58 +0000 (22:34 +0200)
src/core/JubChatClient.m
src/gui/cli/JubCLIUI.h
src/gui/cli/JubCLIUI.m
src/gui/gtk/JubGtkChatUI.h
src/gui/gtk/JubGtkChatUI.m
src/gui/gtk/JubGtkRosterUI.m

index 3184b8970dd08e5e914aaa61c7d5bfef29d72de4..fa4bd9e0aa2309957810b6e85f711c7296a9f0ef 100644 (file)
        if ([presence.from isEqual: connection.JID]) {
                [_ui         client: self
                  didChangePresence: presence];
-               OF_SETTER(_presence, presence, YES, 0);
+               OF_SETTER(_presence, presence, true, 0);
        }
 }
 
index 6d3a3e4a6bc4ee96db1f9a57ad853e2d2497f541..20cd1190f17305749bd4435e11035d73002658be 100644 (file)
@@ -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;
index 9a62767523424477fe6866e22c479130343386a0..bcae48044ff354aec8d4dc68593bf161ea652f0c 100644 (file)
@@ -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
index 4694d3f34a83d479031ee282545a37b056a67fcf..eff55e21ac74a29ed3f6ef9416f5519b69781d1f 100644 (file)
@@ -11,6 +11,6 @@
        GtkTextBuffer *_chat_buffer;
        jub_send_block_t _sendBlock;
        jub_close_block_t _closeBlock;
-       BOOL _bufferEmpty;
+       bool _bufferEmpty;
 }
 @end
index c4e55054b4879d8b42c217fa9909b99d4d4ba1e6..1b020f24635442440b19a2a0dcf7e60a1bd17f75 100644 (file)
@@ -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;
index 5711ee68dfe0a21eeb73f0da2e3fe4305493c238..432677cb8f1e2c9e92cbebf6efb29f2329931188 100644 (file)
@@ -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