aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <crazycal00@gmail.com>2010-05-09 10:31:07 -0400
committermutantturkey <crazycal00@gmail.com>2010-05-09 10:31:07 -0400
commit942a5511e5b34acf0683a6df7373e1f404a53ae6 (patch)
treee40fef8369818e936372dcb79e1ac1a09900b501
parent2a919c45462d7d9dbae3f858e2b9d189886046a6 (diff)
that last commit was messed up, here is working copy
-rw-r--r--sb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sb.c b/sb.c
index 8b40710..6ffbfca 100644
--- a/sb.c
+++ b/sb.c
@@ -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; }
}