[gnome-calendar] gcal-days-grid: fixed cell order in:marked signal
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] gcal-days-grid: fixed cell order in:marked signal
- Date: Thu, 4 Dec 2014 22:29:16 +0000 (UTC)
commit 24ffb7f13df41f6964285fa4d20af1e492a6ce98
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Sat Jul 27 13:56:16 2013 -0400
gcal-days-grid: fixed cell order in:marked signal
The ordering of the cell is done here to make it transparent
t0o gcal-day-view and gcal-week-view.
src/gcal-days-grid.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-days-grid.c b/src/gcal-days-grid.c
index 9693807..96adc9d 100644
--- a/src/gcal-days-grid.c
+++ b/src/gcal-days-grid.c
@@ -854,6 +854,8 @@ gcal_days_grid_button_release_event (GtkWidget *widget,
gint height_block;
gint left_pad;
+ gint cell_temp;
+
priv = gcal_days_grid_get_instance_private (GCAL_DAYS_GRID (widget));
if (priv->clicked_cell == -1)
@@ -879,6 +881,13 @@ gcal_days_grid_button_release_event (GtkWidget *widget,
gtk_widget_queue_draw (widget);
+ if (priv->start_mark_cell > priv->end_mark_cell)
+ {
+ cell_temp = priv->end_mark_cell;
+ priv->end_mark_cell = priv->start_mark_cell;
+ priv->start_mark_cell = cell_temp;
+ }
+
g_signal_emit (GCAL_DAYS_GRID (widget),
signals[MARKED], 0,
priv->start_mark_cell, priv->end_mark_cell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]