diff options
author | Ted Gould <ted@canonical.com> | 2009-06-11 12:06:09 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-06-11 12:06:09 -0500 |
commit | bac4397f4f402d3588b9fb6153bab8e6f320f8b7 (patch) | |
tree | ef482717119715f9787ba298ddcecb563322cc0c /src/status-service.c | |
parent | 9b6dcf5696d59e6b6004b8631f4a136f5b90c1d5 (diff) | |
download | ayatana-indicator-session-bac4397f4f402d3588b9fb6153bab8e6f320f8b7.tar.gz ayatana-indicator-session-bac4397f4f402d3588b9fb6153bab8e6f320f8b7.tar.bz2 ayatana-indicator-session-bac4397f4f402d3588b9fb6153bab8e6f320f8b7.zip |
Moving the enum into the provider object and changing the name everywhere.
Diffstat (limited to 'src/status-service.c')
-rw-r--r-- | src/status-service.c | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/src/status-service.c b/src/status-service.c index cd131a4..e839b16 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -9,32 +9,22 @@ #include "dbus-shared-names.h" -typedef enum -{ - STATUS_SERVICE_STATUS_ONLINE, - STATUS_SERVICE_STATUS_AWAY, - STATUS_SERVICE_STATUS_DND, - STATUS_SERVICE_STATUS_INVISIBLE, - STATUS_SERVICE_STATUS_OFFLINE, - /* Leave as last */ - STATUS_SERVICE_STATUS_LAST -} -StatusServiceStatus; - -static const gchar * status_strings [STATUS_SERVICE_STATUS_LAST] = { - /* STATUS_SERVICE_STATUS_ONLINE, */ N_("Available"), - /* STATUS_SERVICE_STATUS_AWAY, */ N_("Away"), - /* STATUS_SERVICE_STATUS_DND */ N_("Busy"), - /* STATUS_SERVICE_STATUS_INVISIBLE */ N_("Invisible"), - /* STATUS_SERVICE_STATUS_OFFLINE, */ N_("Offline") +#include "status-provider.h" + +static const gchar * status_strings [STATUS_PROVIDER_STATUS_LAST] = { + /* STATUS_PROVIDER_STATUS_ONLINE, */ N_("Available"), + /* STATUS_PROVIDER_STATUS_AWAY, */ N_("Away"), + /* STATUS_PROVIDER_STATUS_DND */ N_("Busy"), + /* STATUS_PROVIDER_STATUS_INVISIBLE */ N_("Invisible"), + /* STATUS_PROVIDER_STATUS_OFFLINE, */ N_("Offline") }; -static const gchar * status_icons[STATUS_SERVICE_STATUS_LAST] = { - /* STATUS_SERVICE_STATUS_ONLINE, */ "user-online", - /* STATUS_SERVICE_STATUS_AWAY, */ "user-away", - /* STATUS_SERVICE_STATUS_DND, */ "user-busy", - /* STATUS_SERVICE_STATUS_INVISIBLE, */ "user-invisible", - /* STATUS_SERVICE_STATUS_OFFLINE */ "user-offline" +static const gchar * status_icons[STATUS_PROVIDER_STATUS_LAST] = { + /* STATUS_PROVIDER_STATUS_ONLINE, */ "user-online", + /* STATUS_PROVIDER_STATUS_AWAY, */ "user-away", + /* STATUS_PROVIDER_STATUS_DND, */ "user-busy", + /* STATUS_PROVIDER_STATUS_INVISIBLE, */ "user-invisible", + /* STATUS_PROVIDER_STATUS_OFFLINE */ "user-offline" }; @@ -44,7 +34,7 @@ static GMainLoop * mainloop = NULL; static void menu_click (DbusmenuMenuitem * mi, gpointer data) { - StatusServiceStatus stat = (StatusServiceStatus)GPOINTER_TO_INT(data); + StatusProviderStatus status = (StatusProviderStatus)GPOINTER_TO_INT(data); } @@ -54,8 +44,8 @@ build_menu (gpointer data) DbusmenuMenuitem * root = DBUSMENU_MENUITEM(data); g_return_val_if_fail(root != NULL, FALSE); - StatusServiceStatus i; - for (i = STATUS_SERVICE_STATUS_ONLINE; i < STATUS_SERVICE_STATUS_LAST; i++) { + StatusProviderStatus i; + for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) { DbusmenuMenuitem * mi = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set(mi, "label", _(status_strings[i])); |