Skip to content
  • Sébastien Wilmet's avatar
    notebook: fix page switching bug when closing an unfocused tab · 334acf29
    Sébastien Wilmet authored
    In gedit_notebook_page_removed(), the page was already removed, so
    calling gtk_notebook_get_current_page() there was wrong. It was maybe
    due to a GTK+ change.
    
    The list of focused pages contained only the previously focused pages,
    not the current one. This commit changes that to also include the
    currently focused page in the list, so in gedit_notebook_page_removed()
    we know if the page removed was the current page or not.
    
    Change also the order of the history, with the most recent focused page
    at the first element of the list instead of at the end, so we don't need
    to traverse the whole list each time.
    
    Make also the code more robust.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731784
    334acf29