aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-10-24 04:22:35 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-10-24 04:22:35 +0800
commit174691b2120977e983fcf63bdde0e48c402ba69a (patch)
tree08e81a329d2f5f5fec016e3fdde7d989f29b4536
parent445801489ea9a022e17020470f1441171b6d8175 (diff)
downloadgsoc2013-evolution-174691b2120977e983fcf63bdde0e48c402ba69a.tar
gsoc2013-evolution-174691b2120977e983fcf63bdde0e48c402ba69a.tar.gz
gsoc2013-evolution-174691b2120977e983fcf63bdde0e48c402ba69a.tar.bz2
gsoc2013-evolution-174691b2120977e983fcf63bdde0e48c402ba69a.tar.lz
gsoc2013-evolution-174691b2120977e983fcf63bdde0e48c402ba69a.tar.xz
gsoc2013-evolution-174691b2120977e983fcf63bdde0e48c402ba69a.tar.zst
gsoc2013-evolution-174691b2120977e983fcf63bdde0e48c402ba69a.zip
adjust the display canvas when the table scrolls
2001-10-23 JP Rosevear <jpr@ximian.com> * gui/e-meeting-time-sel.c (e_meeting_time_selector_table_vadjustment_changed): adjust the display canvas when the table scrolls (e_meeting_time_selector_construct): listen for table scrolling svn path=/trunk/; revision=13951
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-meeting-time-sel.c21
2 files changed, 26 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 9454706d6e..a1fa1eec38 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,12 @@
2001-10-23 JP Rosevear <jpr@ximian.com>
+ * gui/e-meeting-time-sel.c
+ (e_meeting_time_selector_table_vadjustment_changed): adjust the
+ display canvas when the table scrolls
+ (e_meeting_time_selector_construct): listen for table scrolling
+
+2001-10-23 JP Rosevear <jpr@ximian.com>
+
* gui/e-meeting-model.c (build_etable): no longer set the
scrollbar policy here
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index e4252ea4ba..3e293b2bcd 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -118,6 +118,8 @@ static void e_meeting_time_selector_hadjustment_changed (GtkAdjustment *adjustme
EMeetingTimeSelector *mts);
static void e_meeting_time_selector_vadjustment_changed (GtkAdjustment *adjustment,
EMeetingTimeSelector *mts);
+static void e_meeting_time_selector_table_vadjustment_changed (GtkAdjustment *adjustment,
+ EMeetingTimeSelector *mts);
static void e_meeting_time_selector_on_canvas_realized (GtkWidget *widget,
EMeetingTimeSelector *mts);
@@ -674,12 +676,14 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingModel *em
mts->stipple = gdk_bitmap_create_from_data (NULL, (gchar*)stipple_bits,
8, 8);
- /* Connect handlers to the adjustments in the main canvas, so we can
- scroll the other 2 canvases. */
+ /* Connect handlers to the adjustments scroll the other items. */
gtk_signal_connect (GTK_OBJECT (GTK_LAYOUT (mts->display_main)->hadjustment), "value_changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_hadjustment_changed), mts);
gtk_signal_connect (GTK_OBJECT (GTK_LAYOUT (mts->display_main)->vadjustment), "value_changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_vadjustment_changed), mts);
gtk_signal_connect (GTK_OBJECT (GTK_LAYOUT (mts->display_main)->vadjustment), "changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_vadjustment_changed), mts);
+ gtk_signal_connect (GTK_OBJECT (e_scroll_frame_get_vadjustment (E_SCROLL_FRAME (mts->etable))), "value_changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_table_vadjustment_changed), mts);
+ gtk_signal_connect (GTK_OBJECT (e_scroll_frame_get_vadjustment (E_SCROLL_FRAME (mts->etable))), "changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_table_vadjustment_changed), mts);
+
e_meeting_time_selector_recalc_grid (mts);
e_meeting_time_selector_ensure_meeting_time_shown (mts);
e_meeting_time_selector_update_start_date_edit (mts);
@@ -942,6 +946,19 @@ e_meeting_time_selector_vadjustment_changed (GtkAdjustment *adjustment,
}
}
+static void
+e_meeting_time_selector_table_vadjustment_changed (GtkAdjustment *adjustment,
+ EMeetingTimeSelector *mts)
+{
+ GtkAdjustment *adj;
+
+ adj = GTK_LAYOUT (mts->display_main)->vadjustment;
+ if (adj->value != adjustment->value) {
+ adj->value = adjustment->value;
+ gtk_adjustment_value_changed (adj);
+ }
+}
+
void
e_meeting_time_selector_get_meeting_time (EMeetingTimeSelector *mts,