diff options
Diffstat (limited to 'applets')
-rw-r--r-- | applets/clock/clock-location-tile.c | 6 | ||||
-rw-r--r-- | applets/clock/clock-location-tile.h | 30 |
2 files changed, 11 insertions, 25 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index 5e3e0985..c7cee4b7 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -69,7 +69,7 @@ clock_location_tile_new (ClockLocation *loc, ClockLocationTile *this; ClockLocationTilePrivate *priv; - this = g_object_new (CLOCK_LOCATION_TILE_TYPE, NULL); + this = g_object_new (CLOCK_TYPE_LOCATION_TILE, NULL); priv = clock_location_tile_get_instance_private (this); @@ -556,7 +556,7 @@ clock_location_tile_refresh (ClockLocationTile *this, gboolean force_refresh) long offset; int format; - g_return_if_fail (IS_CLOCK_LOCATION_TILE (this)); + g_return_if_fail (CLOCK_IS_LOCATION_TILE (this)); if (clock_location_is_current (priv->location)) { gtk_widget_hide (priv->current_spacer); @@ -760,7 +760,7 @@ clock_location_tile_get_location (ClockLocationTile *this) { ClockLocationTilePrivate *priv; - g_return_val_if_fail (IS_CLOCK_LOCATION_TILE (this), NULL); + g_return_val_if_fail (CLOCK_IS_LOCATION_TILE (this), NULL); priv = clock_location_tile_get_instance_private (this); diff --git a/applets/clock/clock-location-tile.h b/applets/clock/clock-location-tile.h index 62bc160c..ac0f7cb2 100644 --- a/applets/clock/clock-location-tile.h +++ b/applets/clock/clock-location-tile.h @@ -8,31 +8,18 @@ #include "clock-location.h" #include "clock-utils.h" -#ifdef __cplusplus -extern "C" { -#endif - -#define CLOCK_LOCATION_TILE_TYPE (clock_location_tile_get_type ()) -#define CLOCK_LOCATION_TILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CLOCK_LOCATION_TILE_TYPE, ClockLocationTile)) -#define CLOCK_LOCATION_TILE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), CLOCK_LOCATION_TILE_TYPE, ClockLocationTileClass)) -#define IS_CLOCK_LOCATION_TILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CLOCK_LOCATION_TILE_TYPE)) -#define IS_CLOCK_LOCATION_TILE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), CLOCK_LOCATION_TILE_TYPE)) -#define CLOCK_LOCATION_TILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CLOCK_LOCATION_TILE_TYPE, ClockLocationTileClass)) - -typedef struct -{ - GtkBin parent; -} ClockLocationTile; +G_BEGIN_DECLS + +#define CLOCK_TYPE_LOCATION_TILE (clock_location_tile_get_type ()) +G_DECLARE_DERIVABLE_TYPE (ClockLocationTile, clock_location_tile, CLOCK, LOCATION_TILE, GtkBin) -typedef struct +struct _ClockLocationTileClass { GtkBinClass parent_class; void (* tile_pressed) (ClockLocationTile *tile); int (* need_clock_format) (ClockLocationTile *tile); -} ClockLocationTileClass; - -GType clock_location_tile_get_type (void); +}; ClockLocationTile *clock_location_tile_new (ClockLocation *loc, ClockFaceSize size); @@ -45,7 +32,6 @@ void weather_info_setup_tooltip (GWeatherInfo *info, ClockLocation *location, Gt void clock_location_tile_refresh (ClockLocationTile *this, gboolean force_refresh); -#ifdef __cplusplus -} -#endif +G_END_DECLS + #endif /* __CLOCK_H__ */ |