From 70d0a4d38b318a28abe7d6397c83c5b7ecb55c57 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Fri, 11 Feb 2011 07:53:12 +1100 Subject: Use the ACCESSIBLE_DESC_UPDATE signal to refresh the accessible description. --- src/indicator-application.c | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/src/indicator-application.c b/src/indicator-application.c index 785f0b6..086692e 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -734,33 +734,9 @@ application_accessible_desc_changed (IndicatorApplication * application, gint po } if (signal_reload) { - /* Telling the listener that this has been removed, and then - readded to make it reparse the entry. */ - if (app->entry.label != NULL) { - gtk_widget_hide(GTK_WIDGET(app->entry.label)); - } - - if (app->entry.image != NULL) { - gtk_widget_hide(GTK_WIDGET(app->entry.image)); - } - - if (app->entry.menu != NULL) { - gtk_menu_detach(app->entry.menu); - } - - g_signal_emit(G_OBJECT(application), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID, 0, &(app->entry), TRUE); - - if (app->entry.label != NULL) { - gtk_widget_show(GTK_WIDGET(app->entry.label)); - } - - if (app->entry.image != NULL) { - indicator_image_helper_update(app->entry.image, app->longname); - gtk_widget_show(GTK_WIDGET(app->entry.image)); - } - - g_signal_emit(G_OBJECT(application), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED_ID, 0, &(app->entry), TRUE); - } + /* Unlike the label change, we don't need to remove and re-add + the indicator to update the accessible description. */ + g_signal_emit(G_OBJECT(application), INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, 0, &(app->entry), TRUE); return; -- cgit v1.2.3