emblems api
Nick Schermer
nickschermer at gmail.com
Thu Jul 23 08:53:08 CEST 2009
2009/7/22 Peter de Ridder <peter at xfce.org>:
> On Tue, Jul 21, 2009 at 9:42 AM, Nick Schermer<nickschermer at gmail.com> wrote:
>> For ThunarxFileInfoIface we only need to add a virtual method void
>> (*add_emblem) (ThunarxFileInfo *file_info, const gchar *emblem_name);
>> including a function thunarx_file_info_add_emblem(), maybe a
>> remove_emblem call too, that probably makes sense for the vcs plugin.
>
> I would agree to a thunarx api since other desktop environment would
> implement this plugin related stuff there way.
> You "specify" an api to set/unset emblems to a file, this would be
> sufficient for a plugin like vcs plugin. But, especially, for the vcs
> plugin this would mean it needs to listen to all file changes to see
> if a file has changed and emblems need updating.
> Would a provider plugin api, more like how the context menu works, be
> a better choice? A thunarx-emblem-provider to query a plugin about the
> emblems in the current view, since emblems are only interesting when
> viewed.
Maybe more global implementation would be a new thunarx provider to
allow the plugins to monitor the current view. If that provider send a
list of ThunarxFileInfo's the plugin can alter, then you can use for
example the thunarx_file_info_add_emblem() function to set the
required emblems.
> Another option would be to emit signal to a plugin about which
> directory is currently viewed so it can update visual information
> about that directory (emblems and maybe other info too), this could
> use add_emblem, remove_emblem without a file change listener.
Yeah that could work, but then we abuse the iface and turn it in to
possible monitor implementation, let's keep the iface for change 1
file at a time.
Nick
More information about the Xfce4-dev
mailing list