gtk_text_view_set_window_size()



Is it just me or does this function do nothing? In
essence, we have: 

===
void
gtk_text_view_set_text_window_size (GtkTextView *text_view,
                                    gint         width,
                                    gint         height)
{
  GtkTextWindow *win;

  win = text_view->text_window;

  win->requisition.width = width;
  win->requisition.height = height;

  gtk_widget_queue_resize (GTK_WIDGET (text_view));
}
===

But gtk_text_view_size_request() does:

===
  if (text_view->layout)
    {
      text_view->text_window->requisition.width = text_view->layout->width;
      text_view->text_window->requisition.height = text_view->layout->height;
    }
  else
    {
      text_view->text_window->requisition.width = 0;
      text_view->text_window->requisition.height = 0;
    }
===

I ran into this because gtk_text_view_get_text_window_size()
is in Kristian's getter, and it wasn't clear to me what the
handling of "unset" should be. (I'm going to skip adding
that function for now.)

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]