aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libindicator/indicator-object.c24
-rw-r--r--libindicator/indicator-object.h1
2 files changed, 25 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
diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index 3491e1f..6072f4f 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -148,6 +148,7 @@ IndicatorObject * indicator_object_new_from_file (const gchar * file);
GList * indicator_object_get_entries (IndicatorObject * io);
guint indicator_object_get_location (IndicatorObject * io, IndicatorObjectEntry * entry);
+guint indicator_object_get_show_now (IndicatorObject * io, IndicatorObjectEntry * entry);
void indicator_object_entry_activate (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp);
G_END_DECLS