Tux Guitar

Suggestions

Subject Assign icon to tabulature mimes



Author Message
Kamil Neczaj
Post: Oct 5th 2008 at 2:26 PM

Now, tabulatures' mime types don't have any icon. Could you assign audio-x-generic icon to these mimes?

I have read at freedesktop.org that there is an option to do that:
[quote]
If you add a new mime-type, you can already use the "generic-icon" property to
define an icon to use if no exactly matching icons are available. Possible
values are listed in the freedesktop.org.xml file:
(application-x-executable|audio-x-generic|font-x-generic|image-x-generic|package-x-generic|text-html|text-x-generic|text-x-generic-template|text-x-script|video-x-generic|x-office-address-book|x-office-calendar|x-office-document|x-office-presentation|x-office-spreadsheet)
#IMPLIED>
[/quote]


Back to Top
 
Julian
Post: Oct 5th 2008 at 2:50 PM

The mime-types depends on what package do you have.

As default i build GNU/Linux packages to make they run only extracting a .tar.gz (without need install it as root ).

It makes you don't tell the system tuxguitar is installed.
so there is no menu entries, mime-type associations, etc.

now, if you take a look to ubuntu package (.deb) it already have this options.

You can take a look to this file:
http://tuxguitar.svn.sourceforge.net/viewvc/tuxguitar/trunk/misc/tuxguitar.xml?view=markup

If you paste this file at: "/usr/share/mime/packages/"
and then exec (as root): update-mime-database /usr/share/mime

then:
.tg files will be associated with "audio/x-tuxguitar" mime type
.gtp,gp3,gp4,gp5 with "audio/x-gtp"
and .ptb with "audio/x-ptb".
You should see audio icons, and info on your windows manager.

At last, you need to tell system that "tuxguitar" can open these files.
if you have a tuxguitar.desktop entry at /usr/share/applications/
and it have the line:
MimeType=audio/x-tuxguitar;audio/x-gtp;audio/x-ptb
then exec: "update-desktop-database -q" to update cache.

You should able to open this mime-types with "tuxguitar"

As you see it need install some files on root paths, and exec some commands.
but i really don't like to do this when you don't have an installation control.
i mean, a lot of users can install these files easily if i add an script, but then it's not so easy to "uninstall" when you don't have a control (like dpkg, rpm, etc) of what was installed and what not

So this is why generic GNU/Linux packages don't have it.


Back to Top
 
Julian
Post: Oct 5th 2008 at 2:52 PM

I forgot to say, that after exec:
update-mime-database /usr/share/mime
and
update-desktop-database -q

You need to restart X system to changes take effect.
i'm sure there should be any way to "refresh changes" without restart it, but i don't know how.


Back to Top