[Gambas-devel] Stock class

Daniel Campos dcamposf at ...176...
Thu Jul 20 14:18:43 CEST 2006


Hi:

Most of the GTK+ default icons are stored in the same GTK+ library, not in
the file system. When the default theme changes, then the functions in
charge of creating an icon having a key name looks if theme provides an
alternate new icon (that icon is in the file system, if it exists), via the
theme low level functions, returning the new icon or the default icon if it
does not exist.

The real path of an icon (embed in the library or a real file) is managed
internally by the GTK+ theme engines, so you should not look for them
directly. I think you should implement any kind of callback in the
gb.gtkcomponent instead, using  the stock functions to get the icon:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-Stock-Items.html

http://developer.gnome.org/doc/API/2.0/gtk/GtkIconTheme.html

http://developer.gnome.org/doc/API/2.0/gtk/gtk-Themeable-Stock-Images.html

I have already some code written about that in the gb.gtk component.

About the GNOME extensions, I think you should not care about it: the
gnome-ui libraries are going to dissapear in the next releases of GNOME. All
the graphical part of the GNOME libraries will be managed directly by GTK+,
so any code using current GNOME feautes probably will be deprecated when a
stable version gb.gtk would arrive.

A bit more about gb.gtk: I recommend to start using GTK+-2.10, as it is the
first version with printing support (for the Printer class), using Cairo it
is able to manage also vectorial drawing (for Drawing class and SVG files),
and the standard dialogs have been improved allowing better integration of
the current gb.qt features in that field. It is binary compatible with
GTK+2.x older versions, and compiling and installing the source stack (glib,
atk, pango, gtk+) replaces automagically to old libraries, so you can keep
the rpm or deb system intact to not fall in dependencies problems, even if
these files are deleted from disk :-)

Daniel




2006/7/20, Benoit Minisini <gambas at ...1...>:
>
> On Thursday 20 July 2006 00:58, Fabien Bodard wrote:
> >
> > 2 day to search that ... :/ but i've not found it !
> >
> > the second problem is to get the current theme path !
> >
> > I'm not sure that a pure gambas class will be sufficient ! as kde libs
> > allow to implement theme effect too like the gnome libs.
> >
> > > Regards,
> >
>
> I found it for KDE:
>
> EXEC ["kde-config", "--path", "icon"] TO sPath
> PRINT sPath
>
> Now for GNOME?
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20060720/49ff7713/attachment.html>


More information about the Devel mailing list