diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-01-25 18:11:07 +0100 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-01-25 18:11:07 +0100 |
commit | 39cf870292e40bd72a16fc10b20135e294d4e269 (patch) | |
tree | 7d4114d3446297cc9a87a658b5540986f716fa0e /tests/dummy-indicator-signaler.c | |
parent | 1baaf2880f44fea4519f323e3da425318af6c688 (diff) | |
download | libayatana-indicator-39cf870292e40bd72a16fc10b20135e294d4e269.tar.gz libayatana-indicator-39cf870292e40bd72a16fc10b20135e294d4e269.tar.bz2 libayatana-indicator-39cf870292e40bd72a16fc10b20135e294d4e269.zip |
Tests: update dummy signaler to work with real IndicatorObjectEntry
This fixes a crash due to the parent/unparent.
Diffstat (limited to 'tests/dummy-indicator-signaler.c')
-rw-r--r-- | tests/dummy-indicator-signaler.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/dummy-indicator-signaler.c b/tests/dummy-indicator-signaler.c index c7a5c1f..9908d3d 100644 --- a/tests/dummy-indicator-signaler.c +++ b/tests/dummy-indicator-signaler.c @@ -110,9 +110,20 @@ idle_signal (gpointer data) { DummyIndicatorSignaler * self = DUMMY_INDICATOR_SIGNALER(data); - g_signal_emit(G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED_ID, 0, GUINT_TO_POINTER(5), TRUE); - g_signal_emit(G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID, 0, GUINT_TO_POINTER(5), TRUE); - g_signal_emit(G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED_ID, 0, GUINT_TO_POINTER(5), 0, 1, TRUE); + IndicatorObjectEntry *added_entry, *removed_entry, *moved_entry; + IndicatorObjectEntry *entries = g_new0(IndicatorObjectEntry, 3); + + added_entry = &entries[0]; + moved_entry = &entries[1]; + removed_entry = &entries[2]; + + added_entry->name_hint = "added"; + moved_entry->name_hint = "moved"; + removed_entry->name_hint = "removed"; + + g_signal_emit(G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED_ID, 0, added_entry); + g_signal_emit(G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED_ID, 0, moved_entry, 0, 1); + g_signal_emit(G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID, 0, removed_entry); return FALSE; /* Don't queue again */ } |