aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/prop.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-22 13:40:36 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-22 13:40:36 +0800
commite9ec4c0f6a3e01a7025952962eb81e047bc6da16 (patch)
tree04e7ff45a2a183d81b5fa3c8ce2f101620db5fed /calendar/prop.c
parent4763fec1dc45d34ec1284f7e6b3dd485b0295e75 (diff)
downloadgsoc2013-evolution-e9ec4c0f6a3e01a7025952962eb81e047bc6da16.tar.gz
gsoc2013-evolution-e9ec4c0f6a3e01a7025952962eb81e047bc6da16.tar.zst
gsoc2013-evolution-e9ec4c0f6a3e01a7025952962eb81e047bc6da16.zip
Perfection comes in many disguises -mig
svn path=/trunk/; revision=184
Diffstat (limited to 'calendar/prop.c')
-rw-r--r--calendar/prop.c14
1 files changed, 9 insertions, 5 deletions
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");