动态图标 - Ubuntu - Nautilus [英] Dynamic Icon - Ubuntu - Nautilus

查看:35
本文介绍了动态图标 - Ubuntu - Nautilus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ubuntu 中的 Nautilus 具有动态图标,这意味着它在运行时会发生变化,然后又会变回来.它会在 Unity 栏等中发生变化.例如,在复制文件时,我们会看到一个进度图标.

Nautilus in Ubuntu has dynamic icon, which means it changes during runtime then changes back. It changes in the Unity bar etc. for example when copying a file we see a progress icon.

我想知道这是怎么做到的?我也想让我的应用程序图标动态化,例如在一个过程中我想用另一个图标替换我的图标(我创建了一个在左上角有一个罐子的迷你图像).

I was wondering how is this done? I would like to make my applications icon dynamic too, for example during a process I would like to replace my icon with another icon ( i created that has a mini image of a can in the top left corner).

https://code.launchpad.net/~3v1n0/ubuntu/oneiric/nautilus/unity-launcher-support/+merge/70685

我在这里找到了这个:

https://www.mail-archive.com/search?l=desktop-bugs@lists.ubuntu.com&q=subject:%22[Bug+821598]+Re%3A+Show+progress+bar+in+nautilus+icon+on+launcher+when+the+user+copy+文件%22

如果有人可以与我分享 API 函数调用,我正在尝试将其转换为 ctypes.

If anyone can share with my the API function calls, I'm trying to convert this to ctypes.

此 youtube 视频演示了动态图标:http://www.youtube.com/watch?v=kpXlKM-9mIA

The dynamic icon is demonstrated in this youtube video: http://www.youtube.com/watch?v=kpXlKM-9mIA

推荐答案

不,nautilus 不会改变图标.相反,它告诉启动器嘿,请将进度设置为 X% 并将标签设置为 xyz".您可以在此处找到一些文档.据我所知,Unity 启动器不尊重通过 ewmh(_NET_WM_ICON & 朋友)动态更改图标,并且所有工作解决方案都非常黑客:编辑 .desktop 文件并发送一些信号以通知它已更改(看起来您已经看到了 相关答案)

No, nautilus is not changing icon. Instead, it tells to launcher "hey, please set progress to X% and label to xyz". You can find some documentation here. As far as I know unity launcher does not respect dynamic change of icon via ewmh ( _NET_WM_ICON & friends ) and all working solutions are very hackish: edit .desktop file and send some signals to notify it's changed (looks like you already seen related answer)

这篇关于动态图标 - Ubuntu - Nautilus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆