aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <crazycal00@gmail.com>2010-05-09 10:35:51 -0400
committermutantturkey <crazycal00@gmail.com>2010-05-09 10:35:51 -0400
commit40fb9378b60b229986d0125cf48ce3e464835ff5 (patch)
tree0fd8f407982c041ebb4dac40ec0724da51bf2603
parent942a5511e5b34acf0683a6df7373e1f404a53ae6 (diff)
clean up tab_switch a bit.
-rw-r--r--sb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sb.c b/sb.c
index 6ffbfca..2ca43e9 100644
--- a/sb.c
+++ b/sb.c
@@ -116,16 +116,13 @@ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(w.notebook), TRUE);
static void tab_switch(gboolean b) {
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 == gtk_notebook_get_n_pages(GTK_NOTEBOOK(w.notebook)) -1 ) { current = 0; }
else { current = current + 1;}
} else{
if (current == 0) {
- current = gtk_notebook_get_n_pages(GTK_NOTEBOOK(w.notebook));
- current = current - 1; }
-
+ current = gtk_notebook_get_n_pages(GTK_NOTEBOOK(w.notebook)) - 1; }
else {current = current -1; }
}