From 40fb9378b60b229986d0125cf48ce3e464835ff5 Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Sun, 9 May 2010 10:35:51 -0400 Subject: clean up tab_switch a bit. --- sb.c | 5 +---- 1 file changed, 1 insertion(+), 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; } } -- cgit v1.2.3