aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/main.c2
-rw-r--r--calendar/gui/prop.c14
-rw-r--r--calendar/main.c2
-rw-r--r--calendar/prop.c14
4 files changed, 20 insertions, 12 deletions
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 581004ac82..b7e7ad0b37 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -166,7 +166,7 @@ day_range_changed (void)
for (l = all_calendars; l; l = l->next){
GnomeCalendar *cal = GNOME_CALENDAR (l->data);
- gtk_widget_queue_draw (cal->notebook);
+ gtk_widget_queue_resize (cal->notebook);
}
}
diff --git a/calendar/gui/prop.c b/calendar/gui/prop.c
index a7d3c8162d..da306a2a78 100644
--- a/calendar/gui/prop.c
+++ b/calendar/gui/prop.c
@@ -9,10 +9,12 @@ static GtkObject *sa, *ea;
void
start_changed (GtkAdjustment *sa, GtkAdjustment *ea)
{
- if (sa->value == ea->value){
- sa->value -= 1.0;
+ if (sa->value > 23.0){
+ sa->value = 23.0;
+ ea->value = 24.0;
gtk_signal_emit_by_name (GTK_OBJECT (sa), "value_changed");
- } else if (sa->value > ea->value){
+ gtk_signal_emit_by_name (GTK_OBJECT (ea), "value_changed");
+ } else if (sa->value >= ea->value){
ea->value = sa->value + 1.0;
gtk_signal_emit_by_name (GTK_OBJECT (ea), "value_changed");
}
@@ -21,9 +23,11 @@ start_changed (GtkAdjustment *sa, GtkAdjustment *ea)
void
end_changed (GtkAdjustment *ea, GtkAdjustment *sa)
{
- if (ea->value == sa->value){
- ea->value += 1.0;
+ if (ea->value < 1.0){
+ ea->value = 1.0;
+ sa->value = 0.0;
gtk_signal_emit_by_name (GTK_OBJECT (ea), "value_changed");
+ gtk_signal_emit_by_name (GTK_OBJECT (sa), "value_changed");
} else if (ea->value < sa->value){
sa->value = ea->value - 1.0;
gtk_signal_emit_by_name (GTK_OBJECT (sa), "value_changed");
diff --git a/calendar/main.c b/calendar/main.c
index 581004ac82..b7e7ad0b37 100644
--- a/calendar/main.c
+++ b/calendar/main.c
@@ -166,7 +166,7 @@ day_range_changed (void)
for (l = all_calendars; l; l = l->next){
GnomeCalendar *cal = GNOME_CALENDAR (l->data);
- gtk_widget_queue_draw (cal->notebook);
+ gtk_widget_queue_resize (cal->notebook);
}
}
diff --git a/calendar/prop.c b/calendar/prop.c
index a7d3c8162d..da306a2a78 100644
--- a/calendar/prop.c
+++ b/calendar/prop.c
@@ -9,10 +9,12 @@ static GtkObject *sa, *ea;
void
start_changed (GtkAdjustment *sa, GtkAdjustment *ea)
{
- if (sa->value == ea->value){
- sa->value -= 1.0;
+ if (sa->value > 23.0){
+ sa->value = 23.0;
+ ea->value = 24.0;
gtk_signal_emit_by_name (GTK_OBJECT (sa), "value_changed");
- } else if (sa->value > ea->value){
+ gtk_signal_emit_by_name (GTK_OBJECT (ea), "value_changed");
+ } else if (sa->value >= ea->value){
ea->value = sa->value + 1.0;
gtk_signal_emit_by_name (GTK_OBJECT (ea), "value_changed");
}
@@ -21,9 +23,11 @@ start_changed (GtkAdjustment *sa, GtkAdjustment *ea)
void
end_changed (GtkAdjustment *ea, GtkAdjustment *sa)
{
- if (ea->value == sa->value){
- ea->value += 1.0;
+ if (ea->value < 1.0){
+ ea->value = 1.0;
+ sa->value = 0.0;
gtk_signal_emit_by_name (GTK_OBJECT (ea), "value_changed");
+ gtk_signal_emit_by_name (GTK_OBJECT (sa), "value_changed");
} else if (ea->value < sa->value){
sa->value = ea->value - 1.0;
gtk_signal_emit_by_name (GTK_OBJECT (sa), "value_changed");