开发者

How to change the emblem of a file-icon with C/C++ in GNOME?

开发者 https://www.devze.com 2023-03-01 15:52 出处:网络
I\'m developing an App which works like Dropbox. I want to dynami开发者_运维百科cally change the emblem of a file during synchronization. Like this:

I'm developing an App which works like Dropbox. I want to dynami开发者_运维百科cally change the emblem of a file during synchronization. Like this:

How to change the emblem of a file-icon with C/C++ in GNOME?

Is there any solution to this with Qt/C++?


You do not need Qt for doing this. But you will need C calls to do it. You can create an extension for Nautilus and use NautilusInfoProvider and NautilusFileInfo, in particular nautilus_file_info_add_emblem().

If you implement NautilusInfoProvider and register your extension, then, Nautilus will call nautilus_info_provider_update_file_info. There you can implement the logic to check the file status and set the icon properly (with nautilus_file_info_add_emblem()). However, I would recommend you to call that function when the application is idle.

0

精彩评论

暂无评论...
验证码 换一张
取 消