aboutsummaryrefslogtreecommitdiff
path: root/tests/test-libappindicator.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-12-04 14:48:18 -0600
committerTed Gould <ted@gould.cx>2009-12-04 14:48:18 -0600
commit549868147d2bbf6e68df4134d1a1c12d29691f25 (patch)
tree79ac792d56f3bee5a4090c5d85e61647e96380cf /tests/test-libappindicator.c
parent25d7d9956bb04408438d813cf222e3df59bd0518 (diff)
parent2906ee43d836d60912a8aa66f202a63cadc083d1 (diff)
downloadlibayatana-appindicator-549868147d2bbf6e68df4134d1a1c12d29691f25.tar.gz
libayatana-appindicator-549868147d2bbf6e68df4134d1a1c12d29691f25.tar.bz2
libayatana-appindicator-549868147d2bbf6e68df4134d1a1c12d29691f25.zip
* Upstream release 0.0.2
* Updates API to use GTK instead of dbusmenu to make it easier for upstream developers to use.
Diffstat (limited to 'tests/test-libappindicator.c')
-rw-r--r--tests/test-libappindicator.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index 8b76d6e..896782d 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -42,7 +42,10 @@ test_libappindicator_prop_signals_helper (AppIndicator * ci, gboolean * signalac
void
test_libappindicator_prop_signals (void)
{
- AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE, NULL));
+ AppIndicator * ci = app_indicator_new ("test-app-indicator",
+ "indicator-messages",
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
g_assert(ci != NULL);
gboolean signaled = FALSE;
@@ -109,13 +112,13 @@ test_libappindicator_prop_signals (void)
void
test_libappindicator_init_set_props (void)
{
- AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE, NULL));
+ AppIndicator * ci = app_indicator_new ("my-id",
+ "my-name",
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
g_assert(ci != NULL);
- app_indicator_set_id(ci, "my-id");
- app_indicator_set_category(ci, APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
app_indicator_set_status(ci, APP_INDICATOR_STATUS_ACTIVE);
- app_indicator_set_icon(ci, "my-name");
app_indicator_set_attention_icon(ci, "my-attention-name");
g_assert(!g_strcmp0("my-id", app_indicator_get_id(ci)));
@@ -131,13 +134,13 @@ test_libappindicator_init_set_props (void)
void
test_libappindicator_init_with_props (void)
{
- AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE,
- "id", "my-id",
- "category-enum", APP_INDICATOR_CATEGORY_APPLICATION_STATUS,
- "status-enum", APP_INDICATOR_STATUS_ACTIVE,
- "icon-name", "my-name",
- "attention-icon-name", "my-attention-name",
- NULL));
+ AppIndicator * ci = app_indicator_new ("my-id",
+ "my-name",
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
+ app_indicator_set_status (ci, APP_INDICATOR_STATUS_ACTIVE);
+ app_indicator_set_attention_icon (ci, "my-attention-name");
+
g_assert(ci != NULL);
g_assert(!g_strcmp0("my-id", app_indicator_get_id(ci)));
@@ -153,7 +156,7 @@ test_libappindicator_init_with_props (void)
void
test_libappindicator_init (void)
{
- AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE, NULL));
+ AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_assert(ci != NULL);
g_object_unref(G_OBJECT(ci));
return;