Commit eceb826e authored by Florian Brosch's avatar Florian Brosch Committed by Georges Basile Stavracas Neto

Whitespace changes

parent d51d1ea2
......@@ -38,70 +38,70 @@
typedef struct
{
GcalEvent *event;
GcalManager *manager;
GcalEvent *event;
GcalManager *manager;
} AsyncOpsData;
typedef struct
{
ECalDataModelSubscriber *subscriber;
gchar *query;
gchar *query;
guint sources_left;
gboolean passed_start;
gboolean search_done;
guint sources_left;
gboolean passed_start;
gboolean search_done;
} ViewStateData;
typedef struct
{
ECalClient *client;
gboolean connected;
ECalClient *client;
gboolean connected;
} GcalManagerUnit;
typedef struct
{
gchar *event_uid;
GcalManagerUnit *unit;
GcalManagerUnit *new_unit;
ECalComponent *new_component;
GcalManager *manager;
gchar *event_uid;
GcalManagerUnit *unit;
GcalManagerUnit *new_unit;
ECalComponent *new_component;
GcalManager *manager;
} MoveEventData;
struct _GcalManager
{
GObject parent;
GObject parent;
/**
* The list of clients we are managing.
* Each value is of type GCalStoreUnit
* And each key is the source uid
*/
GHashTable *clients;
GHashTable *clients;
ESourceRegistry *source_registry;
ESourceRegistry *source_registry;
ECredentialsPrompter *credentials_prompter;
ECalDataModel *e_data_model;
ECalDataModel *search_data_model;
ECalDataModel *e_data_model;
ECalDataModel *search_data_model;
ECalDataModel *shell_search_data_model;
ViewStateData *search_view_data;
ECalDataModel *shell_search_data_model;
ViewStateData *search_view_data;
GCancellable *async_ops;
GCancellable *async_ops;
GoaClient *goa_client;
GoaClient *goa_client;
GcalClock *clock;
GcalClock *clock;
/* state flags */
gboolean goa_client_ready;
gint sources_at_launch;
gboolean goa_client_ready;
gint sources_at_launch;
/* timezone */
icaltimezone *system_timezone;
icaltimezone *system_timezone;
/* property */
GSettings *settings;
GSettings *settings;
};
G_DEFINE_TYPE (GcalManager, gcal_manager, G_TYPE_OBJECT)
......@@ -131,12 +131,12 @@ static GParamSpec *properties[NUM_PROPS] = { NULL, };
/* -- start: threading related code provided by Milan Crha */
typedef struct {
EThreadJobFunc func;
gpointer user_data;
GDestroyNotify free_user_data;
EThreadJobFunc func;
gpointer user_data;
GDestroyNotify free_user_data;
GCancellable *cancellable;
GError *error;
GCancellable *cancellable;
GError *error;
} ThreadJobData;
static void
......@@ -175,7 +175,7 @@ thread_job_thread (gpointer user_data)
return g_thread_self ();
}
static GCancellable *
static GCancellable*
submit_thread_job (EThreadJobFunc func,
gpointer user_data,
GDestroyNotify free_user_data)
......
......@@ -35,10 +35,10 @@ typedef struct
struct _GcalSearchView
{
GtkPopover parent;
GtkPopover parent;
GtkWidget *listbox;
GtkWidget *stack;
GtkWidget *listbox;
GtkWidget *stack;
/* Since the user can have (literally)
* thousands of events, the usage of
......@@ -46,23 +46,23 @@ struct _GcalSearchView
* the RowEventData lookup constant
* time.
*/
GHashTable *uuid_to_event;
GHashTable *uuid_to_event;
/* misc */
gint no_results_timeout_id;
gint num_results;
gchar *field;
gchar *query;
time_t current_utc_date;
guint search_timeout_id;
gint no_results_timeout_id;
gint num_results;
gchar *field;
gchar *query;
time_t current_utc_date;
guint search_timeout_id;
/* property */
icaltimetype *date;
GcalManager *manager; /* weak reference */
icaltimetype *date;
GcalManager *manager; /* weak reference */
/* flags */
gboolean format_24h;
gboolean subscribed;
gboolean format_24h;
gboolean subscribed;
};
enum
......
......@@ -31,9 +31,9 @@
*/
typedef struct _GcalTimer
{
GSource parent;
gint64 last_event;
gint64 default_duration;
GSource parent;
gint64 last_event;
gint64 default_duration;
} GcalTimer;
......@@ -48,25 +48,24 @@ typedef struct _GcalTimer
*/
typedef struct
{
GcalTimer *timer; /* unowned */
GCalTimerFunc callback;
GDestroyNotify destroy_notify;
gpointer data;
GcalTimer *timer; /* unowned */
GCalTimerFunc callback;
GDestroyNotify destroy_notify;
gpointer data;
} CbWrapperData;
static void timer_func_destroy_notify_wrapper (CbWrapperData *wrapper);
static void timer_func_destroy_notify_wrapper (CbWrapperData *wrapper);
static gboolean timer_func_wrapper (CbWrapperData *wrapper);
static gboolean timer_func_wrapper (CbWrapperData *wrapper);
static gboolean timer_source_dispatch (GcalTimer *self,
GSourceFunc callback,
CbWrapperData *user_data);
static gboolean timer_source_dispatch (GcalTimer *self,
GSourceFunc callback,
CbWrapperData *user_data);
static void schedule_next (GcalTimer *self);
static void timer_source_finalize (GcalTimer *self);
static void schedule_next (GcalTimer *self);
static void timer_source_finalize (GcalTimer *self);
......@@ -82,8 +81,6 @@ timer_func_destroy_notify_wrapper (CbWrapperData *wrapper)
g_free (wrapper);
}
static gboolean
timer_func_wrapper (CbWrapperData *wrapper)
{
......@@ -95,8 +92,6 @@ timer_func_wrapper (CbWrapperData *wrapper)
return G_SOURCE_CONTINUE;
}
static gboolean
timer_source_dispatch (GcalTimer *self,
GSourceFunc user_callback,
......@@ -115,8 +110,6 @@ timer_source_dispatch (GcalTimer *self,
return result;
}
static void
schedule_next (GcalTimer *self)
{
......@@ -135,8 +128,6 @@ schedule_next (GcalTimer *self)
g_source_set_ready_time ((GSource*) self, 0);
}
static void
timer_source_finalize (GcalTimer *self)
{
......@@ -182,8 +173,6 @@ gcal_timer_new (gint64 default_duration)
return g_steal_pointer (&self);
}
/**
* gcal_timer_set_start:
* @self: The #GcalTimer.
......@@ -200,8 +189,6 @@ gcal_timer_start (GcalTimer *self)
schedule_next (self);
}
/**
* gcal_timer_set_reset:
* @self: The #GcalTimer.
......@@ -218,8 +205,6 @@ gcal_timer_reset (GcalTimer *self)
schedule_next (self);
}
/**
* gcal_timer_set_stop:
* @self: The #GcalTimer.
......@@ -235,8 +220,6 @@ gcal_timer_stop (GcalTimer *self)
g_source_set_ready_time ((GSource*) self, -1);
}
/**
* gcal_timer_is_running
* @self: The #GcalTimer.
......@@ -251,8 +234,6 @@ gcal_timer_is_running (GcalTimer *self)
return g_source_get_ready_time ((GSource*) self) >= 0;
}
/**
* gcal_timer_set_duration:
* @self: The #GcalTimer.
......@@ -280,8 +261,6 @@ gcal_timer_set_default_duration (GcalTimer *self,
schedule_next (self);
}
/**
* gcal_timer_get_default_duration:
* @self: The #GcalTimer.
......@@ -296,7 +275,6 @@ gcal_timer_get_default_duration (GcalTimer *self)
return self->default_duration;
}
/**
* gcal_timer_set_callback:
* @self: The #GcalTimer.
......@@ -330,7 +308,6 @@ gcal_timer_set_callback (GcalTimer *self,
(GDestroyNotify) timer_func_destroy_notify_wrapper);
}
/**
* gcal_timer_free:
* @self: The #GcalTimer.
......
......@@ -28,27 +28,27 @@ typedef struct _GcalTimer GcalTimer;
typedef void (*GCalTimerFunc) (GcalTimer *self, gpointer data);
GcalTimer* gcal_timer_new (gint64 default_duration);
GcalTimer* gcal_timer_new (gint64 default_duration);
void gcal_timer_start (GcalTimer *self);
void gcal_timer_start (GcalTimer *self);
void gcal_timer_reset (GcalTimer *self);
void gcal_timer_reset (GcalTimer *self);
void gcal_timer_stop (GcalTimer *self);
void gcal_timer_stop (GcalTimer *self);
gboolean gcal_timer_is_running (GcalTimer *self);
gboolean gcal_timer_is_running (GcalTimer *self);
void gcal_timer_set_default_duration (GcalTimer *self,
gint64 duration);
void gcal_timer_set_default_duration (GcalTimer *self,
gint64 duration);
gint64 gcal_timer_get_default_duration (GcalTimer *self);
gint64 gcal_timer_get_default_duration (GcalTimer *self);
void gcal_timer_set_callback (GcalTimer *self,
GCalTimerFunc func,
gpointer data,
GDestroyNotify notify);
void gcal_timer_set_callback (GcalTimer *self,
GCalTimerFunc func,
gpointer data,
GDestroyNotify notify);
void gcal_timer_free (GcalTimer *self);
void gcal_timer_free (GcalTimer *self);
#endif /* __GCAL_TIMER_H__ */
......@@ -70,99 +70,100 @@ typedef enum
GCAL_WEEK_DAY_SATURDAY = 1 << 6
} GcalWeekDay;
GType icaltime_get_type (void) G_GNUC_CONST;
GType icaltime_get_type (void) G_GNUC_CONST;
gint datetime_compare_date (GDateTime *dt1,
GDateTime *dt2);
gint datetime_compare_date (GDateTime *dt1,
GDateTime *dt2);
icaltimetype* datetime_to_icaltime (GDateTime *dt);
icaltimetype* datetime_to_icaltime (GDateTime *dt);
gboolean datetime_is_date (GDateTime *dt);
gboolean datetime_is_date (GDateTime *dt);
GDateTime* icaltime_to_datetime (const icaltimetype *date);
GDateTime* icaltime_to_datetime (const icaltimetype *date);
icaltimetype* gcal_dup_icaltime (const icaltimetype *date);
icaltimetype* gcal_dup_icaltime (const icaltimetype *date);
gchar* gcal_get_weekday (gint i);
gchar* gcal_get_weekday (gint i);
gchar* gcal_get_month_name (gint i);
gchar* gcal_get_month_name (gint i);
cairo_surface_t*gcal_get_surface_from_color (GdkRGBA *color,
gint size);
cairo_surface_t* gcal_get_surface_from_color (GdkRGBA *color,
gint size);
cairo_surface_t*get_circle_surface_from_color (GdkRGBA *color,
gint size);
cairo_surface_t* get_circle_surface_from_color (GdkRGBA *color,
gint size);
void get_color_name_from_source (ESource *source,
GdkRGBA *out_color);
void get_color_name_from_source (ESource *source,
GdkRGBA *out_color);
gchar* get_desc_from_component (ECalComponent *component,
const gchar *joint_char);
gchar* get_desc_from_component (ECalComponent *component,
const gchar *joint_char);
gchar* get_uuid_from_component (ESource *source,
ECalComponent *component);
gchar* get_uuid_from_component (ESource *source,
ECalComponent *component);
gint get_first_weekday (void);
gint get_first_weekday (void);
ECalComponent* build_component_from_details (const gchar *summary,
GDateTime *initial_date,
GDateTime *final_date);
ECalComponent* build_component_from_details (const gchar *summary,
GDateTime *initial_date,
GDateTime *final_date);
gint icaltime_compare_date (const icaltimetype *date1,
const icaltimetype *date2);
gint icaltime_compare_date (const icaltimetype *date1,
const icaltimetype *date2);
gint icaltime_compare_with_current (const icaltimetype *date1,
const icaltimetype *date2,
time_t *current_time_t);
gint icaltime_compare_with_current (const icaltimetype *date1,
const icaltimetype *date2,
time_t *current_time_t);
GDateTime* get_start_of_week (icaltimetype *date);
GDateTime* get_start_of_week (icaltimetype *date);
GDateTime* get_end_of_week (icaltimetype *date);
GDateTime* get_end_of_week (icaltimetype *date);
gboolean is_clock_format_24h (void);
gboolean is_clock_format_24h (void);
/* code brought from evolution */
gsize e_strftime_fix_am_pm (gchar *str,
gsize max,
const gchar *fmt,
const struct tm *tm);
gsize e_utf8_strftime_fix_am_pm (gchar *str,
gsize e_strftime_fix_am_pm (gchar *str,
gsize max,
const gchar *fmt,
const struct tm *tm);
gsize max,
const gchar *fmt,
const struct tm *tm);
gsize e_utf8_strftime_fix_am_pm (gchar *str,
gsize max,
const gchar *fmt,
const struct tm *tm);
void fix_popover_menu_icons (GtkPopover *popover);
void fix_popover_menu_icons (GtkPopover *popover);
void get_source_parent_name_color (GcalManager *manager,
ESource *source,
gchar **name,
gchar **color);
gchar* format_utc_offset (gint64 offset);
void get_source_parent_name_color (GcalManager *manager,
ESource *source,
gchar **name,
gchar **color);
gint get_alarm_trigger_minutes (GcalEvent *event,
ECalComponentAlarm *alarm);
gchar* format_utc_offset (gint64 offset);
gboolean should_change_date_for_scroll (gdouble *scroll_value,
GdkEventScroll *scroll_event);
gint get_alarm_trigger_minutes (GcalEvent *event,
ECalComponentAlarm *alarm);
gboolean is_source_enabled (ESource *source);
gboolean should_change_date_for_scroll (gdouble *scroll_value,
GdkEventScroll *scroll_event);
gboolean ask_recurrence_modification_type (GtkWidget *parent,
GcalRecurrenceModType *modtype,
ESource *source);
gboolean is_source_enabled (ESource *source);
gboolean is_workday (guint day);
gboolean ask_recurrence_modification_type (GtkWidget *parent,
GcalRecurrenceModType *modtype,
ESource *source);
GList* filter_event_list_by_uid_and_modtype (GList *widgets,
GcalRecurrenceModType mod,
const gchar *uid);
gboolean is_workday (guint day);
gboolean gcal_translate_child_window_position (GtkWidget *target,
GdkWindow *child_window,
gdouble src_x,
gdouble src_y,
gdouble *real_x,
gdouble *real_y);
GList* filter_event_list_by_uid_and_modtype (GList *widgets,
GcalRecurrenceModType mod,
const gchar *uid);
gboolean gcal_translate_child_window_position (GtkWidget *target,
GdkWindow *child_window,
gdouble src_x,
gdouble src_y,
gdouble *real_x,
gdouble *real_y);
#endif /* __GCAL_UTILS_H__ */
......@@ -21,15 +21,6 @@
#include <string.h>
#include "gcal-weather-info.h"
static void gcal_weather_info_set_date (GcalWeatherInfo *self,
GDate *date);
static void gcal_weather_info_set_temperature (GcalWeatherInfo *self,
const gchar *temperature);
static void gcal_weather_info_set_icon_name (GcalWeatherInfo *self,
const gchar *icon_name);
/* _GcalWeatherInfo:
* @date: (not nullable): The day this information belongs to.
......@@ -51,6 +42,15 @@ struct _GcalWeatherInfo {
};
static void gcal_weather_info_set_date (GcalWeatherInfo *self,
GDate *date);
static void gcal_weather_info_set_temperature (GcalWeatherInfo *self,
const gchar *temperature);
static void gcal_weather_info_set_icon_name (GcalWeatherInfo *self,
const gchar *icon_name);
G_DEFINE_TYPE (GcalWeatherInfo, gcal_weather_info, G_TYPE_OBJECT)
enum {
......@@ -79,8 +79,6 @@ gcal_weather_info_finalize (GObject *object)
G_OBJECT_CLASS (gcal_weather_info_parent_class)->finalize (object);
}
static void
gcal_weather_info_get_property (GObject *object,
guint property_id,
......@@ -107,8 +105,6 @@ gcal_weather_info_get_property (GObject *object,
}
}
static void
gcal_weather_info_set_property (GObject *object,
guint property_id,
......@@ -138,8 +134,6 @@ gcal_weather_info_set_property (GObject *object,
}
}
static void
gcal_weather_info_class_init (GcalWeatherInfoClass *klass)
{
......@@ -185,8 +179,6 @@ gcal_weather_info_class_init (GcalWeatherInfoClass *klass)
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
static void
gcal_weather_info_init (GcalWeatherInfo *self)
{
......@@ -215,8 +207,6 @@ gcal_weather_info_set_date (GcalWeatherInfo *self,
self->date = *date;
}
/* gcal_weather_info_set_temperature:
* @self: A #GcalWeatherInfo instance.
* @temperature: A weather string.
......@@ -238,9 +228,7 @@ gcal_weather_info_set_temperature (GcalWeatherInfo *self,
}
}
/* gcal_weather_info_set_icon_name:
/* gcal_weather_info_set_icon_name:
* @self: A #GcalWeatherInfo instance.
* @icon_name: The name of the icon to display.
*
......@@ -262,6 +250,7 @@ gcal_weather_info_set_icon_name (GcalWeatherInfo *self,
}
/* < public > */
/**
......@@ -293,8 +282,6 @@ gcal_weather_info_new (GDate *date,
return info;
}
/**
* gcal_weather_info_get_date:
* @self: A #GcalWeatherInfo instance.
......@@ -311,8 +298,6 @@ gcal_weather_info_get_date (GcalWeatherInfo *self,
*date = self->date;
}
/**
* gcal_weather_info_get_icon_name:
* @self: A #GcalWeatherInfo instance.
......@@ -327,8 +312,6 @@ gcal_weather_info_get_icon_name (GcalWeatherInfo *self)
return self->icon_name;
}
/**
* gcal_weather_info_get_temperature:
* @self: A #GcalWeatherInfo instance.
......
......@@ -30,19 +30,19 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GcalWeatherInfo, gcal_weather_info, GCAL, WEATHER_INFO, GObject)
GcalWeatherInfo* gcal_weather_info_new (GDate *date,
const gchar *icon_name,
const gchar *temperature);
GcalWeatherInfo* gcal_weather_info_new (GDate *date,
const gchar *icon_name,
const gchar *temperature);
void gcal_weather_info_get_date (GcalWeatherInfo *self,
GDate *date);
void gcal_weather_info_get_date (GcalWeatherInfo *self,
GDate *date);
void gcal_weather_info_get_date (GcalWeatherInfo *self,
GDate *date);
void gcal_weather_info_get_date (GcalWeatherInfo *self,
GDate *date);
const gchar* gcal_weather_info_get_icon_name (GcalWeatherInfo *self);
const gchar* gcal_weather_info_get_icon_name (GcalWeatherInfo *self);
const gchar* gcal_weather_info_get_temperature (GcalWeatherInfo *self);
const gchar* gcal_weather_info_get_temperature (GcalWeatherInfo *self);
G_END_DECLS
......
This diff is collapsed.
......@@ -37,37 +37,35 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GcalWeatherService, gcal_weather_service, GCAL, WEATHER_SERVICE, GObject)
GcalWeatherService* gcal_weather_service_new (GTimeZone *time_zone,
guint max_days,
guint check_interval_new,
guint check_interval_renew,
gint64 valid_timespan);
GcalWeatherService* gcal_weather_service_new (GTimeZone *time_zone,
guint max_days,
guint check_interval_new,
guint check_interval_renew,
gint64 valid_timespan);
GTimeZone* gcal_weather_service_get_time_zone (GcalWeatherService *self);
GTimeZone* gcal_weather_service_get_time_zone (GcalWeatherService *self);
void gcal_weather_service_set_time_zone (GcalWeatherService *self,
GTimeZone *value);
void gcal_weather_service_set_time_zone (GcalWeatherService *self,
GTimeZone *value);
void gcal_weather_service_run (GcalWeatherService *self,
GWeatherLocation *location);
guint gcal_weather_service_get_max_days (GcalWeatherService *self);
void gcal_weather_service_stop (GcalWeatherService *self);
gint64 gcal_weather_service_get_valid_timespan (GcalWeatherService *self);
guint gcal_weather_service_get_max_days (GcalWeatherService *self);
guint gcal_weather_service_get_check_interval_new (GcalWeatherService *self);
gint64 gcal_weather_service_get_valid_timespan (GcalWeatherService *self);
guint gcal_weather_service_get_check_interval_renew (GcalWeatherService *self);
guint gcal_weather_service_get_check_interval_new
(GcalWeatherService *self);
GSList* gcal_weather_service_get_weather_infos (GcalWeatherService *self);
guint gcal_weather_service_get_check_interval_renew
(GcalWeatherService *self);
const gchar* gcal_weather_service_get_attribution (GcalWeatherService *self);
GSList* gcal_weather_service_get_weather_infos (GcalWeatherService *self);
void gcal_weather_service_update (GcalWeatherService *self);
const gchar* gcal_weather_service_get_attribution (GcalWeatherService *self);
void gcal_weather_service_run (GcalWeatherService *self,
GWeatherLocation *location);
void gcal_weather_service_update (GcalWeatherService *self);
void gcal_weather_service_stop (GcalWeatherService *self);
G_END_DECLS
......
<
......@@ -84,16 +84,16 @@
typedef struct
{
gint x;
gint y;
GDateTime *start_date;
GDateTime *end_date;
gint x;
gint y;