aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-object.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-01-04 16:00:14 -0600
committerTed Gould <ted@gould.cx>2011-01-04 16:00:14 -0600
commit5de24f6cd9603be1649278a09eeacf1c01c1f8d2 (patch)
tree798540cc243d8450e3f703d5a6bc60c1754236f9 /libindicator/indicator-object.c
parent949766634a89457fe0477938e189352cba93c163 (diff)
downloadlibayatana-indicator-5de24f6cd9603be1649278a09eeacf1c01c1f8d2.tar.gz
libayatana-indicator-5de24f6cd9603be1649278a09eeacf1c01c1f8d2.tar.bz2
libayatana-indicator-5de24f6cd9603be1649278a09eeacf1c01c1f8d2.zip
Adding a function to check whether we should show the indicator with priority.
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r--libindicator/indicator-object.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index c1aa6af..7469cb9 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -453,6 +453,30 @@ indicator_object_get_location (IndicatorObject * io, IndicatorObjectEntry * entr
}
/**
+ indicator_object_get_show_now:
+ @io: #IndicatorObject to query
+ @entry: The #IndicatorObjectEntry to look for.
+
+ This function returns whether the entry should be shown with
+ priority on the panel. If the object does not support checking
+ it assumes that its entries should never have priority.
+
+ Return value: Whether the entry should be shown with priority.
+*/
+guint
+indicator_object_get_show_now (IndicatorObject * io, IndicatorObjectEntry * entry)
+{
+ g_return_val_if_fail(INDICATOR_IS_OBJECT(io), 0);
+ IndicatorObjectClass * class = INDICATOR_OBJECT_GET_CLASS(io);
+
+ if (class->get_show_now) {
+ return class->get_show_now(io, entry);
+ }
+
+ return FALSE;
+}
+
+/**
indicator_object_entry_activate:
@io: #IndicatorObject to query
@entry: The #IndicatorObjectEntry whose entry was shown