aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-12 11:40:50 -0600
committerTed Gould <ted@gould.cx>2010-01-12 11:40:50 -0600
commit40d3056382d3856f8e22d0bd6d2a4f4a411917f2 (patch)
tree2741e428ba822ee481475ec3425d53e2c8d450d0
parentb2198be3bc7c5135e4bf206d3eff1e5838fdbc84 (diff)
downloadayatana-indicator-application-40d3056382d3856f8e22d0bd6d2a4f4a411917f2.tar.gz
ayatana-indicator-application-40d3056382d3856f8e22d0bd6d2a4f4a411917f2.tar.bz2
ayatana-indicator-application-40d3056382d3856f8e22d0bd6d2a4f4a411917f2.zip
Start timer fallback
-rw-r--r--src/libappindicator/app-indicator.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index e3de406..63f69c9 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -127,6 +127,7 @@ static void app_indicator_get_property (GObject * object, guint prop_id, GValue
/* Other stuff */
static void check_connect (AppIndicator * self);
static void register_service_cb (DBusGProxy * proxy, GError * error, gpointer data);
+static void start_fallback_timer (AppIndicator * self, gboolean do_it_now);
static GtkStatusIcon * fallback (AppIndicator * self);
static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon);
@@ -557,8 +558,8 @@ check_connect (AppIndicator *self)
&error);
if (error != NULL) {
g_warning("Unable to create Ayatana Watcher proxy! %s", error->message);
- /* TODO: This is where we should start looking at fallbacks */
g_error_free(error);
+ start_fallback_timer(self, FALSE);
return;
}
@@ -576,6 +577,7 @@ register_service_cb (DBusGProxy * proxy, GError * error, gpointer data)
g_warning("Unable to connect to the Notification Watcher: %s", error->message);
g_object_unref(G_OBJECT(priv->watcher_proxy));
priv->watcher_proxy = NULL;
+ start_fallback_timer(APP_INDICATOR(data), TRUE);
}
return;
}
@@ -589,6 +591,18 @@ category_from_enum (AppIndicatorCategory category)
return value->value_nick;
}
+/* A function that will start the fallback timer if it's not
+ already started. It sets up the DBus watcher to see if
+ there is a change. Also, provides an override mode for cases
+ where it's unlikely that a timer will help anything. */
+static void
+start_fallback_timer (AppIndicator * self, gboolean do_it_now)
+{
+
+
+
+}
+
/* Creates a StatusIcon that can be used when the application
indicator area isn't available. */
static GtkStatusIcon *