Drop some unused debug printfs

Remove some debug spew that has been ifdef'ed out for years
and does not look useful enough to keep.
This commit is contained in:
Matthias Clasen 2016-02-28 15:26:52 -05:00
parent 8e1368e6de
commit 0ac71e81cf
8 changed files with 3 additions and 131 deletions

View File

@ -68,7 +68,6 @@
- (void) dealloc
{
g_print ("Deallocating GtkQuartzStatusIcon\n");
[current_image release];
[ns_item release];
[ns_bar release];

View File

@ -277,9 +277,6 @@
* ]|
*/
#undef DEBUG_UI_MANAGER
typedef enum
{
NODE_TYPE_UNDECIDED,
@ -2549,10 +2546,6 @@ update_node (GtkUIManager *manager,
GtkAction *action;
const gchar *action_name;
NodeUIReference *ref;
#ifdef DEBUG_UI_MANAGER
GList *tmp;
#endif
g_return_if_fail (node != NULL);
g_return_if_fail (NODE_INFO (node) != NULL);
@ -2568,19 +2561,6 @@ update_node (GtkUIManager *manager,
popup_accels = info->popup_accels;
}
#ifdef DEBUG_UI_MANAGER
g_print ("update_node name=%s dirty=%d popup %d (",
info->name, info->dirty, in_popup);
for (tmp = info->uifiles; tmp != NULL; tmp = tmp->next)
{
NodeUIReference *ref = tmp->data;
g_print("%s:%u", g_quark_to_string (ref->action_quark), ref->merge_id);
if (tmp->next)
g_print (", ");
}
g_print (")\n");
#endif
if (info->uifiles == NULL) {
/* We may need to remove this node.
* This must be done in post order

View File

@ -452,7 +452,6 @@ check_win32_special_cases (GtkIMContextSimple *context_simple,
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
priv->compose_buffer[0] = 0;
GTK_NOTE (MISC, g_print ("win32: U+%04X\n", value));
return TRUE;
}
}
@ -474,7 +473,6 @@ check_win32_special_case_after_compact_match (GtkIMContextSimple *context_sim
IS_DEAD_KEY (priv->compose_buffer[0]))
{
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
GTK_NOTE (MISC, g_print ("win32: U+%04X ", value));
}
}
@ -531,7 +529,6 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
gdk_keyval_to_unicode (value));
priv->compose_buffer[0] = 0;
GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
return TRUE;
}
@ -576,18 +573,11 @@ gtk_check_compact_table (const GtkComposeTableCompact *table,
compare_seq_index);
if (!seq_index)
{
GTK_NOTE (MISC, g_print ("compact: no\n"));
return FALSE;
}
return FALSE;
if (seq_index && n_compose == 1)
{
GTK_NOTE (MISC, g_print ("compact: yes\n"));
return TRUE;
}
return TRUE;
GTK_NOTE (MISC, g_print ("compact: %d ", *seq_index));
seq = NULL;
match = FALSE;
value = 0;
@ -619,13 +609,11 @@ gtk_check_compact_table (const GtkComposeTableCompact *table,
{
if (compose_match)
*compose_match = TRUE;
GTK_NOTE (MISC, g_print ("tentative match U+%04X ", value));
}
GTK_NOTE (MISC, g_print ("yes\n"));
return TRUE;
}
}
}
}
}
@ -638,11 +626,9 @@ gtk_check_compact_table (const GtkComposeTableCompact *table,
if (output_char)
*output_char = value;
GTK_NOTE (MISC, g_print ("U+%04X\n", value));
return TRUE;
}
GTK_NOTE (MISC, g_print ("no\n"));
return FALSE;
}
@ -1249,20 +1235,6 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
if (success)
return TRUE;
GTK_NOTE (MISC, {
g_print ("[ ");
for (i = 0; i < n_compose; i++)
{
const gchar *keyval_name = gdk_keyval_name (priv->compose_buffer[i]);
if (keyval_name != NULL)
g_print ("%s ", keyval_name);
else
g_print ("%04x ", priv->compose_buffer[i]);
}
g_print ("] ");
});
#ifdef GDK_WINDOWING_WIN32
if (check_win32_special_cases (context_simple, n_compose))
return TRUE;

View File

@ -6041,12 +6041,6 @@ gtk_text_btree_get_tag_info (GtkTextBTree *tree,
info->toggle_count = 0;
tree->tag_infos = g_slist_prepend (tree->tag_infos, info);
#if 0
g_print ("Created tag info %p for tag %s(%p)\n",
info, info->tag->name ? info->tag->name : "anon",
info->tag);
#endif
}
return info;
@ -6067,12 +6061,6 @@ gtk_text_btree_remove_tag_info (GtkTextBTree *tree,
info = list->data;
if (info->tag == tag)
{
#if 0
g_print ("Removing tag info %p for tag %s(%p)\n",
info, info->tag->name ? info->tag->name : "anon",
info->tag);
#endif
if (prev != NULL)
{
prev->next = list->next;

View File

@ -358,28 +358,6 @@ serialize_tags (SerializationContext *context)
g_string_append (context->tag_table_str, " </tags>\n");
}
#if 0
static void
dump_tag_list (const gchar *str,
GList *list)
{
g_print ("%s: ", str);
if (!list)
g_print ("(empty)");
else
{
while (list)
{
g_print ("%s ", ((GtkTextTag *)list->data)->name);
list = list->next;
}
}
g_print ("\n");
}
#endif
static void
find_list_delta (GSList *old_list,
GSList *new_list,

View File

@ -88,8 +88,6 @@
*/
#undef DEBUG_TOOLTIP
#define HOVER_TIMEOUT 500
#define BROWSE_TIMEOUT 60
#define BROWSE_DISABLE_TIMEOUT 500
@ -527,17 +525,6 @@ child_location_foreach (GtkWidget *child,
child_loc->x, child_loc->y,
&x, &y))
{
#ifdef DEBUG_TOOLTIP
g_print ("candidate: %s alloc=[(%d,%d) %dx%d] (%d, %d)->(%d, %d)\n",
gtk_widget_get_name (child),
child_allocation.x,
child_allocation.y,
child_allocation.width,
child_allocation.height,
child_loc->x, child_loc->y,
x, y);
#endif /* DEBUG_TOOLTIP */
/* (x, y) relative to child's allocation. */
if (x >= 0 && x < child_allocation.width
&& y >= 0 && y < child_allocation.height)
@ -636,12 +623,6 @@ _gtk_widget_find_at_coords (GdkWindow *window,
if (!event_widget)
return NULL;
#ifdef DEBUG_TOOLTIP
g_print ("event window %p (belonging to %p (%s)) (%d, %d)\n",
window, event_widget, gtk_widget_get_name (event_widget),
window_x, window_y);
#endif
/* Coordinates are relative to event window */
child_loc.x = window_x;
child_loc.y = window_y;
@ -1465,21 +1446,6 @@ _gtk_tooltip_handle_event (GdkEvent *event)
return;
}
#ifdef DEBUG_TOOLTIP
if (has_tooltip_widget)
{
GtkAllocation allocation;
gtk_widget_get_allocation (has_tooltip_widget, &allocation);
g_print ("%p (%s) at (%d, %d) %dx%d pointer: (%d, %d)\n",
has_tooltip_widget, gtk_widget_get_name (has_tooltip_widget),
allocation.x,
allocation.y,
allocation.width,
allocation.height,
x, y);
}
#endif /* DEBUG_TOOLTIP */
/* Always poll for a next motion event */
gdk_event_request_motions (&event->motion);

View File

@ -12524,10 +12524,6 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
g_return_if_fail (col_align >= 0.0 && col_align <= 1.0);
g_return_if_fail (path != NULL || column != NULL);
#if 0
g_print ("gtk_tree_view_scroll_to_cell:\npath: %s\ncolumn: %s\nuse_align: %d\nrow_align: %f\ncol_align: %f\n",
gtk_tree_path_to_string (path), column?"non-null":"null", use_align, row_align, col_align);
#endif
row_align = CLAMP (row_align, 0.0, 1.0);
col_align = CLAMP (col_align, 0.0, 1.0);

View File

@ -9096,19 +9096,12 @@ clamp_window_to_rectangle (gint *x,
gint h,
const GdkRectangle *rect)
{
#ifdef DEBUGGING_OUTPUT
g_print ("%s: %+d%+d %dx%d: %+d%+d: %dx%d", G_STRFUNC, rect->x, rect->y, rect->width, rect->height, *x, *y, w, h);
#endif
/* If it is too large, center it. If it fits on the monitor but is
* partially outside, move it to the closest edge. Do this
* separately in x and y directions.
*/
clamp (x, w, rect->x, rect->width);
clamp (y, h, rect->y, rect->height);
#ifdef DEBUGGING_OUTPUT
g_print (" ==> %+d%+d: %dx%d\n", *x, *y, w, h);
#endif
}