diff options
-rw-r--r-- | sb.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -119,10 +119,13 @@ gint(current) = gtk_notebook_get_current_page(GTK_NOTEBOOK(w.notebook)); gint(total) = gtk_notebook_get_n_pages(GTK_NOTEBOOK(w.notebook)); if(b) { - if (current == total -1 ) { current = 0; } + if (current == gtk_notebook_get_n_pages(GTK_NOTEBOOK(w.notebook)) -1 ) { current = 0; } else { current = current + 1;} } else{ - if (current == 0) { current = total -1; } + if (current == 0) { + current = gtk_notebook_get_n_pages(GTK_NOTEBOOK(w.notebook)); + current = current - 1; } + else {current = current -1; } } |