gtk_text_view_get_iter_location(textview, &newpager, &pagerpos);
gtk_text_view_get_iter_location(textview, &end, &endpos);
+ /*
g_printerr("View height = %d\n", visiblerect.height);
g_printerr("End - Pager = %d\n", endpos.y - pagerpos.y);
+ */
*view_height = visiblerect.height;
*scroll_distance = endpos.y - pagerpos.y;
static void
start_paging(winid_t win)
{
- printf("Start paging\n");
win->currently_paging = TRUE;
g_signal_handler_unblock(win->widget, win->pager_expose_handler);
g_signal_handler_unblock(win->widget, win->pager_keypress_handler);
static void
stop_paging(winid_t win)
{
- printf("Stop paging\n");
win->currently_paging = FALSE;
g_signal_handler_block(win->widget, win->pager_expose_handler);
g_signal_handler_block(win->widget, win->pager_keypress_handler);
pager_check(gpointer data)
{
- printf("pager check (idle)...\n");
winid_t win = (winid_t) data;
/* Move the pager to the last visible character in the buffer */
gboolean
pager_after_expose_event(GtkTextView *textview, GdkEventExpose *event, winid_t win)
{
- printf("pager check (expose)...\n");
g_idle_add(pager_check, win);
return FALSE;
}
void
pager_after_size_request(GtkTextView *textview, GtkRequisition *requisition, winid_t win)
{
- printf("pager check (size request)...\n");
g_idle_add(pager_check, win);
}
/* Create the pager position mark; it stands for the last character in the buffer
that has been on-screen */
- GtkTextMark *pager_position = gtk_text_buffer_create_mark(textbuffer, "pager_position", &end, TRUE);
- gtk_text_mark_set_visible(pager_position, TRUE);
+ gtk_text_buffer_create_mark(textbuffer, "pager_position", &end, TRUE);
}
break;