Re: GtkAction and GIcon
- From: "A. Walton" <awalton gnome org>
- To: "Jannis Pohlmann" <jannis xfce org>
- Cc: gtk-devel-list gnome org
- Subject: Re: GtkAction and GIcon
- Date: Tue, 6 Jan 2009 01:29:26 -0500
2009/1/5 Jannis Pohlmann <jannis xfce org>:
> Hey,
>
> wow, this is actually my first post to this list, after working with
> GTK+ for more than three years.
> I'm currently porting Thunar (the Xfce file manager) to GIO/GVfs.
> Thunar has its own data structures for MIME handlers at the moment but
> for obvious reasons I'd like to make it use GAppInfo from now on.
>
> Thunar provides a list of applications that can handle all selected
> files in the context menu under "Open Width". In fact, "Open Width" is
> just a submenu containing GtkActions for all of these applications.
> Besides the application name each action also displays the application
> icon using the "icon-name" property of GtkAction. Here's where I am
> stuck.
>
> The only icon information GAppInfo provides is a GIcon. GIcon has
> no icon name. There are functions to create images based on a GIcon,
> but GtkAction only has support for stock IDs and icon names (so no
> pixbufs or whatsoever).
>
> I found an old thread about that on
> http://mail.gnome.org/archives/gtk-devel-list/2008-January/msg00056.html.
> It seems that part of what Matthias suggested was implemented, but the
> last part ("Beyond the icon theme code, we have a number of APIs based
> on icon names in GTK+ ... GtkAction::icon-name ... At least a few of
> these should probably get a gicon counterpart") wasn't.
>
> So, I basically have two questions:
>
> 1. How do you create GtkActions with icons based on GIcon?
This is not possible at the moment. Filed #566733 [1] and attached a
preliminary patch.
>
> 2. Are there any plans on adding GIcon counterparts for
> icon-name-based APIs as suggested by Matthias?
If there's anywhere else it's missing that affects applications, we
really should patch it up for 2.16.
-A. Walton
[1]: http://bugzilla.gnome.org/show_bug.cgi?id=566733
>
> Thanks in advance,
> Jannis
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]