diff options
| author | Ted Gould <ted@gould.cx> | 2011-01-09 14:14:58 -0600 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2011-01-09 14:14:58 -0600 |
| commit | 6b2531c09d6344f0bfd39c7d4cb2a9b8aef060e3 (patch) | |
| tree | 9250c9437f9b803dbd5813a95a57f0bf12b42c0b /libindicator/indicator-object.c | |
| parent | 356af1c196e3416444a14380eb5e25e999feb56d (diff) | |
| parent | 8d3f43fcf3a1cbf9f325360fa0f97f576ff7b002 (diff) | |
| download | libayatana-indicator-6b2531c09d6344f0bfd39c7d4cb2a9b8aef060e3.tar.gz libayatana-indicator-6b2531c09d6344f0bfd39c7d4cb2a9b8aef060e3.tar.bz2 libayatana-indicator-6b2531c09d6344f0bfd39c7d4cb2a9b8aef060e3.zip | |
* Upstream Merge:
* GDBus Port
Diffstat (limited to 'libindicator/indicator-object.c')
| -rw-r--r-- | libindicator/indicator-object.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 41484a6..7469cb9 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -59,6 +59,7 @@ enum { ENTRY_MOVED, SCROLL, MENU_SHOW, + SHOW_NOW_CHANGED, LAST_SIGNAL }; @@ -181,6 +182,24 @@ indicator_object_class_init (IndicatorObjectClass *klass) _indicator_object_marshal_VOID__POINTER_UINT, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); + /** + IndicatorObject::show-now-changed: + @arg0: The #IndicatorObject object + @arg1: A pointer to the #IndicatorObjectEntry that + is changing it's state + @arg2: The state of whether the entry should be shown + + Whether the entry should be shown or not has changed so we need + to tell whoever is displaying it. + */ + signals[SHOW_NOW_CHANGED] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IndicatorObjectClass, show_now_changed), + NULL, NULL, + _indicator_object_marshal_VOID__POINTER_BOOLEAN, + G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); + return; } @@ -434,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 |
