Re: liststore issue 1 - iter points to wrong row after sort of column with cellrenderercombo

2019-02-28 Thread Nicolas Soubeiran via gtk-app-devel-list
using path to get the ITER) > On my particular scenario I use editing-started to setup some stuff so I > can use the iter created > > On Thu, 28 Feb 2019, 12:30 Nicolas Soubeiran via gtk-app-devel-list, < > gtk-app-devel-list@gnome.org> wrote: > >> Hello, >> a

Re: liststore issue 1 - iter points to wrong row after sort of column with cellrenderercombo

2019-02-28 Thread Nicolas Soubeiran via gtk-app-devel-list
Hello, after you sort the model, you shall consider that all iter and path previously stored are wrong : A path is a representation of the position of the row in the current case (which you can read by using gtk_tree_path_to_string).

Question about deprecated Gdk thread lock functions

2012-08-23 Thread Nicolas Soubeiran
I have a question on how I can upgrade my code (Gtk+ v.2.18) that uses the deprecated GDK_THREAD_ENTER/LEAVE API. In my case I compute pixbuf in separated threads and I have to lock the GdkPixbuf creation: /* thread function */ void _compute_pixbuf ( ...) { gchar* pixels; GdkPixbuf *pixbuf; /*

Re : How can I check if a GtkWidget exists?

2012-07-20 Thread Nicolas SOUBEIRAN
Have you try g_object_add_weak_ref ? Weak references are used for notification when an object is finalized. Hope this helps. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

gtk_dialog_run deprecated?

2012-03-23 Thread Nicolas Soubeiran
Hi all, I've read that GTK+ wants to set gtk_dialog_run and gdk_thread_enter/leave API I've read messages on why the gdk_thread_enter/leave would be deprecated but I saw nothing about gtk_dialog_run. I do not understand especially when we can assume that all GDK/GTK+ calls should be done in the

string comparaison ignoring accent

2012-02-13 Thread Nicolas Soubeiran
Hi all, Is there a way in Glib/Gtk+ to compare 2 strings ignoring the accent such as g_utf8_casefold does for case insensitive comparison. I need a function that match : compare(école,ecole) == 0 Thanks. ___ gtk-app-devel-list mailing list

Re: Re : Iconview stock items

2012-01-23 Thread Nicolas SOUBEIRAN
You should have read the compiler warning (and the runtime warning) : the icon_view var is not initialized when you call init_model GtkWidget *icon_view; // call of uninitialized icon_view in function init_model icon_view = gtk_icon_view_new_with_model(init_model(icon_view)); You should have

Re: Re : Iconview stock items

2012-01-18 Thread Nicolas Soubeiran
(cf the link you send). The current version is available on the gtk homepage. The Gtk-documentation has really been improved since. 2012/1/17 Neil Munro neilmu...@gmail.com: On 17 January 2012 18:20, Nicolas SOUBEIRAN nicolas.soubei...@gmail.com wrote: Le 17/01/2012 02:02, Neil Munro a écrit

Re: Re : Iconview stock items

2012-01-17 Thread Nicolas SOUBEIRAN
Le 17/01/2012 02:02, Neil Munro a écrit : On 16 January 2012 19:01, Nicolas SOUBEIRANnicolas.soubei...@gmail.com wrote: Use gtk_widget_render_icon_pixbuf If you need a custom size, you may look after gtk_icon_size_register Is this a gtk3 function as I cannot find it as a function of a gtk2

Re : Iconview stock items

2012-01-16 Thread Nicolas SOUBEIRAN
Use gtk_widget_render_icon_pixbuf If you need a custom size, you may look after gtk_icon_size_register ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

gtk print for printing an image

2011-06-30 Thread Nicolas Soubeiran
Hi all, I try to use GtkPrintOperation for printing an image and there is something I do not understand. When I am in the draw-page callback, I get the cairo context from GtkPrintContext which is at 72dpi and the draw rectangle is smaller than 1000x1000 (for A4 sheet) and my image pixbuf is

disable screensaver

2011-06-06 Thread Nicolas Soubeiran
Hi all, I want to know if there is a way to disable screensaver while my app is running : the main window is visible and does not need user interaction (it works like a video player). Thanks ___ gtk-app-devel-list mailing list

gtk_tree_model_sort_real_unref_node and gtk_tree_model_filter_real_unref node critical

2011-02-10 Thread Nicolas Soubeiran
Hi all, I'm always working on a treeview that display a sorted filtered : the model displayed is a GtkTreeModelSort whose child is a GtkTreeModelFilter whose child is a GtkListStore. Sometime when the model is actually sort and filtered I have on selection 2 Gtk-Critical on

multi line cell edition

2011-02-03 Thread Nicolas Soubeiran
Hi all, I need to edit a multi-line cell in a treeview. GtkCellRendererText can display a multi-line text, I need to be able to edit it and/or let the user set a multi line value in the cell. I look at GtkEntry APIs and I found gtk_entry_get_layout* API but I have no idea on how I can use it. Or

gtk_tree_model_sort_real_unref_node and gtk_tree_model_filter_real_unref node critical

2011-01-25 Thread Nicolas Soubeiran
Hello all, I'm writing a binding for GTK+ to use the GtkTreeView. I sometime have, when I select a row in a GtkTreeView that display a sorted-filtered model (i.e the model displayed is a GtkTreeModelSort whose child is a GtkTreeModelFilter whose child is a GtkListStore) 2 GTK-Critical :

gtk_tree_model_sort_real_unref_node and gtk_tree_model_filter_real_unref node critical

2011-01-12 Thread Nicolas Soubeiran
Hello all, I debug an old code with a treeview that display a sorted filtered list : i.e the model displayed is a GtkTreeModelSort whose child is a GtkTreeModelFilter whose child is a GtkListStore. An analogy can be a file explorer that can be sorted and where user can toggle show/hide hidden

Re: Errors creating GdkPixbuf

2010-09-06 Thread Nicolas Soubeiran
Hello, I had this error when using threads to create GdkPixbuf (gdk_pixbuf_new_from_file called by multiple threads). If it is your case, you must protect calls to to gdk functions with gdk_threads_enter/leave functions. Hope this helps Nicolas ___

GtkIconView displaying ellipsized label

2010-08-31 Thread Nicolas Soubeiran
Hi all, I try to used a GtkIconViewer for displaying icons with very long labels. So I used a custom layout and set the ellipsize property to the text cell. It works well as long as the items are not selected. When an item is selected, the size request for its text label (and focus box) is get

Re: Setting a Tree View Cell to insensitive and uneditable

2010-04-19 Thread Nicolas Soubeiran
When creating your model set a specific column with a boolean property. e.g : enum { STRING_COLUMN =0, EDITABLE_COLUMN, N_COLUMN } ... gtk_list_store_new(N_COLUMN, G_TYPE_STRING, G_TYPE_BOOLEAN); Then in the treeview create a column using gtk_tree_view_column_new_with_attributes(title,

SegFault on a GtkTreeSelection changed

2010-03-24 Thread Nicolas Soubeiran
Hello, I have trouble with a sorted model when deleting some row from the child model : the following code SegFault when you select the 2 first lines of the treeview then click the button (remove the first line of the child model). What should I do to avoid this #include gtk/gtk.h #define

SegFault on a GtkTreeSelection changed : More info

2010-03-24 Thread Nicolas Soubeiran
I forgot to precise : I am working on a GTK+ 2.12.12 version. I attached for debugging row-deleted to models signal and I saw that the order is 1) Child model (the GtkListStore) : row-deleted 2) GtkTreeViewSelection (that display the sorted model) changed 3) GtkTreeModelSort : row-deleted So it

Re : Making a Python/GTK CheckMenuItem, when clicked, not close the menu

2010-01-29 Thread Nicolas Soubeiran
Hi, I'm not really aware of PyGTK. But I have a suggestion, it is possible when you use the GTK+ (C API), I do not know if it is possible in PyGTK. If the menu widget does not work as you expect, use a custom GtkWindow with type GTK_WINDOW_POPUP (as say in GTK doc GTK_WINDOW_POPUP is used to

Re : GtkTreeView sorting triggered by cell renderer while, retaining row selection

2010-01-04 Thread Nicolas SOUBEIRAN
I've already signaling the issue between selection and toggle cell : here is the answer by kris If the column is sorted, when one activates the toggle, the tree is re-sorted (normal) but the selected row is changed (unexpected). I investigated and I found that when clicking on a toggle cell

Toggle cell on a sorted treeviewcolumn loses selection (sample code)

2009-08-26 Thread Nicolas Soubeiran
Hi all If the column is sorted, when one activates the toggle, the tree is re-sorted (normal) but the selected row is changed (unexpected). I investigated and I found that when clicking on a toggle cell renderer, the activate callback is send which update the treemodel. After re-ordering, the

Toggle cell on a sorted treeviewcolumn loses selection

2009-08-15 Thread Nicolas SOUBEIRAN
Hi all, I have a weird case on a treeview that displays a sortable column with an activatable toggle cell renderer. If the column is sorted, when one activates the toggle, the tree is re-sorted (normal) but the selected row is changed (unexpected). I investigated and I found that when clicking

font of insensitive checkbox

2009-02-06 Thread Nicolas Soubeiran
Hello, I have to do a GUI where checkboxes can be insensitive but the text has to be readable. When I call gtk_widget_set_sensitive(check_box, FALSE), the associated label is also set insensitive which makes the text hard to read. I change the GtkRCFile in order to have a specific color for the

GtkTooltip destroys the custom widget when finalized

2008-11-19 Thread Nicolas Soubeiran
Hi all, I was trying to do a tooltip with a custom widget that display a GtkProgessBar showing the state of a computation in gtk 2.12.10. My program often terminates with a memory fault : it lost the reference to the GtkProgessBar even if I ref it (with g_object_ref). I investigated and found

Re: increase cell height in a GtkTreeView

2008-09-01 Thread Nicolas SOUBEIRAN
Kristian Rietveld a écrit : (Apologies for such a late reply, I hope it is still of use). On Fri, Aug 1, 2008 at 11:37 AM, Nicolas Soubeiran [EMAIL PROTECTED] wrote: Hi all, I need to create a treeview with a column which displays a pixbuf that becomes bigger when the user hovers the row

increase cell height in a GtkTreeView

2008-08-01 Thread Nicolas Soubeiran
component. Thanks Nicolas Soubeiran [EMAIL PROTECTED] ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

find the iter under the mouse after scrolling in a GtkTreeView

2008-07-17 Thread Nicolas Soubeiran
Hi, I try to find the iter under the cursor in a GtkTreeView (list store) at any time. The easy part is already done : catch the mouse motion event and use the information store in the GdkEvent to get the cursor position and so the iter using gtk_treeview_get_path_at_pos. But when I scroll the