Kaydet (Commit) 5bb5ff51 authored tarafından Nick Treleaven's avatar Nick Treleaven

When closing tabs that were opened left-to-right, don't temporarily

focus the previous tab when closing tabs, to prevent unnecessary
checking for disk changes.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2375 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 98f57f25
2008-03-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/notebook.c:
When closing tabs that were opened left-to-right, don't temporarily
focus the previous tab when closing tabs, to prevent unnecessary
checking for disk changes.
2008-03-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* HACKING: Add note and link for GTK 2.6 API docs.
......
......@@ -409,19 +409,18 @@ notebook_tab_close_clicked_cb(GtkButton *button, gpointer user_data)
/* Always use this instead of gtk_notebook_remove_page(). */
void notebook_remove_page(gint page_num)
{
gint oldpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(app->notebook));
gtk_notebook_remove_page(GTK_NOTEBOOK(app->notebook), page_num);
tab_count_changed();
gint curpage = gtk_notebook_get_current_page(GTK_NOTEBOOK(app->notebook));
/* Focus the next page, not the previous */
if (oldpage == page_num && prefs.tab_order_ltr)
if (curpage == page_num && prefs.tab_order_ltr)
{
/* Unless the first tab was closed */
if (oldpage > 0)
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), oldpage);
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), curpage + 1);
}
/* now remove the page (so we don't temporarily switch to the previous page) */
gtk_notebook_remove_page(GTK_NOTEBOOK(app->notebook), page_num);
tab_count_changed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment