summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-02-26 09:27:41 +0000
committerChris Wilson <cpwilson@src.gnome.org>2007-02-26 09:27:41 +0000
commit95a70342cef9cdf261c2c1a6688615a7c5af561f (patch)
tree014695a00f84acfead3d39a007bc856f7884cd47
parent5e6ab181a9942335f2633ef375cd91b25120de1c (diff)
downloadvte-95a70342cef9cdf261c2c1a6688615a7c5af561f.tar.gz
Use a separate debug flag for the ally interface.
2007-02-26 Chris Wilson <chris@chris-wilson.co.uk> Use a separate debug flag for the ally interface. * src/debug.c: (_vte_debug_parse_string): * src/debug.h: * src/vteaccess.c: (vte_terminal_accessible_update_private_data_if_needed), (vte_terminal_accessible_invalidate_cursor), (vte_terminal_accessible_finalize), (vte_terminal_accessible_get_text), (vte_terminal_accessible_get_text_somewhere), (vte_terminal_accessible_text_init), (vte_terminal_accessible_component_init), (vte_terminal_accessible_action_init), (vte_terminal_accessible_factory_new): svn path=/trunk/; revision=1752
-rw-r--r--ChangeLog17
-rw-r--r--src/debug.c3
-rw-r--r--src/debug.h3
-rw-r--r--src/vteaccess.c34
4 files changed, 39 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 3451605a..a3ccbf00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2007-02-26 Chris Wilson <chris@chris-wilson.co.uk>
+ Use a separate debug flag for the ally interface.
+
+ * src/debug.c: (_vte_debug_parse_string):
+ * src/debug.h:
+ * src/vteaccess.c:
+ (vte_terminal_accessible_update_private_data_if_needed),
+ (vte_terminal_accessible_invalidate_cursor),
+ (vte_terminal_accessible_finalize),
+ (vte_terminal_accessible_get_text),
+ (vte_terminal_accessible_get_text_somewhere),
+ (vte_terminal_accessible_text_init),
+ (vte_terminal_accessible_component_init),
+ (vte_terminal_accessible_action_init),
+ (vte_terminal_accessible_factory_new):
+
+2007-02-26 Chris Wilson <chris@chris-wilson.co.uk>
+
* src/vte-private.h:
* src/vte.c: (vte_terminal_io_read):
And finally clamp the maximum number of bytes transferred in
diff --git a/src/debug.c b/src/debug.c
index d73d461d..db3eba94 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -87,6 +87,9 @@ _vte_debug_parse_string(const char *string)
} else
if (g_ascii_strcasecmp(flags[i], "DRAW") == 0) {
_vte_debug_flags |= VTE_DEBUG_DRAW;
+ } else
+ if (g_ascii_strcasecmp(flags[i], "ALLY") == 0) {
+ _vte_debug_flags |= VTE_DEBUG_ALLY;
}
}
g_strfreev(flags);
diff --git a/src/debug.h b/src/debug.h
index 05ccff47..7c3ef1c8 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -44,7 +44,8 @@ typedef enum {
VTE_DEBUG_WORK = 1 << 14,
VTE_DEBUG_CELLS = 1 << 15,
VTE_DEBUG_TIMEOUT = 1 << 16,
- VTE_DEBUG_DRAW = 1 << 17
+ VTE_DEBUG_DRAW = 1 << 17,
+ VTE_DEBUG_ALLY = 1 << 18
} VteDebugFlags;
void _vte_debug_parse_string(const char *string);
diff --git a/src/vteaccess.c b/src/vteaccess.c
index ed2b2433..fe64622a 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -361,7 +361,7 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
* it's a new line and we need to keep track of where
* it is. */
if ((i == 0) || (attrs.row != row)) {
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Row %d/%ld begins at %u.\n",
priv->snapshot_linebreaks->len,
attrs.row, i);
@@ -377,8 +377,8 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
/* Update the caret position. */
vte_terminal_get_cursor_position(terminal, &ccol, &crow);
- _vte_debug_print(VTE_DEBUG_MISC,
- "Cursor at (%ld, " "%ld).\n", ccol, crow);
+ _vte_debug_print(VTE_DEBUG_ALLY,
+ "Cursor at (%ld, " "%ld).\n", ccol, crow);
/* Get the offsets to the beginnings of each line. */
caret = -1;
@@ -412,11 +412,11 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
/* Done updating the caret position, whether we needed to or not. */
priv->snapshot_caret_invalid = FALSE;
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Refreshed accessibility snapshot, "
"%ld cells, %ld characters.\n",
- (long)priv->snapshot_attributes->len,
- (long)priv->snapshot_characters->len);
+ (long)priv->snapshot_attributes->len,
+ (long)priv->snapshot_characters->len);
}
/* A signal handler to catch "text-inserted/deleted/modified" signals. */
@@ -667,8 +667,8 @@ vte_terminal_accessible_invalidate_cursor(VteTerminal *terminal, gpointer data)
VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
g_assert(priv != NULL);
- _vte_debug_print(VTE_DEBUG_MISC,
- "Invalidating accessibility cursor.\n");
+ _vte_debug_print(VTE_DEBUG_ALLY,
+ "Invalidating accessibility cursor.\n");
priv->snapshot_caret_invalid = TRUE;
vte_terminal_accessible_update_private_data_if_needed(ATK_OBJECT(data),
NULL, NULL);
@@ -848,7 +848,7 @@ vte_terminal_accessible_finalize(GObject *object)
VteTerminalAccessiblePrivate *priv;
GtkAccessible *accessible = NULL;
- _vte_debug_print(VTE_DEBUG_MISC, "Finalizing accessible peer.\n");
+ _vte_debug_print(VTE_DEBUG_ALLY, "Finalizing accessible peer.\n");
g_assert(VTE_IS_TERMINAL_ACCESSIBLE(object));
accessible = GTK_ACCESSIBLE(object);
@@ -934,7 +934,7 @@ vte_terminal_accessible_get_text(AtkText *text,
priv = g_object_get_data(G_OBJECT(text),
VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Getting text from %d to %d of %d.\n",
start_offset, end_offset,
priv->snapshot_characters->len);
@@ -989,7 +989,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
terminal = VTE_TERMINAL((GTK_ACCESSIBLE(text))->widget);
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Getting %s %s at %d of %d.\n",
(direction == direction_current) ? "this" :
((direction == direction_next) ? "next" : "previous"),
@@ -1192,7 +1192,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
break;
}
}
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Character %d is on line %d.\n",
offset, line);
/* Perturb the line number to handle before/at/after. */
@@ -1205,7 +1205,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
line = MIN(line, priv->snapshot_linebreaks->len - 1);
end = g_array_index(priv->snapshot_linebreaks,
int, line);
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Line runs from %d to %d.\n",
start, end);
break;
@@ -1622,7 +1622,7 @@ vte_terminal_accessible_text_init(gpointer iface, gpointer data)
AtkTextIface *text;
g_assert(G_TYPE_FROM_INTERFACE(iface) == ATK_TYPE_TEXT);
text = iface;
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Initializing accessible peer's AtkText interface.\n");
text->get_text = vte_terminal_accessible_get_text;
text->get_text_after_offset = vte_terminal_accessible_get_text_after_offset;
@@ -1819,7 +1819,7 @@ vte_terminal_accessible_component_init(gpointer iface, gpointer data)
g_assert(G_TYPE_FROM_INTERFACE(iface) == ATK_TYPE_COMPONENT);
component = iface;
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Initializing accessible peer's "
"AtkComponent interface.\n");
/* Set our virtual functions. */
@@ -1937,7 +1937,7 @@ vte_terminal_accessible_action_init(gpointer iface, gpointer data)
g_return_if_fail(G_TYPE_FROM_INTERFACE(iface) == ATK_TYPE_ACTION);
action = iface;
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Initializing accessible peer's "
"AtkAction interface.\n");
/* Set our virtual functions. */
@@ -2089,7 +2089,7 @@ vte_terminal_accessible_factory_init(VteTerminalAccessibleFactory *self)
AtkObjectFactory *
vte_terminal_accessible_factory_new(void)
{
- _vte_debug_print(VTE_DEBUG_MISC,
+ _vte_debug_print(VTE_DEBUG_ALLY,
"Creating a new VteTerminalAccessibleFactory.\n");
return g_object_new(VTE_TYPE_TERMINAL_ACCESSIBLE_FACTORY, NULL);
}