diff options
author | Yu Mengjie <meng-jie.yu@sun.com> | 2005-04-07 15:42:28 +0800 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2005-04-07 15:42:28 +0800 |
commit | c6bef0e314761fa7cd51619b0987bb6d2d8095a6 (patch) | |
tree | 1cf50de136338361a5df2d635517983b6e81ccf8 /a11y | |
parent | bb04d01d10caf278941ae3edf88e9913aeac4c3b (diff) | |
download | gsoc2013-evolution-c6bef0e314761fa7cd51619b0987bb6d2d8095a6.tar gsoc2013-evolution-c6bef0e314761fa7cd51619b0987bb6d2d8095a6.tar.gz gsoc2013-evolution-c6bef0e314761fa7cd51619b0987bb6d2d8095a6.tar.bz2 gsoc2013-evolution-c6bef0e314761fa7cd51619b0987bb6d2d8095a6.tar.lz gsoc2013-evolution-c6bef0e314761fa7cd51619b0987bb6d2d8095a6.tar.xz gsoc2013-evolution-c6bef0e314761fa7cd51619b0987bb6d2d8095a6.tar.zst gsoc2013-evolution-c6bef0e314761fa7cd51619b0987bb6d2d8095a6.zip |
return proper atk_object name and atk_stateset to avoid crash.
2005-04-06 Yu Mengjie <meng-jie.yu@sun.com>
* addressbook/ea-minicard-view.c: (ea_minicard_view_get_name),
(ea_minicard_view_ref_state_set):
return proper atk_object name and atk_stateset to avoid crash.
* addressbook/ea-minicard.c: (ea_minicard_get_name),
(ea_minicard_ref_state_set):
return proper atk_object name and atk_stateset to avoid crash.
Fixes #74404
svn path=/trunk/; revision=29177
Diffstat (limited to 'a11y')
-rw-r--r-- | a11y/ChangeLog | 12 | ||||
-rw-r--r-- | a11y/addressbook/ea-minicard-view.c | 8 | ||||
-rw-r--r-- | a11y/addressbook/ea-minicard.c | 8 |
3 files changed, 24 insertions, 4 deletions
diff --git a/a11y/ChangeLog b/a11y/ChangeLog index e9c173661d..44113cf288 100644 --- a/a11y/ChangeLog +++ b/a11y/ChangeLog @@ -1,3 +1,15 @@ +2005-04-06 Yu Mengjie <meng-jie.yu@sun.com> + + * addressbook/ea-minicard-view.c: (ea_minicard_view_get_name), + (ea_minicard_view_ref_state_set): + return proper atk_object name and atk_stateset to avoid crash. + + * addressbook/ea-minicard.c: (ea_minicard_get_name), + (ea_minicard_ref_state_set): + return proper atk_object name and atk_stateset to avoid crash. + + Fixes #74404 + 2005-02-23 Li Yuan <li.yuan@sun.com> Fix for 72897 and 72797. diff --git a/a11y/addressbook/ea-minicard-view.c b/a11y/addressbook/ea-minicard-view.c index 1170448576..b66dd6585e 100644 --- a/a11y/addressbook/ea-minicard-view.c +++ b/a11y/addressbook/ea-minicard-view.c @@ -146,6 +146,9 @@ ea_minicard_view_get_name (AtkObject *accessible) reflow = E_REFLOW(atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible))); + if (!reflow) + return NULL; + string = g_strdup_printf (ngettext ("current addressbook folder has %d card", "current addressbook folder has %d cards", reflow->count), reflow->count); @@ -206,10 +209,11 @@ static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj) state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj); if( !state_set ) - return NULL; + state_set = atk_state_set_new (); + gobj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj)); if( !gobj ) - return NULL; + return state_set; atk_state_set_add_state (state_set, ATK_STATE_ENABLED); atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE); diff --git a/a11y/addressbook/ea-minicard.c b/a11y/addressbook/ea-minicard.c index ec8b7f2056..2bde576ab3 100644 --- a/a11y/addressbook/ea-minicard.c +++ b/a11y/addressbook/ea-minicard.c @@ -132,6 +132,9 @@ ea_minicard_get_name (AtkObject *accessible) card = E_MINICARD(atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible))); + if (!card) + return NULL; + g_object_get (card->header_text, "text", &string, NULL); if (e_contact_get (card->contact, E_CONTACT_IS_LIST)) @@ -189,10 +192,11 @@ static AtkStateSet *ea_minicard_ref_state_set (AtkObject *obj) state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj); if( !state_set ) - return NULL; + state_set = atk_state_set_new (); + gobj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj)); if( !gobj ) - return NULL; + return state_set; atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE); atk_state_set_add_state (state_set, ATK_STATE_ENABLED); |