diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2005-06-11 21:05:07 +0000 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2005-06-11 21:05:07 +0000 |
commit | 1168ca49dd0d7c1e2f8d1c77434f9c798d6f9286 (patch) | |
tree | ae6410837af1d0ab97c55c55651a30a99f740b5f | |
parent | 141d956b5a678fbb0a43938e8909c7c66646a840 (diff) |
Update some.
2005-06-11 Kjartan Maraas <kmaraas@gnome.org>
* NEWS: Update some.
* doc/reference/tmpl/reaper.sgml:
* doc/reference/tmpl/vte-unused.sgml:
* doc/reference/tmpl/vte.sgml:
* doc/reference/tmpl/vteaccess.sgml: Docs updates.
* src/vte.c: (vte_terminal_init), (vte_terminal_finalize),
(vte_terminal_get_accessible), (vte_terminal_class_init):
Apply patch from Padraig O'Briain <padraig.obriain@sun.com>
to fix a crash. Closes bug #119913.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | doc/reference/tmpl/reaper.sgml | 3 | ||||
-rw-r--r-- | doc/reference/tmpl/vte-unused.sgml | 8 | ||||
-rw-r--r-- | doc/reference/tmpl/vte.sgml | 3 | ||||
-rw-r--r-- | doc/reference/tmpl/vteaccess.sgml | 3 | ||||
-rw-r--r-- | src/vte.c | 60 |
7 files changed, 59 insertions, 33 deletions
@@ -1,3 +1,15 @@ +2005-06-11 Kjartan Maraas <kmaraas@gnome.org> + + * NEWS: Update some. + * doc/reference/tmpl/reaper.sgml: + * doc/reference/tmpl/vte-unused.sgml: + * doc/reference/tmpl/vte.sgml: + * doc/reference/tmpl/vteaccess.sgml: Docs updates. + * src/vte.c: (vte_terminal_init), (vte_terminal_finalize), + (vte_terminal_get_accessible), (vte_terminal_class_init): + Apply patch from Padraig O'Briain <padraig.obriain@sun.com> + to fix a crash. Closes bug #119913. + 2005-06-09 Kjartan Maraas <kmaraas@gnome.org> * src/vte.c: (vte_terminal_style_changed): @@ -1,3 +1,6 @@ +0.11.14 - Fix a crasher on reparent (Michele Baldessari) + - Fix a crash in a11y related code (Padraig O'Briain) + 0.11.13 - Back out one of the previous patches from Fedora since it had issues (Reported by Warren Togami) - Reduce memory consumption with more that one tab a whole lot diff --git a/doc/reference/tmpl/reaper.sgml b/doc/reference/tmpl/reaper.sgml index e5c2fd6..b87c64d 100644 --- a/doc/reference/tmpl/reaper.sgml +++ b/doc/reference/tmpl/reaper.sgml @@ -20,6 +20,9 @@ a proxy for glib's own functionality. </para> +<!-- ##### SECTION Stability_Level ##### --> + + <!-- ##### STRUCT VteReaper ##### --> <para> This should not be accessed directly. diff --git a/doc/reference/tmpl/vte-unused.sgml b/doc/reference/tmpl/vte-unused.sgml index 1cc0f88..3198646 100644 --- a/doc/reference/tmpl/vte-unused.sgml +++ b/doc/reference/tmpl/vte-unused.sgml @@ -40,6 +40,10 @@ pty reaper.sgml +<!-- ##### SECTION ./tmpl/vte-unused.sgml:Stability_Level ##### --> + + + <!-- ##### SECTION ./tmpl/vtebg.sgml:Long_Description ##### --> <para> @@ -60,10 +64,6 @@ reaper.sgml VteBg -<!-- ##### SECTION Stability_Level ##### --> - - - <!-- ##### MACRO VTE_BG ##### --> <para> diff --git a/doc/reference/tmpl/vte.sgml b/doc/reference/tmpl/vte.sgml index 5d407f0..6cbc7e4 100644 --- a/doc/reference/tmpl/vte.sgml +++ b/doc/reference/tmpl/vte.sgml @@ -14,6 +14,9 @@ A VteTerminal is a terminal emulator implemented as a GTK2 widget. </para> +<!-- ##### SECTION Stability_Level ##### --> + + <!-- ##### STRUCT VteTerminal ##### --> <para> All of these fields should be considered read-only. diff --git a/doc/reference/tmpl/vteaccess.sgml b/doc/reference/tmpl/vteaccess.sgml index c8db0c5..892dd97 100644 --- a/doc/reference/tmpl/vteaccess.sgml +++ b/doc/reference/tmpl/vteaccess.sgml @@ -14,6 +14,9 @@ Accessibility peer of #VteTerminal. </para> +<!-- ##### SECTION Stability_Level ##### --> + + <!-- ##### STRUCT VteTerminalAccessible ##### --> <para> This should not be accessed directly. Use the #AtkText interface instead. @@ -353,8 +353,6 @@ struct _VteTerminalPrivate { PangoAttrList *im_preedit_attrs; int im_preedit_cursor; - /* Our accessible peer. */ - gpointer accessible; gboolean accessible_emit; /* Adjustment updates pending. */ @@ -496,6 +494,8 @@ static void vte_terminal_stop_processing (VteTerminal *terminal); static void vte_terminal_start_processing (VteTerminal *terminal); static gboolean vte_terminal_is_processing (VteTerminal *terminal); +static gpointer parent_class; + /* Free a no-longer-used row data array. */ static void vte_free_row_data(gpointer freeing, gpointer data) @@ -11525,8 +11525,6 @@ vte_terminal_init(VteTerminal *terminal, gpointer *klass) G_CALLBACK(vte_terminal_style_changed), NULL); - /* Our accessible peer. */ - pvt->accessible = NULL; pvt->accessible_emit = FALSE; #ifdef VTE_DEBUG @@ -12010,21 +12008,6 @@ vte_terminal_finalize(GObject *object) _vte_termcap_free(terminal->pvt->termcap); terminal->pvt->termcap = NULL; - /* Shut down accessibility. */ - if (terminal->pvt->accessible != NULL) { - g_object_remove_weak_pointer(G_OBJECT(terminal->pvt->accessible), - &terminal->pvt->accessible); -#ifdef VTE_DEBUG - if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) { - fprintf(stderr, "Accessible peer has refcount %d " - "before we unref it.\n", - (G_OBJECT(terminal->pvt->accessible))->ref_count); - } -#endif - g_object_unref(G_OBJECT(terminal->pvt->accessible)); - terminal->pvt->accessible = NULL; - } - /* Done with our private data. */ g_free(terminal->pvt); terminal->pvt = NULL; @@ -14193,21 +14176,39 @@ vte_terminal_scroll(GtkWidget *widget, GdkEventScroll *event) static AtkObject * vte_terminal_get_accessible(GtkWidget *widget) { - AtkObject *access; VteTerminal *terminal; + static gboolean first_time = TRUE; + g_return_val_if_fail(VTE_IS_TERMINAL(widget), NULL); terminal = VTE_TERMINAL(widget); - if (terminal->pvt->accessible != NULL) { - access = terminal->pvt->accessible; - } else { - access = vte_terminal_accessible_new(terminal); - if (ATK_IS_OBJECT(access)) { - terminal->pvt->accessible = access; - g_object_add_weak_pointer(G_OBJECT(access), - &terminal->pvt->accessible); + + if (first_time) { + AtkObjectFactory *factory; + AtkRegistry *registry; + GType derived_type; + GType derived_atk_type; + + /* + * Figure out whether accessibility is enabled by looking at the + * type of the accessible object which would be created for + * the parent type of VteTerminal. + */ + derived_type = g_type_parent (VTE_TYPE_TERMINAL); + + registry = atk_get_default_registry (); + factory = atk_registry_get_factory (registry, + derived_type); + + derived_atk_type = atk_object_factory_get_accessible_type (factory); + if (g_type_is_a (derived_atk_type, GTK_TYPE_ACCESSIBLE)) { + atk_registry_set_factory_type (registry, + VTE_TYPE_TERMINAL, + vte_terminal_accessible_factory_get_type ()); } + first_time = FALSE; } - return access; + + return GTK_WIDGET_CLASS (parent_class)->get_accessible (widget); } /* Initialize methods. */ @@ -14231,6 +14232,7 @@ vte_terminal_class_init(VteTerminalClass *klass, gconstpointer data) gobject_class = G_OBJECT_CLASS(klass); widget_class = GTK_WIDGET_CLASS(klass); + parent_class = g_type_class_peek_parent (klass); /* Override some of the default handlers. */ gobject_class->finalize = vte_terminal_finalize; widget_class->realize = vte_terminal_realize; |