Re: GIO and Emblems
- From: "A. Walton" <awalton gnome org>
- To: "Axel von Bertoldi" <bertoldia gmail com>
- Cc: gtk-list gnome org
- Subject: Re: GIO and Emblems
- Date: Thu, 4 Dec 2008 15:41:59 -0500
2008/12/4 Axel von Bertoldi <bertoldia gmail com>:
> Hi There,
>
> I'm wondering how one can ultimately render an mime icon for a file (as a
> gtk image or something) including any emblems associated with the file.
>
> I'm getting the GIcon for the file and creating a gtk image from it using
> the code below:
>
>> GFileEnumerator *enumerator = g_file_enumerate_children (file,
>>
>> G_FILE_ATTRIBUTE_STANDARD_ICON,
>> 0, NULL,
>> &error);
>>
>> GFileInfo *file_info = NULL;
>> while ((file_info = g_file_enumerator_next_file (enumerator, NULL,
>> &error)) != NULL) {
>> GIcon *icon = g_file_info_get_icon (file_info);
>> GtkWidget *icon_widget = gtk_image_new_from_gicon (icon,
>> GTK_ICON_SIZE_MENU);
>> }
>
> Checking for emblems with either of the following always return FALSE:
>
>> G_IS_EMBLEMED_ICON (icon));
>>
>> G_IS_EMBLEM (icon));
>
> Again, how does one access and render any emblems associated with a file?
Someone correct me if I am wrong, but I don't think anything actually
uses this functionality as of yet, so the first step would be to
create something that could possibly give you back a GEmblemedIcon.
-A. Walton
>
> Thanks,
> axel.
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]