Mercurial > pidgin.yaz
diff pidgin/gtkscrollbook.c @ 29489:b641af9dfe2a
propagate from branch 'im.pidgin.pidgin' (head 7bed935cd3432470394f51f4fe6e7f915aed9145)
to branch 'im.pidgin.pidgin.next.minor' (head f6497ab7d689433e64b9e835dcaecde3de68971f)
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Tue, 25 Aug 2009 03:59:01 +0000 |
parents | 21277e69e06c |
children | 5e6997ae07e2 |
line wrap: on
line diff
--- a/pidgin/gtkscrollbook.c Tue Aug 25 03:58:42 2009 +0000 +++ b/pidgin/gtkscrollbook.c Tue Aug 25 03:59:01 2009 +0000 @@ -80,11 +80,7 @@ { int index, count; index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook)); -#if GTK_CHECK_VERSION(2,2,0) count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook)); -#else - count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children); -#endif if (index + 1 < count) gtk_notebook_set_current_page(GTK_NOTEBOOK(scroll_book->notebook), index + 1); @@ -130,11 +126,7 @@ { int count; int index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook)); -#if GTK_CHECK_VERSION(2,2,0) count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook)); -#else - count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children); -#endif refresh_scroll_box(scroll_book, index, count); } @@ -149,11 +141,7 @@ switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, PidginScrollBook *scroll_book) { int count; -#if GTK_CHECK_VERSION(2,2,0) count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook)); -#else - count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children); -#endif refresh_scroll_box(scroll_book, page_num, count); } @@ -268,9 +256,7 @@ /* Close */ eb = gtk_event_box_new(); gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION(2,4,0) gtk_event_box_set_visible_window(GTK_EVENT_BOX(eb), FALSE); -#endif gtk_widget_set_events(eb, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); close_button = gtk_label_new("×"); g_signal_connect(G_OBJECT(eb), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_button);