From e897e7aa9fb18fc83d177acab1dd18e0284429a6 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 12 May 2013 20:45:21 -0500 Subject: minor documentation & #include cleanups to the timezone classes --- src/timezone-file.c | 4 +--- src/timezone-file.h | 7 ++----- src/timezone-geoclue.c | 7 ------- src/timezone-geoclue.h | 6 +----- src/timezone.h | 15 +++++++++++---- 5 files changed, 15 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/timezone-file.c b/src/timezone-file.c index 3a83c5a..2adf2ca 100644 --- a/src/timezone-file.c +++ b/src/timezone-file.c @@ -19,9 +19,7 @@ #include "config.h" -#include -#include -#include +#include /* GFile, GFileMonitor */ #include "timezone-file.h" diff --git a/src/timezone-file.h b/src/timezone-file.h index 7186beb..b02abe1 100644 --- a/src/timezone-file.h +++ b/src/timezone-file.h @@ -20,9 +20,6 @@ #ifndef __INDICATOR_DATETIME_TIMEZONE_FILE__H__ #define __INDICATOR_DATETIME_TIMEZONE_FILE__H__ -#include -#include - #include "timezone.h" /* parent class */ G_BEGIN_DECLS @@ -39,8 +36,8 @@ typedef struct _IndicatorDatetimeTimezoneFileClass IndicatorDatetimeTimezoneFi GType indicator_datetime_timezone_file_get_type (void); /** - * An implementation of IndicatorDatetimeTimezone which determines the timezone - * from monitoring a local file, such as /etc/timezone + * An IndicatorDatetimeTimezone which uses a local file, + * such as /etc/timezone, to determine the timezone. */ struct _IndicatorDatetimeTimezoneFile { diff --git a/src/timezone-geoclue.c b/src/timezone-geoclue.c index 5271945..4c3c7d8 100644 --- a/src/timezone-geoclue.c +++ b/src/timezone-geoclue.c @@ -19,9 +19,6 @@ #include "config.h" -#include -#include - #include #include @@ -128,10 +125,6 @@ on_client_created (GeoclueMaster * master, g_warning ("%s Unable to get timezone from GeoClue: %s", G_STRFUNC, error->message); g_error_free (error); } - else if (client == NULL) - { - g_warning ("%s Unable to get timezone from GeoClue: %s", G_STRFUNC, error->message); - } else { IndicatorDatetimeTimezoneGeoclue * self = INDICATOR_DATETIME_TIMEZONE_GEOCLUE (gself); diff --git a/src/timezone-geoclue.h b/src/timezone-geoclue.h index fcb3ab7..059bd81 100644 --- a/src/timezone-geoclue.h +++ b/src/timezone-geoclue.h @@ -20,9 +20,6 @@ #ifndef __INDICATOR_DATETIME_TIMEZONE_GEOCLUE__H__ #define __INDICATOR_DATETIME_TIMEZONE_GEOCLUE__H__ -#include -#include - #include "timezone.h" /* parent class */ G_BEGIN_DECLS @@ -39,8 +36,7 @@ typedef struct _IndicatorDatetimeTimezoneGeoclueClass IndicatorDatetimeTimezon GType indicator_datetime_timezone_geoclue_get_type (void); /** - * An implementation of IndicatorDatetimeTimezone which determines the timezone - * from calling a GeoClue service over DBus. + * An IndicatorDatetimeTimezone which uses GeoClue to determine the timezone. */ struct _IndicatorDatetimeTimezoneGeoclue { diff --git a/src/timezone.h b/src/timezone.h index ac48e6e..cadeb6f 100644 --- a/src/timezone.h +++ b/src/timezone.h @@ -21,7 +21,7 @@ #define __INDICATOR_DATETIME_TIMEZONE__H__ #include -#include +#include /* parent class */ G_BEGIN_DECLS @@ -36,8 +36,17 @@ typedef struct _IndicatorDatetimeTimezoneClass IndicatorDatetimeTimezoneClass; GType indicator_datetime_timezone_get_type (void); +#define INDICATOR_DATETIME_TIMEZONE_PROPERTY_TIMEZONE "timezone" + /** - * Abstract Base Class for the mechanisms that determine timezone by location + * Abstract Base Class for objects that provide a timezone. + * + * This is used in datetime to determine the user's current timezone + * so that it can be displayed more prominently in the locations + * section of the indicator's menu. + * + * This class has a 'timezone' property that clients can watch + * for change notifications. */ struct _IndicatorDatetimeTimezone { @@ -57,8 +66,6 @@ struct _IndicatorDatetimeTimezoneClass **** ***/ -#define INDICATOR_DATETIME_TIMEZONE_PROPERTY_TIMEZONE "timezone" - const char * indicator_datetime_timezone_get_timezone (IndicatorDatetimeTimezone *); void indicator_datetime_timezone_notify_timezone (IndicatorDatetimeTimezone *); -- cgit v1.2.3