How to get the first visible row in a tree view?

2005-03-13 Thread David Rosal
Hi. I have a scrollable tree view with a list of filenames, and I want to know which filename appears in the row at the top of the visible part of the tree view. I'll use this information later to restore the scrolling status of the tree view. The question is: is there any way to know the conte

Re: How to get the first visible row in a tree view?

2005-03-13 Thread Gabriel de Perthuis
Le dimanche 13 mars 2005 Ã 19:14 +, David Rosal a Ãcrit : > Hi. > > I have a scrollable tree view with a list of filenames, and I want to > know which filename appears in the row at the top of the visible part of > the tree view. I'll use this information later to restore the scrolling > st

Re: How to get the first visible row in a tree view?

2005-03-13 Thread Gabriel de Perthuis
Le dimanche 13 mars 2005 Ã 20:12 +0100, Gabriel de Perthuis a Ãcrit : > Le dimanche 13 mars 2005 Ã 19:14 +, David Rosal a Ãcrit : > > The question is: is there any way to know the contents of the first > > visible row in a tree view? > > gtk_tree_view_get_tree_path_at_pos with the right posit

Re: How to get the first visible row in a tree view?

2005-03-13 Thread David Rosal
Gabriel de Perthuis wrote: Better: GdkRectangle r; int xw, yw; GtkTreePath* path = gtk_tree_path_new(); gtk_tree_view_get_visible_rect(tv, &r); gtk_tree_view_tree_to_widget_coords(tv, r.x, r.y, &xw, &yw); gtk_tree_view_get_tree_path_at_pos(tv, xw, xy, &path, NULL, NULL, NULL); It works! It gives m

Re: How to get the first visible row in a tree view?

2005-03-13 Thread Gabriel de Perthuis
Le dimanche 13 mars 2005 Ã 20:59 +, David Rosal a Ãcrit : > Gabriel de Perthuis wrote: > > > Better: > > > > GdkRectangle r; > > int xw, yw; > > GtkTreePath* path = gtk_tree_path_new(); > > > > gtk_tree_view_get_visible_rect(tv, &r); > > gtk_tree_view_tree_to_widget_coords(tv, r.x, r.y, &xw,

Re: How to get the first visible row in a tree view?

2005-03-13 Thread David Rosal
Gabriel de Perthuis wrote: Le dimanche 13 mars 2005 Ã 20:59 +, David Rosal a Ãcrit : It works! It gives me a valid path and I can retrieve the filename. But I get this warning: Gtk-CRITICAL **: gtk_tree_view_get_path_at_pos: assertion `tree_view->priv->bin_window != NULL' failed Maybe the

how to refresh treeview & scrollbar that contain treeview

2005-03-13 Thread ALLs soft
i try with : gdk_window_process_updates(GTK_WIDGET(scrolledwindow)->window, TRUE); gdk_window_process_all_updates(); but not work, scrollbar position is stay on old position. somebody can help? thanks -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Da

Re: poll(2) only can handle 256 fds?

2005-03-13 Thread Markus Lausser
On Fri, 2005-03-11 at 13:41, Gus Koppel wrote: > Iago Rubio wrote: > > > > > i get the message > > > > *** GLib *** : poll(2) failed due to: Invalid argument. > > > > thousand times when running my application. > > > > It seems that it happens if i have accepted 100 < x < 200 > > > > tcp connect

Re: poll(2) only can handle 256 fds?

2005-03-13 Thread John K Luebs
On Mon, Mar 14, 2005 at 03:15:06AM +0100, Markus Lausser wrote: > On Fri, 2005-03-11 at 13:41, Gus Koppel wrote: > > Iago Rubio wrote: > > > > > > > i get the message > > > > > *** GLib *** : poll(2) failed due to: Invalid argument. > > > > > thousand times when running my application. > > > > >

how to align text to right in GtkCellRendererText

2005-03-13 Thread Hubert Sokolowski
Hi! I add a text column to GtkTreeView using code renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (col_titles[i], renderer, "text",

Re: how to align text to right in GtkCellRendererText

2005-03-13 Thread David Necas (Yeti)
On Mon, Mar 14, 2005 at 08:16:36AM +0100, Hubert Sokolowski wrote: > > renderer = gtk_cell_renderer_text_new (); > column = gtk_tree_view_column_new_with_attributes (col_titles[i], >renderer, >

Re: how to align text to right in GtkCellRendererText

2005-03-13 Thread Hubert Sokolowski
> On Mon, Mar 14, 2005 at 08:16:36AM +0100, Hubert Sokolowski wrote: >> >> renderer = gtk_cell_renderer_text_new (); >> column = gtk_tree_view_column_new_with_attributes (col_titles[i], >>renderer, >>