Commit 2a2d254a authored by Matthias Clasen's avatar Matthias Clasen

quartz: Don't use g_print for debug output

The g_print documentation explicitly says not to do this, since
g_print is meant to be redirected by applications. Instead use
g_message for logging that can be triggered via GTK_DEBUG.
parent 2801f3c8
......@@ -37,25 +37,25 @@
-(BOOL)acceptsFirstResponder
{
GDK_NOTE (EVENTS, g_print ("acceptsFirstResponder\n"));
GDK_NOTE (EVENTS, g_message ("acceptsFirstResponder"));
return YES;
}
-(BOOL)becomeFirstResponder
{
GDK_NOTE (EVENTS, g_print ("becomeFirstResponder\n"));
GDK_NOTE (EVENTS, g_message ("becomeFirstResponder"));
return YES;
}
-(BOOL)resignFirstResponder
{
GDK_NOTE (EVENTS, g_print ("resignFirstResponder\n"));
GDK_NOTE (EVENTS, g_message ("resignFirstResponder"));
return YES;
}
-(void) keyDown: (NSEvent *) theEvent
{
GDK_NOTE (EVENTS, g_print ("keyDown\n"));
GDK_NOTE (EVENTS, g_message ("keyDown"));
[self interpretKeyEvents: [NSArray arrayWithObject: theEvent]];
}
......@@ -65,13 +65,13 @@
-(NSUInteger)characterIndexForPoint: (NSPoint)aPoint
{
GDK_NOTE (EVENTS, g_print ("characterIndexForPoint\n"));
GDK_NOTE (EVENTS, g_message ("characterIndexForPoint"));
return 0;
}
-(NSRect)firstRectForCharacterRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
{
GDK_NOTE (EVENTS, g_print ("firstRectForCharacterRange\n"));
GDK_NOTE (EVENTS, g_message ("firstRectForCharacterRange"));
gint ns_x, ns_y;
GdkRectangle *rect;
......@@ -91,37 +91,37 @@
-(NSArray *)validAttributesForMarkedText
{
GDK_NOTE (EVENTS, g_print ("validAttributesForMarkedText\n"));
GDK_NOTE (EVENTS, g_message ("validAttributesForMarkedText"));
return [NSArray arrayWithObjects: NSUnderlineStyleAttributeName, nil];
}
-(NSAttributedString *)attributedSubstringForProposedRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
{
GDK_NOTE (EVENTS, g_print ("attributedSubstringForProposedRange\n"));
GDK_NOTE (EVENTS, g_message ("attributedSubstringForProposedRange"));
return nil;
}
-(BOOL)hasMarkedText
{
GDK_NOTE (EVENTS, g_print ("hasMarkedText\n"));
GDK_NOTE (EVENTS, g_message ("hasMarkedText"));
return markedRange.location != NSNotFound && markedRange.length != 0;
}
-(NSRange)markedRange
{
GDK_NOTE (EVENTS, g_print ("markedRange\n"));
GDK_NOTE (EVENTS, g_message ("markedRange"));
return markedRange;
}
-(NSRange)selectedRange
{
GDK_NOTE (EVENTS, g_print ("selectedRange\n"));
GDK_NOTE (EVENTS, g_message ("selectedRange"));
return selectedRange;
}
-(void)unmarkText
{
GDK_NOTE (EVENTS, g_print ("unmarkText\n"));
GDK_NOTE (EVENTS, g_message ("unmarkText"));
gchar *prev_str;
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
......@@ -130,7 +130,7 @@
-(void)setMarkedText: (id)aString selectedRange: (NSRange)newSelection replacementRange: (NSRange)replacementRange
{
GDK_NOTE (EVENTS, g_print ("setMarkedText\n"));
GDK_NOTE (EVENTS, g_message ("setMarkedText"));
const char *str;
gchar *prev_str;
......@@ -158,9 +158,9 @@
g_object_set_data (G_OBJECT (gdk_window), TIC_SELECTED_LEN,
GUINT_TO_POINTER (selectedRange.length));
GDK_NOTE (EVENTS, g_print ("setMarkedText: set %s (%p, nsview %p): %s\n",
TIC_MARKED_TEXT, gdk_window, self,
str ? str : "(empty)"));
GDK_NOTE (EVENTS, g_message ("setMarkedText: set %s (%p, nsview %p): %s",
TIC_MARKED_TEXT, gdk_window, self,
str ? str : "(empty)"));
/* handle text input changes by mouse events */
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_window),
......@@ -172,14 +172,14 @@
-(void)doCommandBySelector: (SEL)aSelector
{
GDK_NOTE (EVENTS, g_print ("doCommandBySelector\n"));
GDK_NOTE (EVENTS, g_message ("doCommandBySelector"));
if ([self respondsToSelector: aSelector])
[self performSelector: aSelector];
}
-(void)insertText: (id)aString replacementRange: (NSRange)replacementRange
{
GDK_NOTE (EVENTS, g_print ("insertText\n"));
GDK_NOTE (EVENTS, g_message ("insertText"));
const char *str;
NSString *string;
gchar *prev_str;
......@@ -209,7 +209,7 @@
}
g_object_set_data_full (G_OBJECT (gdk_window), TIC_INSERT_TEXT, g_strdup (str), g_free);
GDK_NOTE (EVENTS, g_print ("insertText: set %s (%p, nsview %p): %s\n",
GDK_NOTE (EVENTS, g_message ("insertText: set %s (%p, nsview %p): %s",
TIC_INSERT_TEXT, gdk_window, self,
str ? str : "(empty)"));
......@@ -226,314 +226,314 @@
-(void)deleteBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteBackward\n"));
GDK_NOTE (EVENTS, g_message ("deleteBackward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteForward\n"));
GDK_NOTE (EVENTS, g_message ("deleteForward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteToBeginningOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteToBeginningOfLine\n"));
GDK_NOTE (EVENTS, g_message ("deleteToBeginningOfLine"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteToEndOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteToEndOfLine\n"));
GDK_NOTE (EVENTS, g_message ("deleteToEndOfLine"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteWordBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteWordBackward\n"));
GDK_NOTE (EVENTS, g_message ("deleteWordBackward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteWordForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteWordForward\n"));
GDK_NOTE (EVENTS, g_message ("deleteWordForward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)insertBacktab: (id)sender
{
GDK_NOTE (EVENTS, g_print ("insertBacktab\n"));
GDK_NOTE (EVENTS, g_message ("insertBacktab"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)insertNewline: (id)sender
{
GDK_NOTE (EVENTS, g_print ("insertNewline\n"));
GDK_NOTE (EVENTS, g_message ("insertNewline"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY, GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)insertTab: (id)sender
{
GDK_NOTE (EVENTS, g_print ("insertTab\n"));
GDK_NOTE (EVENTS, g_message ("insertTab"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveBackward\n"));
GDK_NOTE (EVENTS, g_message ("moveBackward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveBackwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveBackwardAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveBackwardAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveDown: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveDown\n"));
GDK_NOTE (EVENTS, g_message ("moveDown"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveDownAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveDownAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveDownAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveForward\n"));
GDK_NOTE (EVENTS, g_message ("moveForward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveForwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveForwardAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveForwardAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveLeft: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveLeft\n"));
GDK_NOTE (EVENTS, g_message ("moveLeft"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveLeftAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveLeftAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveLeftAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveRight: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveRight\n"));
GDK_NOTE (EVENTS, g_message ("moveRight"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveRightAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveRightAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveRightAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfDocument: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfDocument\n"));
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocument"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfDocumentAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfDocumentAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocumentAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfLine\n"));
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLine"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfLineAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfLineAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLineAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfDocument: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfDocument\n"));
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocument"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfDocumentAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfDocumentAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocumentAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfLine\n"));
GDK_NOTE (EVENTS, g_message ("moveToEndOfLine"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfLineAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfLineAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveToEndOfLineAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveUp: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveUp\n"));
GDK_NOTE (EVENTS, g_message ("moveUp"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveUpAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveUpAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveUpAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordBackward\n"));
GDK_NOTE (EVENTS, g_message ("moveWordBackward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordBackwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordBackwardAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveWordBackwardAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordForward\n"));
GDK_NOTE (EVENTS, g_message ("moveWordForward"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordForwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordForwardAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveWordForwardAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordLeft: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordLeft\n"));
GDK_NOTE (EVENTS, g_message ("moveWordLeft"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordLeftAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordLeftAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveWordLeftAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordRight: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordRight\n"));
GDK_NOTE (EVENTS, g_message ("moveWordRight"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordRightAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordRightAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("moveWordRightAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageDown: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageDown\n"));
GDK_NOTE (EVENTS, g_message ("pageDown"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageDownAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageDownAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("pageDownAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageUp: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageUp\n"));
GDK_NOTE (EVENTS, g_message ("pageUp"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageUpAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageUpAndModifySelection\n"));
GDK_NOTE (EVENTS, g_message ("pageUpAndModifySelection"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)selectAll: (id)sender
{
GDK_NOTE (EVENTS, g_print ("selectAll\n"));
GDK_NOTE (EVENTS, g_message ("selectAll"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)selectLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("selectLine\n"));
GDK_NOTE (EVENTS, g_message ("selectLine"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)selectWord: (id)sender
{
GDK_NOTE (EVENTS, g_print ("selectWord\n"));
GDK_NOTE (EVENTS, g_message ("selectWord"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)noop: (id)sender
{
GDK_NOTE (EVENTS, g_print ("noop\n"));
GDK_NOTE (EVENTS, g_message ("noop"));
}
/* --------------------------------------------------------------- */
......
......@@ -189,7 +189,7 @@ select_thread_set_state (SelectThreadState new_state)
if (select_thread_state == new_state)
return;
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Select thread state: %s => %s\n", state_names[select_thread_state], state_names[new_state]));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Select thread state: %s => %s", state_names[select_thread_state], state_names[new_state]));
old_state = select_thread_state;
select_thread_state = new_state;
......@@ -200,7 +200,7 @@ select_thread_set_state (SelectThreadState new_state)
static void
signal_main_thread (void)
{
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Waking up main thread\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Waking up main thread"));
/* If we are in nextEventMatchingMask, then we need to make sure an
* event gets queued, otherwise it's enough to simply wake up the
......@@ -341,22 +341,26 @@ static void
dump_poll_result (GPollFD *ufds,
guint nfds)
{
GString *s;
gint i;
s = g_string_new ("");
for (i = 0; i < nfds; i++)
{
if (ufds[i].fd >= 0 && ufds[i].revents)
{
g_print (" %d:", ufds[i].fd);
g_string_append_printf (s, " %d:", ufds[i].fd);
if (ufds[i].revents & G_IO_IN)
g_print (" in");
g_string_append (s, " in");
if (ufds[i].revents & G_IO_OUT)
g_print (" out");
g_string_appendi (s, " out");
if (ufds[i].revents & G_IO_PRI)
g_print (" pri");
g_print ("\n");
g_string_append (s, " pri");
g_string_append (s, "\n");
}
}
g_message ("%s", s->str);
g_string_free (s, TRUE);
}
#endif
......@@ -409,7 +413,7 @@ select_thread_start_poll (GPollFD *ufds,
if (nfds == 0 ||
(nfds == 1 && poll_fd_index >= 0))
{
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Nothing to poll\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Nothing to poll"));
return 0;
}
......@@ -428,7 +432,7 @@ select_thread_start_poll (GPollFD *ufds,
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_EVENTLOOP) && n_ready > 0)
{
g_print ("EventLoop: Found ready file descriptors before waiting\n");
g_message ("EventLoop: Found ready file descriptors before waiting");
dump_poll_result (ufds, nfds);
}
#endif
......@@ -507,7 +511,7 @@ select_thread_start_poll (GPollFD *ufds,
if (have_new_pollfds)
{
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Submitting a new set of file descriptor to the select thread\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Submitting a new set of file descriptor to the select thread"));
g_assert (next_pollfds == NULL);
......@@ -572,7 +576,7 @@ select_thread_collect_poll (GPollFD *ufds, guint nfds)
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_EVENTLOOP)
{
g_print ("EventLoop: Found ready file descriptors after waiting\n");
g_message ("EventLoop: Found ready file descriptors after waiting");
dump_poll_result (ufds, nfds);
}
#endif
......@@ -813,7 +817,7 @@ run_loop_entry (void)
{
if (g_main_context_acquire (NULL))
{
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Beginning tracking run loop activity\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Beginning tracking run loop activity"));
acquired_loop_level = current_loop_level;
}
else
......@@ -828,7 +832,7 @@ run_loop_entry (void)
* thread that does g_main_context_wait() and then wakes us back up, but
* the gain doesn't seem worth the complexity.
*/
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Can't acquire main loop; skipping tracking run loop activity\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Can't acquire main loop; skipping tracking run loop activity"));
}
}
}
......@@ -866,7 +870,7 @@ run_loop_before_sources (void)
if (g_main_context_check (context, max_priority, run_loop_pollfds, nfds))
{
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Dispatching high priority sources\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Dispatching high priority sources"));
g_main_context_dispatch (context);
}
}
......@@ -909,7 +913,7 @@ run_loop_before_waiting (void)
* expires. We do this by adding a dummy timer that we'll remove immediately
* after the wait wakes up.
*/
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Adding timer to wake us up in %d milliseconds\n", timeout));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Adding timer to wake us up in %d milliseconds", timeout));
run_loop_timer = CFRunLoopTimerCreate (NULL, /* allocator */
CFAbsoluteTimeGetCurrent () + timeout / 1000.,
......@@ -949,7 +953,7 @@ run_loop_after_waiting (void)
if (g_main_context_check (context, run_loop_max_priority, run_loop_pollfds, run_loop_n_pollfds))
{
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Dispatching after waiting\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Dispatching after waiting"));
g_main_context_dispatch (context);
}
}
......@@ -962,7 +966,7 @@ run_loop_exit (void)
{
g_main_context_release (NULL);
acquired_loop_level = -1;
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Ended tracking run loop activity\n"));
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Ended tracking run loop activity"));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment