Calendar uses month+1
authorEnrico Zini <enrico@enricozini.org>
Sat, 12 Sep 2009 18:06:15 +0000 (19:06 +0100)
committerEnrico Zini <enrico@enricozini.org>
Sat, 12 Sep 2009 18:06:15 +0000 (19:06 +0100)
src/app_calendar.vala

index 66a0ae5ea8c183aab67d555aa4014292e2fb4ef4..0ce049ef8957c9ed4c47d98641f60f0f3c54d1ab 100644 (file)
@@ -83,7 +83,7 @@ public class Calendar : Applet
        {
                flush();
                calendar.clear_marks();
-               string mpath = month_path(calendar.year, calendar.month);
+               string mpath = month_path(calendar.year, calendar.month + 1);
                Dir dir;
                try {
                        dir = Dir.open(mpath);
@@ -105,7 +105,7 @@ public class Calendar : Applet
        private void on_day_selected()
        {
                flush();
-               load(calendar.year, calendar.month, calendar.day);
+               load(calendar.year, calendar.month + 1, calendar.day);
                // Scroll to beginning
                Gtk.TextIter iter;
                text_buffer.get_iter_at_offset(out iter, 0);
@@ -148,6 +148,11 @@ public class Calendar : Applet
                        zavai.log.error(e.message);
                }
                text_dirty = false;
+
+               if (calendar.year == year && calendar.month + 1 == month)
+               {
+                       calendar.mark_day(day);
+               }
        }
 
        public override void start()