aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-application.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-21 13:59:25 -0600
committerTed Gould <ted@gould.cx>2010-01-21 13:59:25 -0600
commitf2b83652616aa17c85728eb7539d03500525b969 (patch)
treef73ea19bcf3e8f4af5e4d94d085a22b8fdc7291e /src/indicator-application.c
parent38e8cebe7b5a6190bb504af82f483057327c1d25 (diff)
parenta9bf19636361c1d4a912db0a4d51d21d025b4640 (diff)
downloadlibayatana-appindicator-f2b83652616aa17c85728eb7539d03500525b969.tar.gz
libayatana-appindicator-f2b83652616aa17c85728eb7539d03500525b969.tar.bz2
libayatana-appindicator-f2b83652616aa17c85728eb7539d03500525b969.zip
Adding support for a file tracking add and touch times for applications for ordering them.
Diffstat (limited to 'src/indicator-application.c')
-rw-r--r--src/indicator-application.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c
index 5ed7a9e..3ef5688 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -92,6 +92,7 @@ static void indicator_application_init (IndicatorApplication *self);
static void indicator_application_dispose (GObject *object);
static void indicator_application_finalize (GObject *object);
static GList * get_entries (IndicatorObject * io);
+static guint get_location (IndicatorObject * io, IndicatorObjectEntry * entry);
static void connected (IndicatorServiceManager * sm, gboolean connected, IndicatorApplication * application);
static void application_added (DBusGProxy * proxy, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_path, IndicatorApplication * application);
static void application_removed (DBusGProxy * proxy, gint position , IndicatorApplication * application);
@@ -116,6 +117,7 @@ indicator_application_class_init (IndicatorApplicationClass *klass)
IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);
io_class->get_entries = get_entries;
+ io_class->get_location = get_location;
dbus_g_object_register_marshaller(_application_service_marshal_VOID__STRING_INT_STRING_STRING_STRING,
G_TYPE_NONE,
@@ -298,6 +300,15 @@ get_entries (IndicatorObject * io)
return retval;
}
+/* Finds the location of a specific entry */
+static guint
+get_location (IndicatorObject * io, IndicatorObjectEntry * entry)
+{
+ g_return_val_if_fail(IS_INDICATOR_APPLICATION(io), 0);
+ IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(io);
+ return g_list_index(priv->applications, entry);
+}
+
/* Here we respond to new applications by building up the
ApplicationEntry and signaling the indicator host that
we've got a new indicator. */