aboutsummaryrefslogtreecommitdiff
path: root/src/libappindicator/app-indicator.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-11 14:05:24 -0600
committerTed Gould <ted@gould.cx>2010-01-11 14:05:24 -0600
commitd8c7246f702c687b4f532cfb66c5eeb545aa175d (patch)
tree1bf5b1f729d872da9808e33ba2d88bff9587e700 /src/libappindicator/app-indicator.c
parent2a913873186288d10321fc13de7565a198da568c (diff)
downloadlibayatana-appindicator-d8c7246f702c687b4f532cfb66c5eeb545aa175d.tar.gz
libayatana-appindicator-d8c7246f702c687b4f532cfb66c5eeb545aa175d.tar.bz2
libayatana-appindicator-d8c7246f702c687b4f532cfb66c5eeb545aa175d.zip
Setting the fallback functions so that we can go round trip on setting up this API.
Diffstat (limited to 'src/libappindicator/app-indicator.c')
-rw-r--r--src/libappindicator/app-indicator.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 7560a97..9f0ca54 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -64,8 +64,9 @@ struct _AppIndicatorPrivate {
gchar *icon_name;
gchar *attention_icon_name;
gchar * icon_path;
- DbusmenuServer *menuservice;
- GtkWidget *menu;
+ DbusmenuServer *menuservice;
+ GtkWidget *menu;
+ GtkStatusIcon * status_icon;
/* Fun stuff */
DBusGProxy *watcher_proxy;
@@ -122,6 +123,8 @@ 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 GtkStatusIcon * fallback (AppIndicator * self);
+static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon);
/* GObject type */
G_DEFINE_TYPE (AppIndicator, app_indicator, G_TYPE_OBJECT);
@@ -141,6 +144,10 @@ app_indicator_class_init (AppIndicatorClass *klass)
object_class->set_property = app_indicator_set_property;
object_class->get_property = app_indicator_get_property;
+ /* Our own funcs */
+ klass->fallback = fallback;
+ klass->unfallback = unfallback;
+
/* Properties */
g_object_class_install_property (object_class,
PROP_ID,
@@ -568,6 +575,24 @@ category_from_enum (AppIndicatorCategory category)
return value->value_nick;
}
+/* Creates a StatusIcon that can be used when the application
+ indicator area isn't available. */
+static GtkStatusIcon *
+fallback (AppIndicator * self)
+{
+
+ return NULL;
+}
+
+/* Removes the status icon as the application indicator area
+ is now up and running again. */
+static void
+unfallback (AppIndicator * self, GtkStatusIcon * status_icon)
+{
+
+ return;
+}
+
/* ************************* */
/* Public Functions */