Use the actual widget to get the notebook's page_num

Change-Id: Idba0d03487711e423a04ec8cddd4430eaf4a72be