aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Terry <mike@mterry.name>2011-01-13 11:03:04 -0600
committerMichael Terry <mike@mterry.name>2011-01-13 11:03:04 -0600
commit06e5e1461bdfb94064c512078728512402d3ee0b (patch)
tree60b3a2610d5874577ce455d005faac9192121088
parentdcde0f79bbbdce8245dfca3d55289905e76f00ad (diff)
downloadayatana-indicator-application-06e5e1461bdfb94064c512078728512402d3ee0b.tar.gz
ayatana-indicator-application-06e5e1461bdfb94064c512078728512402d3ee0b.tar.bz2
ayatana-indicator-application-06e5e1461bdfb94064c512078728512402d3ee0b.zip
don't second guess service's new application, which caused our positions to get out of sync with the service if it was a bit confused
-rw-r--r--src/indicator-application.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c
index 1de8785..5754ac4 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -381,22 +381,6 @@ get_location (IndicatorObject * io, IndicatorObjectEntry * entry)
return g_list_index(priv->applications, entry);
}
-/* Searching for ApplicationEntries where the dbusobject and
- address are the same. */
-static gint
-application_added_search (gconstpointer a, gconstpointer b)
-{
- ApplicationEntry * appa = (ApplicationEntry *)a;
- ApplicationEntry * appb = (ApplicationEntry *)b;
-
- if (g_strcmp0(appa->dbusaddress, appb->dbusaddress) == 0 &&
- g_strcmp0(appa->dbusobject, appb->dbusobject) == 0) {
- return 0;
- }
-
- return -1;
-}
-
/* Does a quick meausre of how big the string is in
pixels with a Pango layout */
static gint
@@ -444,22 +428,9 @@ static void
application_added (IndicatorApplication * application, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_theme_path, const gchar * label, const gchar * guide)
{
g_return_if_fail(IS_INDICATOR_APPLICATION(application));
- g_debug("Building new application entry: %s with icon: %s", dbusaddress, iconname);
+ g_debug("Building new application entry: %s with icon: %s at position %i", dbusaddress, iconname, position);
IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
- /* First search to see if we already have this entry */
- ApplicationEntry searchapp;
- searchapp.dbusaddress = (gchar *)dbusaddress; /* Casting off const, but it's okay, we're not changing it */
- searchapp.dbusobject = (gchar *)dbusobject; /* Casting off const, but it's okay, we're not changing it */
-
- GList * searchpointer = g_list_find_custom(priv->applications, &searchapp, application_added_search);
- if (searchpointer != NULL) {
- g_debug("\t...Already have that one.");
- ApplicationEntry * app = (ApplicationEntry *)searchpointer->data;
- app->old_service = FALSE;
- return;
- }
-
ApplicationEntry * app = g_new(ApplicationEntry, 1);
app->old_service = FALSE;