Re: GtkIconView Pixbuf rendering



Hi Christian,
I will attach a testcase. 
please find my reply inline for your overview
On Tue, 2009-10-06 at 13:33 +0200, Christian Dywan wrote:
> Am Tue, 06 Oct 2009 16:13:00 +0530
> schrieb Amol Kulkarni <amolgkulkarni gmail com>:
> 
> > Hi All,
> > In newer versions of Gtk+[After GIcon addition] user is not able to
> > add mixed images in IconView that is file path plus named icons.
> > User will prefer named icons over file path to have consistent look
> > and feel but all required icons may not be available in icon theme so
> > he may need to use mix of these in some cases.
> > Are such scenarios discouraged or is their any workaround available?
> > thanks for your time.
> 
> Hey Amol,
> 
> can you be more specific about what you are trying to do? How are you
> loading pixbufs into the model? Are you manipulating cell renderers? If
> you have a small code example that worked in older GTK+ releases but
> not with 2.18 that would be great.

  I have two columns in model one of STRING type and one of PIXBUF type.
  i set icon-name to use data from STRING type column and pixbuf to use
data from PIXBUF column of model through gtk_cell_layout_set_attributes.
e.g 
  gtk_cell_layout_set_attributes
(icon_view,cell,"icon-name",0,"pixbuf",1,NULL);
where 0 => STRING type column
      1 => PIXBUF type column

if i have icon present in icon theme i set icon-name for corresponding
item if not then i set pixbuf from some filepath.
But in this case it will display only named icons[since attribute list
is reversed it will first set pixbuf property of renderer and then it
will set icon-name which will override previously set pixbuf].

It used to work in 2.12.9 but not in 2.14.3 onwards

Thanks.
Amol


> 
> ciao,
>     Christian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]