Re: gtk_tree_selection_select_iter after gtk_tree_store_append not working

2011-07-23 Thread Kristian Rietveld
On Fri, Jul 22, 2011 at 8:40 PM, Denis Washington wrote: > However, this doesn't work. Removing the "if" conditional and printing out > gtk_tree_selection_get_selected (selection, NULL, NULL) right after > select_iter reveals that only the root element can be selected this way > (printout is 1), w

Re: Impl specific functionality

2011-05-21 Thread Kristian Rietveld
Hi John, The GTK+ source code makes use of the following defines: GDK_WINDOWING_X11, GDK_WINDOWING_WIN32 and GDK_WINDOWING_QUARTZ. These are defined in gdkconfig.h, which is installed as a public header, so you should be able to make use of it as well. For GTK+ 3.0, keep in mind that multiple b

Re: Hardware accelerated 2D graphics (with gtk-osx)

2010-08-09 Thread Kristian Rietveld
On Aug 9, 2010, at 1:39 PM, John Emmas wrote: > I'm using a Mac Mini with OS-X 10.6.3. Graphics are provided by the onboard > NVidia chip which is a GeForce 9400. That's certainly pretty recent. > This particular app is the only GTK application that I've ever run on my Mac. > It's an applicat

Re: Hardware accelerated 2D graphics (with gtk-osx)

2010-08-08 Thread Kristian Rietveld
On Aug 8, 2010, at 9:32 PM, John Emmas wrote: > On 1 Aug 2010, at 21:49, Kristian Rietveld wrote: > >> >> GTK+ OSX does all drawing using CoreGraphics, this should be >> hardware-accelerated whenever possible. >> > > From what I've been able to te

Re: Hardware accelerated 2D graphics (with gtk-osx)

2010-08-01 Thread Kristian Rietveld
On Jul 27, 2010, at 10:49 AM, John Emmas wrote: > Under Windows and Linux the (2D) scrolling display is smooth. But under OS-X > it's horribly jerky and has a very 'klunky' look to it. I happen to be > viewing it on a Mac Mini but other people have seen the same effect with more > powerful mac

Re: Hardware accelerated 2D graphics (with gtk-osx)

2010-08-01 Thread Kristian Rietveld
On Jul 28, 2010, at 9:15 AM, John Emmas wrote: > This morning I've come across this mailing list which has got me confused:- > > http://sourceforge.net/mailarchive/forum.php?forum_name=gtk-osx-users My understanding is that this mailing list is for discussion of gtk+ on osx as well as certain s

Re: GtkTreeView in VBox

2010-01-07 Thread Kristian Rietveld
On Thu, Jan 7, 2010 at 1:24 PM, Amol Kulkarni wrote: > Is it possible to add GtkTreeView inside VBox and then add that VBox to > ScrolledWindow using gtk_scrolled_window_add_with_viewport(sw,vbox). > Is this expected/supported use case or am i doing something wrong here? > Thanks for your time.

Re: dotted line separating table columns in GTK 2.18

2009-12-02 Thread Kristian Rietveld
On Thu, Dec 3, 2009 at 12:22 AM, Alex Ignácio da Silva wrote: > Unfortunately from the Java side I have no easy access to the underlying > GTK implementation widgets, only to the wrapper SWT objects. > > Isn't there a way to change this behavior via an environment variable or > some other mechanis

Re: dotted line separating table columns in GTK 2.18

2009-12-02 Thread Kristian Rietveld
On Thu, Dec 3, 2009 at 12:38 AM, Michael Cronenworth wrote: > It isn't working for me though. Something is missing. It does not work because enable-grid-lines is not a style property. regards, -kris. ___ gtk-app-devel-list mailing list gtk-app-devel-

Re: dotted line separating table columns in GTK 2.18

2009-12-02 Thread Kristian Rietveld
On Wed, Dec 2, 2009 at 10:52 PM, Alex Ignácio da Silva wrote: > It seems like the recent GTK 2.18 implementation of table widgets draws > a dotted line separating the table columns, as I noticed when trying my > application in Ubuntu Karmic. Unfortunately this makes my widget render > incorrectly.

Re: Invalid GtkTreeIter

2009-11-04 Thread Kristian Rietveld
On Wed, Nov 4, 2009 at 12:42 PM, dhk wrote: > In the gtk-demo program has a block as follows in the Tree View/Tree > Store example.  This doesn't initialize the the child iter before using > it in the gtk_tree_store_append(), but the stamp is valid. Iterators are not valid until they have been to

Re: Auto-resize on table headings

2009-09-29 Thread Kristian Rietveld
Hi, On Wed, Sep 30, 2009 at 6:52 AM, Diogo Baeder wrote: > I was using my Ubuntu Jaunty, here, and noticed something that could be > usefull, that Windows (argh!) GUI already has: auto-resize on table > headings. In a Windows XP system, when a user double-clicks at the table > column separators,

Re: Treeview Row Count

2009-09-24 Thread Kristian Rietveld
Also note that for *lists* (so no parent nodes, no children) a call like gtk_tree_model_iter_n_children (model, NULL) will suffice. -kris. On Thu, Sep 24, 2009 at 1:32 PM, Tadej Borovšak wrote: > Hello. > >> Is there a function to give the number of rows in a treeview? > > You probably want to

Re: Bug in GtkTreeView or programming bug?

2009-09-18 Thread Kristian Rietveld
On Fri, Sep 18, 2009 at 6:22 PM, Daniel Leidert wrote: > Thanks for your hints. Yes, the code was incomplete. But I think the > attached code should work. It still returns: > > (:20960): Gtk-CRITICAL **: gtk_tree_path_to_string: assertion > `path != NULL' failed > path=(null) > > Am I still doing

Re: Bug in GtkTreeView or programming bug?

2009-09-18 Thread Kristian Rietveld
On Wed, Sep 16, 2009 at 10:56 PM, Daniel Leidert wrote: >> Doh! Attached. The program in the attachment tries to set the cursor on a path that does not exist in the tree view. This path does not exist in the view, because the view is not connected to a model. Because of this, the call to gtk_tr

Re: Bug in GtkTreeView or programming bug?

2009-09-15 Thread Kristian Rietveld
2009/9/14 Daniel Leidert : > In Debian the test suite of perl-gtk2 failed [1]. Examining the > situation a bit further it seems, that even after setting a cursor, the > reurned path from gtk_tree_view_get_cursor() is NULL. I tried to write s > short program to reproduce this in C (attached). When I

Re: GtkTreeStore and row deletion

2009-09-02 Thread Kristian Rietveld
On Wed, Sep 2, 2009 at 2:26 PM, wrote: > As I considered this rather as a waste of efforts, I am currently > trying to suppress this GSList as the GtkTreeModel is actually all > I need to manage all edition operations. But in this mode, the object > reference has to be owned by the row. > > My pro

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

2009-08-27 Thread Kristian Rietveld
On Wed, Aug 26, 2009 at 12:33 PM, Nicolas Soubeiran wrote: > 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 i

Re: GtkCellRendererToggle toggles when clicking on other cell renderers in same column

2009-08-12 Thread Kristian Rietveld
Hello, On Wed, Aug 12, 2009 at 2:32 AM, Grumpy Buffalo wrote: > Hi, I am working on a C++ GTK project. I have a GtkTreeView containing > several columns. In the first column, I have packed in 3 cell > renderers - the first, a GtkCellRendererToggle; the second, a > GtkCellRendererPixbuf; the third,

Re: custom tree model, iters, and memory management

2009-07-30 Thread Kristian Rietveld
Hi, On Sun, Jul 26, 2009 at 8:22 PM, Thomas Stover wrote: > While working on a custom tree model (thanks to Tim-Philipp Müller for the > tutorial), I needed more pointers in my iter structure than the user_data, > user_data2, and user_data3. So I defined a new structure and stored that in > user_d

Re: Why collaps row in tree_view since gtk 2.14.0

2009-06-16 Thread Kristian Rietveld
On Wed, Jun 10, 2009 at 10:29 AM, Bernd Demian wrote: > hi, > I have a question to select/unselect in gtk_tree_view since gtk+-2.14.0. > In version 2.12 I select a child in tree_view with mouse button 1 and > whith they key Cntl and mouse button 1 I deselect the child row. Since > 2.14 we have the

Re: Strange behaviour with GtkTreeView multiple row selection

2009-05-30 Thread Kristian Rietveld
On Sat, May 30, 2009 at 5:22 AM, Andreas Ronnquist wrote: > I have a problem with a GtkTreeView - Multiple row selection is turned > on, and so is dragging. The problem is that when selecting several rows > via holding the CTRL key - and then when starting the dragging (by > clicking on some of th

Re: How to set a tool tip on a gtk_tree_store ?

2009-05-11 Thread Kristian Rietveld
On Mon, May 11, 2009 at 6:55 PM, Gregory Hosler wrote: > The problem I'm facing is getting the GtkTooltip of a cell of the > GtkTreeStore. You should keep in mind that tooltips operate on GtkWidgets; a GtkTreeStore is not a widget. Instead you use the widget GtkTreeView which displays the GtkTr

Re: Custom Model - iface->get_iter & iface->get_value questions

2009-05-03 Thread Kristian Rietveld
On Sun, May 3, 2009 at 10:27 PM, Rodrigo Miguel wrote: > Anyway, I think the same can be achieved by using custom models and I found > really good examples in gconf-editor, gnucash and the Gtk Treeview tutorial > from Tim-Philip, so I decide write a generic custom model like Win32 > Listview that

Re: gtktreeview sort string function

2008-11-24 Thread Kristian Rietveld
Hi, On Mon, Nov 24, 2008 at 4:25 PM, Johnson Wong <[EMAIL PROTECTED]> wrote: > What compare functions does gtktreeview-columns use to sort strings? If I am not mistaking GtkListStore and GtkTreeStore use g_utf8_collate() by default for comparing strings. You can override the sort function used,

Re: GtkTooltip destroys the custom widget when finalized

2008-11-24 Thread Kristian Rietveld
Hi, Could you create a bug report in bugzilla (http://bugzilla.gnome.org/) together with a small test case showing the problem and your proposed patch? This way your bug report will not be forgotten :) thanks, -kris 2008/11/19 Nicolas Soubeiran <[EMAIL PROTECTED]>: > Hi all, > I was trying t

Re: GtkTreeView and lazy population

2008-09-19 Thread Kristian Rietveld
Hi, On Tue, Sep 16, 2008 at 3:48 PM, Sam Thursfield <[EMAIL PROTECTED]> wrote: > It seems as though the first thing GtkTreeView does on receiving the > model is to iterate through every root node, calling iter_has_child > and iter_next for each until iter_next returns FALSE. This then leads > to m

Re: Drag'n'drop problems

2008-09-08 Thread Kristian Rietveld
Hi, On Mon, Sep 8, 2008 at 10:49 PM, John Coppens <[EMAIL PROTECTED]> wrote: > Yes, that is what I found out. Most implementations seem to use the lower > level interface. Is GTK_TREE_MODEL_ROW the only string that is > interpreted as special? Or does any of the frequently used ones, like > 'STRIN

Re: Drag'n'drop problems

2008-09-08 Thread Kristian Rietveld
On Mon, Sep 8, 2008 at 8:31 PM, John Coppens <[EMAIL PROTECTED]> wrote: > On Mon, 08 Sep 2008 11:03:39 -0600 > Jeffrey Barish <[EMAIL PROTECTED]> wrote: >> I was going to tell you that you are crazy, but when I tried putting >> GTK_TREE_MODEL_ROW in my program in place of the arbitrary string that

Re: g_signal_emit()

2008-08-31 Thread Kristian Rietveld
On Sun, Aug 31, 2008 at 2:08 PM, dhk <[EMAIL PROTECTED]> wrote: >> I have two callback functions. The first for when a cell in a treeview >> gets edited and the second for when the tab key is pressed. The first works >> fine. In the second, I want to emit the "edited" signal so it acts as if >>

Re: increase cell height in a GtkTreeView

2008-08-31 Thread Kristian Rietveld
(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. So I create a cellrenderer >

Re: Default icon in treeview DnD

2008-08-31 Thread Kristian Rietveld
On Wed, Aug 27, 2008 at 6:55 PM, Jeffrey Barish <[EMAIL PROTECTED]> wrote: >> On Tue, Aug 26, 2008 at 10:55 PM, Jeffrey Barish >> <[EMAIL PROTECTED]> wrote: >> Did you override the drag-begin signal or stop using >> gtk_tree_view_enable_model_drag_source()? These are both possible >> causes for no

Re: scrollbars for treeview

2008-08-31 Thread Kristian Rietveld
On Thu, Aug 28, 2008 at 3:53 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Sorry, I forgot to mention: I was trying this solution for a > long time now -- but it is somehow buggy (try adding and > removing lines and try setting the adjustments by code -> > at some point the widgets are not dis

Re: scrollbars for treeview

2008-08-28 Thread Kristian Rietveld
On Thu, Aug 28, 2008 at 9:12 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi, > > I've read that a treeview has the scolling ability built-in. > Does that include an easy way to display scrollbars, too? > > Or is it necessary to create scrollbars and adjustments and > connect all events separ

Re: Default icon in treeview DnD

2008-08-27 Thread Kristian Rietveld
On Tue, Aug 26, 2008 at 10:55 PM, Jeffrey Barish <[EMAIL PROTECTED]> wrote: > Until this morning, whenever I dragged a row to a new location in the same > treeview, the drag icon would look like the original row. I still get that > icon when I drag from another treeview to the one in question. Is

Re: GTK Tree View

2008-06-05 Thread Kristian Rietveld
On Wed, Jun 04, 2008 at 03:26:33PM -0400, Eric Pastoor wrote: > I'm calling the function on the signal connected to row-expand. That's probably one of the problems, since at that point the exact heights and locations aren't known yet (these are calculated in an idle). You might want to use an idl

Re: GTK Tree View

2008-06-04 Thread Kristian Rietveld
On Wed, Jun 04, 2008 at 02:26:55PM -0400, Eric Pastoor wrote: > And I expand on Root so that it looks like > Root > --> Sub Tree A > --> Sub Tree B > --> Sub Tree C > > The result of that get_visible_range function is start:0 end: 0 I get 0 to 0:2 in such cases, which is the correct v

Re: GTK Tree View

2008-06-04 Thread Kristian Rietveld
On Wed, Jun 04, 2008 at 11:14:13AM -0400, Eric Pastoor wrote: > What is the best way to determine if a row of a tree is inside the > visible part of scrolling window or not? For instance, if I hit the > expand on a tree item, I'd like to know if a certain child in that > tree is visible to t

Re: Disabling a cehck button

2008-05-08 Thread Kristian Rietveld
On Thu, May 08, 2008 at 11:01:44AM +0100, David Conley (FRD) wrote: > Is anyone aware of a function I can call to make a check button disabled. > By disabled I mean it can not be clicked though the value of the checkbox > itself could be on or off. Is gtk_widget_set_sensitive() what you are look

Re: GtkTreeView Expand All

2008-05-05 Thread Kristian Rietveld
Hi, On Wed, Apr 30, 2008 at 08:35:42AM -0700, Eric Pastoor wrote: > I am trying to figure how to recursively expand all from the current > selection in a gtk tree. > > I know the function gtk_tree_view_expand_all(GtkTreeView*) will expand the > entire tree. However, I have set up a right click me

Re: GtkTreeView: GTK_SELECTION_SINGLE not working?

2008-04-20 Thread Kristian Rietveld
Hi, Apologies for the late reply, have been very busy lately. Comments inline. On Fri, Apr 04, 2008 at 08:07:42PM +0100, Carlos Pereira wrote: > > 1) In GtkTreeview with GtkListStore, show always the first item as default, > when selec

Re: GtkTreeView: GTK_SELECTION_SINGLE not working?

2008-04-04 Thread Kristian Rietveld
Hello, Could you more precisely describe what you think is wrong? I quickly tested with GTK+ trunk and I do not see any problems. It is indeed the case that one row is basically always selected (both with single and browse mode) and the main difference between browse and single mode is that in b

Re: TreeView indent-expanders style property

2008-04-04 Thread Kristian Rietveld
On Mon, Mar 24, 2008 at 03:50:29PM -0600, Jeffrey Barish wrote: > Does anyone know what the indent-expanders style property does? > > Can I use indent-expanders to achieve this effect? Is there a way to > achieve it? The point is to avoid wasting space on lines that don't > require an expander a

Re: Selecting cells in threeview

2008-02-08 Thread Kristian Rietveld
Hi, On Fri, Feb 08, 2008 at 02:28:16PM +0100, Thomas Dybdahl Ahle wrote: > Is there any way to select only a cell - not a row - in a gtk-treeview No, GtkTreeView does not support selecting individual cells. Selections can only contain full rows. regards, -kris. ___

Re: Type-ahead popup placement

2008-01-16 Thread Kristian Rietveld
Hi, On Wed, Jan 16, 2008 at 05:10:26PM +0100, Conrad Achtenbaum wrote: > I'm writing a small gtk application and I'm using a GtkTreeView to > display the files in the current directory. The treeview is enclosed in > a scrolledwindow. > And when I start typing the type-ahead popup appears in the

Re: GtkTreeView: how to reduce size of cell

2007-12-15 Thread Kristian Rietveld
Hello, On Sat, Dec 15, 2007 at 12:03:22PM +0100, Romain Li?vin wrote: > I'm working on a debugger > (http://www.lievin.net/downloads/lpg/vti_dock.png). As you can see, > there is a lot of space between each line of the left upper frame. > > How can I decrease space between lines or value of pad

Re: Spontaneous background colors in treeview

2007-10-30 Thread Kristian Rietveld
On Thu, Oct 25, 2007 at 10:43:52AM -0600, Jeffrey Barish wrote: > Kristian Rietveld wrote: > > > When you sort a column in a tree view with >= 3 > > columns, the sorted column is drawn with a background that is slightly > > darker than the default background (in the

Re: GtkTreeModelFilter and GtkTreeSortable

2007-10-15 Thread Kristian Rietveld
On Wed, Oct 10, 2007 at 07:38:22PM -0300, Mat??as Alejandro Torres wrote: > - I have to create a new GtkTreeModelSort everytime the child model is > modified? or it gets resorted automatically? Example: > > fiter = self.sortedModel.convert_iter_to_child_iter (None, siter) > miter = self.f

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Kristian Rietveld
On Mon, Oct 08, 2007 at 03:53:29PM +0200, Bastiaan Veelo wrote: > > Something like this seems to work for me: > > > > button = gtk_button_new_with_label ("..."); > > style = gtk_rc_get_style_by_paths (gtk_widget_get_settings (button), > > "*.GtkTreeView.GtkB

Re: How to use the treeview column title style for a button?

2007-10-08 Thread Kristian Rietveld
Hi, On Sun, Oct 07, 2007 at 12:35:01PM +0200, Bastiaan Veelo wrote: > I am a style newbie. I want some of the buttons in my widget to look > like the column title buttons in a treeview. How do I do that? As far as I know themes style the buttons in the column headers of GtkTreeView by using a "w

Re: ComboBox and TreeView issues

2007-10-08 Thread Kristian Rietveld
Hi, On Thu, Oct 04, 2007 at 05:53:23PM +0200, [EMAIL PROTECTED] wrote: > (when opening the tab) > barcode_buttons[2561]: GLIB CRITICAL ** Gtk - gtk_tree_store_get_path: > assertion > `iter->user_data != NULL' failed These usually mean that the iterator you are passing to gtk_tree_store_get_path(

Re: Auto-scrolling the scrollbar on a TreeView

2007-10-03 Thread Kristian Rietveld
Hi, On Tue, Oct 02, 2007 at 06:29:31PM -0500, Rob Hoelz wrote: > ScrolledWindow to compensate. I've tried scroll_to_cell, but to no > avail. Any hints? I've posted the source code at > http://cs.wisc.edu/~hoelz/TodoList.pl; the problem is in the callback > at line 157. Both GtkTreeView and Gtk

Re: Spontaneous background colors in treeview

2007-10-03 Thread Kristian Rietveld
Hi, On Mon, Oct 01, 2007 at 11:30:58AM -0600, Jeffrey Barish wrote: > Stop presses. It's the number of columns. All data sets that require 3 > columns have a background. All data sets that require 2 columns do not. > > Here it is. If I comment out the line that sets the sort indicator, I do >

Re: GtkTreeModelFilter and GtkTreeSortable

2007-09-30 Thread Kristian Rietveld
On Sat, Sep 29, 2007 at 01:14:56PM -0300, Mat??as Alejandro Torres wrote: > Thank you both for your reply. > > I'm working on python, and I can't find functions to add the sortable > functions to an instance of a GtkTreeModel. > > /* This one receives the model and update the GUI */ > def set_mo

Re: GtkTreeModelFilter and GtkTreeSortable

2007-09-30 Thread Kristian Rietveld
On Fri, Sep 28, 2007 at 11:49:50PM -0300, Mat??as Alejandro Torres wrote: > Is someone implementing this interface in the GtkTreeModelFilter? I've > checked in Gtk 2.12 docs and I THINK this isn't implemented yet. If > somemone can confirm this, I would appreciate it. The GtkTreeModelFilter is n

Re: Treeview column width changed signal

2007-09-30 Thread Kristian Rietveld
On Tue, Sep 25, 2007 at 05:45:51PM -0600, Jeffrey Barish wrote: > Is there a way to be notified when the width of a column in a treeview > changes? I would like to record the new column widths so that I can set > them to the same values the next time the window opens. The only signal in > TreeVie

Re: Spontaneous background colors in treeview

2007-09-30 Thread Kristian Rietveld
On Sun, Sep 30, 2007 at 11:08:05AM -0600, Jeffrey Barish wrote: > After making some changes to my program (not directly related to the GUI), I > find that one treeview has a background of alternating light and dark > bands, but only for certain data sets. I never set the background in my > code, s

Re: Making rows bold in GtkTreeView

2007-09-24 Thread Kristian Rietveld
On Mon, Sep 24, 2007 at 06:30:36PM +0930, Kieran Clancy wrote: > In the list store I have a string field which is displayed in the > column, and a boolean field which should make the text bold or not. In > the code linked, if I set COL_BOLD to TRUE in all three rows, all of > them become bold. If a

Re: start-editing signal?

2007-09-24 Thread Kristian Rietveld
On Fri, Sep 21, 2007 at 06:05:15PM -0400, Allin Cottrell wrote: > My expectation: the unfinished edit will still be in place. > > Actual behaviour: the "bottles of coke" cell is as it was before I > started; my edit-in-progress is gone. > > This may not be a bug as such, but I would like to kno

Re: Start editing a GtkCellRendererText using F2

2007-09-10 Thread Kristian Rietveld
On Sun, Sep 09, 2007 at 11:57:07PM -0400, Andrew Smith wrote: > I can do > gtk_accelerator_parse()/g_cclosure_new()/gtk_accel_group_connect() to > have a callback called when F2 is pressed but I've no idea how to tell > the callback to edit the selected cell. You can use one of gtk_tree_view_se

Re: Custom cel renderer

2007-09-09 Thread Kristian Rietveld
Hi, On Fri, Sep 07, 2007 at 05:33:37PM +0530, amol wrote: > What i am trying is to implement 'cell_class->render' and in it try to > draw this widget on parent GdkWindow through gdk_draw_drawable() but i > am not able to get GdkDrawable (GdkWindow) of widget(i.e of button) to > draw it on destina