gtktreeview: Why does gtktreeview retrieve all columns although 99% are not visible? (psppire)
Hi, i currently work on psppire http://savannah.gnu.org/projects/pspp/ and want to use gtktreeview for a large number of columns (2000) and rows (1). I use only a kind of fake tree model while the actual rendering and data retrieval is done via gtk_tree_view_column_set_cell_data_func. I noticed that during redraw all columns are actually retrieved but only for the visible rows. Here is a log showing the access pattern: (here columns 0 to 1995) render_data_cell: row: 6, column: 1996 render_data_cell: row: 6, column: 1997 render_data_cell: row: 6, column: 1998 render_data_cell: row: 6, column: 1999 render_data_cell: row: 6, column: 0 render_data_cell: row: 6, column: 1 render_data_cell: row: 6, column: 2 render_data_cell: row: 6, column: 3 render_data_cell: row: 6, column: 4 render_data_cell: row: 6, column: 5 render_data_cell: row: 6, column: 6 render_data_cell: row: 6, column: 7 render_data_cell: row: 6, column: 8 render_data_cell: row: 6, column: 9 render_data_cell: row: 6, column: 10 render_data_cell: row: 6, column: 11 render_data_cell: row: 6, column: 12 render_data_cell: row: 6, column: 13 render_data_cell: row: 6, column: 14 render_data_cell: row: 6, column: 15 Only columns 0 to 15 are visible in the window. Is there any specific reason why 2000 columns are retrieved when only 16 are visible? I configured the columns as GTK_TREE_VIEW_COLUMN_FIXED. The treeview has the fixed-height mode activated. I use gtk3 18.5 on macports. Is there a configuration of the columns or the treeview that would prevent this? The code is here: http://git.savannah.gnu.org/cgit/pspp.git/tree/src/ui/gui/psppire-data-sheet.c?h=treeview#n244 Friedrich ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk-app-devel-list Digest, Vol 140, Issue 4
Am 11.12.2015 um 22:45 schrieb Joël Krähemann: > Doesn't the property work for you? > > g_object_set(var_sheet, "activate-on-single-click", TRUE, NULL); > Hi Joel, thanks for the hint. activate-on-single-click only influences the activation of a cell. I can see the difference on cells which are activatable. I have some cells where a dialog opens, when they are activated. I can not see a difference on cells which are just editable, i.e. where a text entry widget is used by the cell renderer. Friedrich ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk-app-devel-list Digest, Vol 140, Issue 4
Hi Joel, thanks for the answer. I guess this is not a race condition. What I want to achieve is to edit cells as in a spreadsheet. That means A single click starts the editing mode With gtktreeview I need a first click to select the cell and a second click to start editing. Do you maybe imagine a way how the editing could be started with a single click? The code is here: http://git.savannah.gnu.org/cgit/pspp.git/tree/src/ui/gui/psppire-var-sheet.c?h=treeview Friedrich Am 11.12.2015 um 18:26 schrieb Joël Krähemann: > Hi Friedrich, try to stay on objectives. Do you use an IPC mechanism, > or is it a separate thread? > A callback is called by g_main_context_iteration() of gtk_main() it's > polled some how. > More code would be great and better information about it. > > If it's a multi-threaded issue you might want to take a look at GMutex > and GCond. > With g_mutex_lock() and g_mutex_unlock() you're normally well served. > > Bests, > Joël Krähemann > >> ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How can I retrieve gtk style context information from textview widget class without a textview widget?
Hi, I would like to use the style information from the textview widget in another context. I want to retrieve the text foreground color and the background color as it would be used in a textview widget and use this style information for rendering inside a drawing area. I figured out that I can modify the style by adding a style class with gtk_style_context_add_class (), but the textview background color seems to be specific to the textview widget. In the adwaita scheme css: GtkTextView { background-color: #f6f6f6; } GtkTextView:backdrop { background-color: #f6f6f6; } Is there a way to retrieve this information of the background-color similar to the class mechanism? I would need the same style context as if I was in a textview widget. Friedrich ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How can I retrieve gtk style context information from textview widget class without a textview widget?
Thank you for the hint! Then, if you don't have an actual GtkTextView to get the style context from, you'll need to create it yourself faking the one a true text view would have. You can probably do that relatively easily with gtk_style_context_new() and then setting an appropriate widget path with gtk_style_context_set_path() ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list