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
both 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, >> aft

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). https://developer.gnome.org/gtk3/stable/GtkTreeModel.html#gtk-tre

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

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 gtk-app-de

Re: Re : Iconview stock items

2012-01-23 Thread Nicolas SOUBEIRAN
attached my test code for reference, the code compiles but simply segfaults upon running, it's a curious issue cos I can't see what I might be doing wrong. On 18 January 2012 13:21, Nicolas Soubeiran wrote: For the widget you should pass the iconview where you want to display the stock. T

Re: Re : Iconview stock items

2012-01-18 Thread Nicolas Soubeiran
ld version of GTK2 (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 : > On 17 January 2012 18:20, Nicolas SOUBEIRAN > wrote: >> Le 17/01/2012 02:02, Neil Munro a écrit : >&g

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 SOUBEIRAN 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 widget: http://www.gtk.org

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 2000x

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-app-devel-list@gnome.o

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 gtk_tree_model_sort_r

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. O

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 f

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 ___ gtk-a

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 fr

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", text_cel

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"

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 #define STRING_COLUMN 0

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 imple

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 rend

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 fu

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 o

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 ins

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 tha

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 t

increase cell height in a GtkTreeView

2008-08-01 Thread Nicolas Soubeiran
in my 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 tre