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

Wrap notebook pages when switching tabs.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1527 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 9570443c
......@@ -21,6 +21,8 @@
Add optional title parameter for open dialog with ui_path_box_new()
and ui_setup_open_button_callback().
Use Windows folder dialog in ui_path_box_open_clicked().
* src/utils.c:
Wrap notebook pages when switching tabs.
2007-05-10 Nick Treleaven <nick.treleaven@btinternet.com>
......
......@@ -1038,13 +1038,19 @@ void utils_switch_document(gint direction)
gint page_count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook));
gint cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(app->notebook));
if (direction == LEFT && cur_page > 0)
if (direction == LEFT)
{
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), cur_page - 1);
if (cur_page > 0)
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), cur_page - 1);
else
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), page_count - 1);
}
else if (direction == RIGHT && cur_page < page_count)
else if (direction == RIGHT)
{
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), cur_page + 1);
if (cur_page < page_count - 1)
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), cur_page + 1);
else
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), 0);
}
}
......
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