I want a window size to be just the right size to show the text in a text_view, unless the text size is greater then some limit size.
The window is built like this using C code.
Code:
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
scrolled_window=gtk_scrolled_window_new(NULL,NULL);
gtk_window_set_title(GTK_WINDOW(window), notification_file_name());
gtk_container_add(GTK_CONTAINER (window), scrolled_window);
text_view = text_view_new_from_file(notification_file_path());
gtk_container_add(GTK_CONTAINER (scrolled_window), text_view);
Is there a way to do that?
Or can I get the size of the text_view in pixels?