diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-06-28 14:30:33 -0400 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-06-28 14:30:33 -0400 |
commit | e744e385675fb948ffd888668c22ea93c706e1fa (patch) | |
tree | 9307463becafe5928be717262bd30a2bbdc8bb49 /libindicator/indicator-object.c | |
parent | 3470db7e3e7df1c4490f9faa3eb2df7df9a630eb (diff) | |
download | libayatana-indicator-e744e385675fb948ffd888668c22ea93c706e1fa.tar.gz libayatana-indicator-e744e385675fb948ffd888668c22ea93c706e1fa.tar.bz2 libayatana-indicator-e744e385675fb948ffd888668c22ea93c706e1fa.zip |
Allow indicators to tell the panel where they want to appear
Only implemented in IndicatorNg right now, which gets that information from the
indicator file.
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r-- | libindicator/indicator-object.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 30a6543..1a4ed17 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -115,6 +115,7 @@ static GList * get_entries_default (IndicatorObject*); static GList * get_all_entries (IndicatorObject*); static void indicator_object_entry_being_removed (IndicatorObject*, IndicatorObjectEntry*); static void indicator_object_entry_was_added (IndicatorObject*, IndicatorObjectEntry*); +static gint indicator_object_real_get_position (IndicatorObject*); static IndicatorObjectEntryPrivate * entry_get_private (IndicatorObject*, IndicatorObjectEntry*); G_DEFINE_TYPE (IndicatorObject, indicator_object, G_TYPE_OBJECT); @@ -141,6 +142,7 @@ indicator_object_class_init (IndicatorObjectClass *klass) klass->get_location = NULL; klass->entry_being_removed = NULL; klass->entry_was_added = NULL; + klass->get_position = indicator_object_real_get_position; klass->entry_activate = NULL; klass->entry_activate_window = NULL; @@ -778,6 +780,14 @@ indicator_object_entry_was_added (IndicatorObject * io, IndicatorObjectEntry * e } } +static gint +indicator_object_real_get_position (IndicatorObject *io) +{ + g_return_if_fail (INDICATOR_IS_OBJECT (io)); + + return -1; +} + /** indicator_object_set_environment: @io: #IndicatorObject to set on @@ -942,3 +952,11 @@ indicator_object_entry_is_visible (IndicatorObject * io, IndicatorObjectEntry * return entry_get_private (io, entry)->visibility == ENTRY_VISIBLE; } + +gint +indicator_object_get_position (IndicatorObject *io) +{ + g_return_val_if_fail (INDICATOR_IS_OBJECT (io), FALSE); + + return INDICATOR_OBJECT_GET_CLASS (io)->get_position (io); +} |