diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-09-12 06:58:57 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2012-09-12 06:58:57 +0000 |
commit | 667fbafcfaf6c5368cf201ea7a435bc7ad5a4188 (patch) | |
tree | ec56a4f7aec66aac5f7ed70ca3c2079d0f74be88 /tests/dummy-indicator-visible.c | |
parent | b1beb2ccbcc04f6615b75375821c51ef4828ee24 (diff) | |
parent | 00d05564fe963f53d8f56601f0b2dad2834b9b00 (diff) | |
download | libayatana-indicator-667fbafcfaf6c5368cf201ea7a435bc7ad5a4188.tar.gz libayatana-indicator-667fbafcfaf6c5368cf201ea7a435bc7ad5a4188.tar.bz2 libayatana-indicator-667fbafcfaf6c5368cf201ea7a435bc7ad5a4188.zip |
In libindicator, remove the cloak/decloak code in IndicatorObject to address Bug #1045372.
In indicator-loader, support hiding & re-showing IndicatorObjectEntries by caching their menuitems and using gtk_widget_hide / gtk_widget_show.
In tests/test-loader and tests/dummy-indicator-visible.c, support hiding & re-showing IndicatorObjectEntries by caching their parent widgetry instead of using gtk_widget_destroy().. Fixes: https://bugs.launchpad.net/bugs/1045372. Approved by Lars Uebernickel, jenkins.
Diffstat (limited to 'tests/dummy-indicator-visible.c')
-rw-r--r-- | tests/dummy-indicator-visible.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/dummy-indicator-visible.c b/tests/dummy-indicator-visible.c index 0bb9e89..42cb59c 100644 --- a/tests/dummy-indicator-visible.c +++ b/tests/dummy-indicator-visible.c @@ -88,17 +88,25 @@ G_DEFINE_TYPE (DummyIndicatorVisible, dummy_indicator_visible, INDICATOR_OBJECT_ static void dummy_indicator_entry_being_removed (IndicatorObject * io, IndicatorObjectEntry * entry) { + IndicatorObjectClass * indicator_object_class = INDICATOR_OBJECT_CLASS (dummy_indicator_visible_parent_class); + g_object_set_data(G_OBJECT(entry->label), "is-hidden", GINT_TO_POINTER(1)); - INDICATOR_OBJECT_CLASS(dummy_indicator_visible_parent_class)->entry_being_removed (io, entry); + if (indicator_object_class->entry_being_removed != NULL) { + indicator_object_class->entry_being_removed (io, entry); + } } static void dummy_indicator_entry_was_added (IndicatorObject * io, IndicatorObjectEntry * entry) { + IndicatorObjectClass * indicator_object_class = INDICATOR_OBJECT_CLASS (dummy_indicator_visible_parent_class); + g_object_steal_data(G_OBJECT(entry->label), "is-hidden"); - INDICATOR_OBJECT_CLASS(dummy_indicator_visible_parent_class)->entry_was_added (io, entry); + if (indicator_object_class->entry_was_added != NULL) { + indicator_object_class->entry_was_added (io, entry); + } } static void |