Programmatic control over emblems?



Hello.

I feel like I'm missing something obvious here.  I've an application
that uploads photos and I have been trying to get it to add an emblem
to files it has uploaded so I know they're done.  I've tried doing
something like this (not sure if this is remotely right, the docs for
GEmblem and friends aren't the most thorough):

    GFileIcon *emblem_icon = g_file_icon_new (...);
    GEmblem *emblem = g_emblem_new (emblem_icon);

    /* I have a GFileInfo* image_info from earlier */
    GIcon *old_icon = g_file_info_get_icon (image_info);
    GIcon *new_icon = g_emblemed_icon_new (image_info, emblem);
    g_file_set_icon (new_icon);

Sadly, this has no impact on the .nautilus/metadata/ files for the
relevant locations and no emblems appear as intended.  I noticed that
NautilusFileInfo also has an emblem add API, but thought that GEmblem
might be more appropriate since it's all Flashy and stuff.

I hope this is the right list, even though it concerns gio APIs, since
it concerns emblems, but I'll happily be redirected if I'm wrong :)

Cheers,
  Richard


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