aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-11-10 18:15:17 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-11-10 18:15:17 +0800
commit1b70a8153b256b9e07d89ad735099de036006cf5 (patch)
tree5c9c9b4ea81b917a5c43dd475330066f7f695317 /calendar
parent1c36faf822e6370396e4737b00133e8f702572e3 (diff)
downloadgsoc2013-evolution-1b70a8153b256b9e07d89ad735099de036006cf5.tar
gsoc2013-evolution-1b70a8153b256b9e07d89ad735099de036006cf5.tar.gz
gsoc2013-evolution-1b70a8153b256b9e07d89ad735099de036006cf5.tar.bz2
gsoc2013-evolution-1b70a8153b256b9e07d89ad735099de036006cf5.tar.lz
gsoc2013-evolution-1b70a8153b256b9e07d89ad735099de036006cf5.tar.xz
gsoc2013-evolution-1b70a8153b256b9e07d89ad735099de036006cf5.tar.zst
gsoc2013-evolution-1b70a8153b256b9e07d89ad735099de036006cf5.zip
fixes #321088.
svn path=/trunk/; revision=30592
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog10
-rw-r--r--calendar/gui/e-meeting-time-sel.c34
2 files changed, 26 insertions, 18 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 4cdaea1b3d..12ebe10fce 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,13 @@
+2005-11-10 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #321088
+ * gui/e-meeting-time-sel.c (e_meeting_time_selector_construct):
+ (e_meeting_time_selector_style_set),
+ (e_meeting_time_selector_ensure_meeting_time_shown): Set the
+ scroll_increment to days width. Show only 35 days in the canvas
+ since we query freebusy only for those. Set the canvas view to
+ meetings day start instead of time.
+
2005-11-09 Veerapuram Varadhan <vvaradhan@novell.com>
Committing for Nathan Owens <pianocomp81@yahoo.com>
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 0d9e93dc3e..46c8deb2f5 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -82,10 +82,10 @@ const gchar *EMeetingTimeSelectorHours12[24] = {
};
/* The number of days shown in the entire canvas. */
-#define E_MEETING_TIME_SELECTOR_DAYS_SHOWN 365
-#define E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE 60
-#define E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE 7
-#define E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER 28
+#define E_MEETING_TIME_SELECTOR_DAYS_SHOWN 35
+#define E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE 7
+#define E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE 7
+#define E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER 28
/* This is the number of pixels between the mouse has to move before the
scroll speed is incremented. */
@@ -382,7 +382,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (sw), GTK_LAYOUT (mts->display_main)->vadjustment);
mts->hscrollbar = gtk_hscrollbar_new (GTK_LAYOUT (mts->display_main)->hadjustment);
- GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->col_width;
+ GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->day_width;
gtk_table_attach (GTK_TABLE (mts), mts->hscrollbar,
1, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show (mts->hscrollbar);
@@ -951,7 +951,7 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
gtk_widget_set_usize (mts->attendees_vbox_spacer, 1, mts->row_height * 2 - 6);
- GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->col_width;
+ GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->day_width;
GTK_LAYOUT (mts->display_main)->vadjustment->step_increment = mts->row_height;
g_object_unref (layout);
@@ -2675,7 +2675,7 @@ e_meeting_time_selector_ensure_meeting_time_shown (EMeetingTimeSelector *mts)
{
gint start_x, end_x, scroll_x, scroll_y, canvas_width;
gint new_scroll_x;
- gboolean fits_in_canvas;
+ EMeetingTime time;
/* Check if we need to change the range of dates shown. */
if (g_date_compare (&mts->meeting_start_time.date,
@@ -2688,23 +2688,21 @@ e_meeting_time_selector_ensure_meeting_time_shown (EMeetingTimeSelector *mts)
}
/* If all of the meeting time is visible, just return. */
- e_meeting_time_selector_get_meeting_time_positions (mts, &start_x,
- &end_x);
+ if (e_meeting_time_selector_get_meeting_time_positions (mts, &start_x,
+ &end_x)) {
+ time.date = mts->meeting_start_time.date;
+ time.hour = 0;
+ time.minute = 0;
+ start_x = e_meeting_time_selector_calculate_time_position (mts, &time);
+ }
+
gnome_canvas_get_scroll_offsets (GNOME_CANVAS (mts->display_main),
&scroll_x, &scroll_y);
canvas_width = mts->display_main->allocation.width;
if (start_x > scroll_x && end_x <= scroll_x + canvas_width)
return;
- fits_in_canvas = end_x - start_x < canvas_width ? TRUE : FALSE;
-
- /* If the meeting is not entirely visible, either center it if it is
- smaller than the canvas, or show the start of it if it is big. */
- if (fits_in_canvas) {
- new_scroll_x = (start_x + end_x - canvas_width) / 2;
- } else {
- new_scroll_x = start_x;
- }
+ new_scroll_x = start_x;
gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_main),
new_scroll_x, scroll_y);
}