Your rifle has been posted as requested. After viewing the photos I feel it only fair to share my opinion of the piece and maybe ask some further questions.
Provenance notwithstanding your rifle would seem to have few of the qualities that might tie it to even the late 1700's. Even if I were to grant that the lock may have been changed or the rifle converted to percussion, the piece would seem to have none of the architecture associated with early long rifles.
I certainly understand that this rifle is a family treasure which is just as it should be. Further, I understand that you can document the rifle back to the late 1830's. Though I'd normally opine a much later piece sans documents, I can live with the 1838 date... But not even so much as a decade earlier than that.
I'd guess that the rifle was made as a rather utilitarian item. A working gun if you will. The patchbox may well have been added at some point but I doubt it to be original. And while the patchbox may be functional, in my opinion it's anything but a work of art.
While I have no doubt that your several times great grandfather served in the Revolution, I sincerely doubt that this rifle had anything to do with that part of history. I'm inclined to believe that your rifle postdates the Revolution by about a half century.
Think of it this way if you will... Photos indicate a rifle we might normally think of as being made within a few years of the Civil War. Your 1838 date stretches this back by a quarter century. That's a long time!
Then there's the matter of your ancestor. For the sake of argument I'll say that he was a young man of twenty in 1780. Thus he was born sometime around 1760. By the year 1838 your grandfather was approaching the age of eighty. While not entirely impossible for a man of that age being presented a working rifle, I find it somewhat questionable.
Possibly someone here will put my misgivings to rest. That's why we're here. Believe me, I want the rifle to be authentic. The problem is that evidence provided by the photos seems contrary to your family records.