Whitespace changes

This commit is contained in:
Florian Brosch
2017-12-11 22:13:16 -02:00
committed by Georges Basile Stavracas Neto
parent d51d1ea2cd
commit eceb826e77
14 changed files with 1275 additions and 1370 deletions
+23 -23
View File
@@ -48,57 +48,57 @@
*/
typedef struct
{
GcalWeatherInfo *winfo; /* owned */
GdkPixbuf *icon_buf; /* owned */
GcalWeatherInfo *winfo; /* owned */
GdkPixbuf *icon_buf; /* owned */
} WeatherInfoDay;
struct _GcalWeekHeader
{
GtkGrid parent;
GtkGrid parent;
GtkWidget *grid;
GtkWidget *month_label;
GtkWidget *week_label;
GtkWidget *year_label;
GtkWidget *scrolledwindow;
GtkWidget *expand_button;
GtkWidget *expand_button_box;
GtkWidget *expand_button_image;
GtkWidget *header_labels_box;
GtkWidget *grid;
GtkWidget *month_label;
GtkWidget *week_label;
GtkWidget *year_label;
GtkWidget *scrolledwindow;
GtkWidget *expand_button;
GtkWidget *expand_button_box;
GtkWidget *expand_button_image;
GtkWidget *header_labels_box;
GcalManager *manager;
GcalManager *manager;
/*
* Stores the events as they come from the week-view
* The list will later be iterated after the active date is changed
* and the events will be placed
*/
GList *events[7];
GtkWidget *overflow_label[7];
GList *events[7];
GtkWidget *overflow_label[7];
gint first_weekday;
gint first_weekday;
/*
* Used for checking if the header is in collapsed state or expand state
* false is collapse state true is expand state
*/
gboolean expanded;
gboolean expanded;
gboolean use_24h_format;
gboolean use_24h_format;
icaltimetype *active_date;
icaltimetype *active_date;
gint selection_start;
gint selection_end;
gint dnd_cell;
gint selection_start;
gint selection_end;
gint dnd_cell;
GcalWeatherService *weather_service; /* unowned, nullable */
/* Array of nullable weather infos for each day, starting with Sunday. */
WeatherInfoDay weather_infos[7];
GtkSizeGroup *sizegroup;
GtkSizeGroup *sizegroup;
};
typedef enum
+12 -12
View File
@@ -43,39 +43,39 @@ static const double dashed [] =
struct _GcalWeekView
{
GtkBox parent;
GtkBox parent;
GtkWidget *header;
GtkWidget *hours_bar;
GtkWidget *scrolled_window;
GtkWidget *week_grid;
GtkWidget *header;
GtkWidget *hours_bar;
GtkWidget *scrolled_window;
GtkWidget *week_grid;
/*
* first day of the week according to user locale, being
* 0 for Sunday, 1 for Monday and so on
*/
gint first_weekday;
gint first_weekday;
/*
* clock format from GNOME desktop settings
*/
gboolean use_24h_format;
gboolean use_24h_format;
/* property */
icaltimetype *date;
GcalManager *manager; /* owned */
GcalWeatherService *weather_service; /* owned */
guint scroll_grid_timeout_id;
guint scroll_grid_timeout_id;
gint clicked_cell;
gint clicked_cell;
};
static void schedule_position_scroll (GcalWeekView *self);
static void schedule_position_scroll (GcalWeekView *self);
static void gcal_view_interface_init (GcalViewInterface *iface);
static void gcal_view_interface_init (GcalViewInterface *iface);
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
enum
{
+43 -42
View File
@@ -35,90 +35,90 @@
typedef struct
{
/* month span from 0 to 11 */
gint start_day, start_month;
gint end_day, end_month;
gint hovered_day, hovered_month;
gint dnd_day, dnd_month;
gint start_day, start_month;
gint end_day, end_month;
gint hovered_day, hovered_month;
gint dnd_day, dnd_month;
} ButtonData;
typedef struct
{
gdouble box_side;
GdkPoint coordinates [12];
gdouble box_side;
GdkPoint coordinates [12];
} GridData;
struct _GcalYearView
{
GtkBox parent;
GtkBox parent;
/* composite, GtkBuilder's widgets */
GtkWidget *navigator;
GtkWidget *sidebar;
GtkWidget *events_sidebar;
GtkWidget *navigator_stack;
GtkWidget *no_events_title;
GtkWidget *navigator_sidebar;
GtkWidget *scrolled_window;
GtkLabel *temp_label; /* unowned */
GtkImage *weather_icon; /* unowned */
GtkWidget *navigator;
GtkWidget *sidebar;
GtkWidget *events_sidebar;
GtkWidget *navigator_stack;
GtkWidget *no_events_title;
GtkWidget *navigator_sidebar;
GtkWidget *scrolled_window;
GtkLabel *temp_label; /* unowned */
GtkImage *weather_icon; /* unowned */
GtkWidget *popover; /* Popover for popover_mode */
GtkWidget *popover; /* Popover for popover_mode */
/* manager singleton */
GcalManager *manager;
GcalManager *manager;
GcalWeatherService *weather_service; /* owned, nullable */
/* range shown on the sidebar */
icaltimetype *start_selected_date;
icaltimetype *end_selected_date;
icaltimetype *start_selected_date;
icaltimetype *end_selected_date;
/* geometry info */
GridData *navigator_grid;
guint number_of_columns;
guint column_width;
guint row_height;
guint header_height;
guint sidebar_width;
GridData *navigator_grid;
guint number_of_columns;
guint column_width;
guint row_height;
guint header_height;
guint sidebar_width;
/* state flags */
gboolean popover_mode;
gboolean button_pressed;
ButtonData *selected_data;
gboolean popover_mode;
gboolean button_pressed;
ButtonData *selected_data;
/**
* first day of the week according to user locale, being
* 0 for Sunday, 1 for Monday and so on
*/
gint first_weekday;
gint first_weekday;
/* first and last weeks of the year */
guint first_week_of_year;
guint last_week_of_year;
guint first_week_of_year;
guint last_week_of_year;
/* Storage for the accumulated scrolling */
gdouble scroll_value;
gdouble scroll_value;
/**
* clock format from GNOME desktop settings
*/
gboolean use_24h_format;
gboolean use_24h_format;
/* show week numbers from GNOME Shell settings */
GSettings *calendar_settings;
gboolean show_week_numbers;
GSettings *calendar_settings;
gboolean show_week_numbers;
/* text direction factors */
gint k;
gint k;
/* date property */
icaltimetype *date;
icaltimetype *date;
/*
* Array with the events at every month. Events
* that span multiple months are added multiple
* times to the array.
*/
GPtrArray *events[12];
GPtrArray *events[12];
};
enum {
@@ -139,9 +139,10 @@ enum
static guint signals[NUM_SIGNALS] = { 0, };
static gpointer year_view_parent_class = NULL;
static void gcal_view_interface_init (GcalViewInterface *iface);
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
static void update_weather (GcalYearView *self);
static void gcal_view_interface_init (GcalViewInterface *iface);
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
static void update_weather (GcalYearView *self);
G_DEFINE_TYPE_WITH_CODE (GcalYearView, gcal_year_view, GTK_TYPE_BOX,
G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init)
+8 -6
View File
@@ -31,12 +31,14 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GcalYearView, gcal_year_view, GCAL, YEAR_VIEW, GtkBox)
void gcal_year_view_set_first_weekday (GcalYearView *year_view,
gint nr_day);
void gcal_year_view_set_use_24h_format (GcalYearView *year_view,
gboolean use_24h_format);
void gcal_year_view_set_current_date (GcalYearView *year_view,
icaltimetype *current_date);
void gcal_year_view_set_first_weekday (GcalYearView *year_view,
gint nr_day);
void gcal_year_view_set_use_24h_format (GcalYearView *year_view,
gboolean use_24h_format);
void gcal_year_view_set_current_date (GcalYearView *year_view,
icaltimetype *current_date);
G_END_DECLS