Ticket #2314 (accepted enhancement)
Freedesktop standard .desktop entry for Midnight Commander
Reported by: | ssuominen | Owned by: | andrew_b |
---|---|---|---|
Priority: | trivial | Milestone: | Future Releases |
Component: | mc-core | Version: | master |
Keywords: | Cc: | gotar@…, zaytsev, egmont, info@… | |
Blocked By: | Blocking: | #4079 | |
Branch state: | on rework | Votes for changeset: |
Description
It would be nice if Midnight Commander would appear in menu's by default. This version I've attached is per latest Freedesktop.org menu-spec standard ( http://standards.freedesktop.org )
- Install this file:
http://www.midnight-commander.org/chrome/site/MidnightCommander.png
To path:
/usr/share/icons/hicolor/64x64/apps/MidnightCommander.png
- Install attached file, "MidnightCommander?.desktop":
To path:
/usr/share/applications/MidnightCommander.desktop
Attachments
Change History
comment:1 Changed 14 years ago by ssuominen
The Icon can also go to /usr/share/pixmaps/, but that's more of a... legacy directory, I recommend using the hicolor icon theme path.
comment:2 Changed 14 years ago by gotar
- Cc gotar@… added
I'm sure I've already told here about reinventing the wheel, but again:
http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/mc/mc.desktop
http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/mc/mc.png
comment:3 Changed 14 years ago by zaytsev
- Cc zaytsev added
- Milestone changed from 4.7.4 to 4.7.5
Hi!
I like the idea, but I don't like your icon. I created one in Inkscape basing upon Tango icons for gnome-terminal and gnome-screensaver. What do you think, guys? Shall this be included by default?
Attached:
- mc.desktop from PLD CVS
- mc.svg (self made)
comment:4 Changed 14 years ago by gotar
It's really nice. There is midnight, maybe some battleship with commander fits too? ;)
comment:5 Changed 14 years ago by zaytsev
He-he, don't overestimate my artistic abilities. I have just superimposed the icons one on top of another ala old good gnome-terminal-night icon. If there are any PLD artists that can make it more beautiful of course this effort is always welcome.
comment:6 follow-up: ↓ 8 Changed 14 years ago by ssuominen
Please don't use "mc" as the name of the icon or desktop entry, because it's so short it might actually collide with some other package. I'd prefer longer name, such as "midnightcommander" or "MidnightCommander?", that way it won't cause problems for sure.
Just my 2 cents.
Btw, the SVG icon looks nice (although it's almost identical to the gnome-screensaver icon)
comment:7 follow-up: ↓ 9 Changed 14 years ago by zaytsev
midnight-commander.* doesn't sound too bad to me, this is the standard naming for icons as far as I can see.
comment:8 in reply to: ↑ 6 Changed 14 years ago by gotar
Replying to ssuominen:
Please don't use "mc" as the name of the icon or desktop entry, because it's so short it might actually collide with some other package.
No, it won't. We've got 15000 spec files (i.e. packages not counting splits) in PLD Linux and no such conflict exists.
comment:9 in reply to: ↑ 7 Changed 14 years ago by gotar
Replying to zaytsev:
midnight-commander.* doesn't sound too bad to me, this is the standard naming for icons as far as I can see.
As long as it's possible package resources should be named exactly like package itself, so there are /etc/mc, /usr/lib/mc and /usr/share/mc inside mc-X.Y.Z-R.arch.rpm. There's no single file with uncollapsed name, so this would be inconsistent.
And the most popular naming scheme involves not project name, but binary name (in this case 'mc' too).
comment:10 follow-up: ↓ 11 Changed 14 years ago by ssuominen
/usr/share/apps/konsole/mc.desktop konsole [m68k]
/usr/share/link-monitor-applet/flags/mc.svg link-monitor-applet-common
too many mc.png's to even count:
but whatever you say... I just wanted to play it safe :)
comment:11 in reply to: ↑ 10 Changed 14 years ago by gotar
Replying to ssuominen:
/usr/share/apps/konsole/mc.desktop konsole [m68k]
/usr/share/apps is KDE directory, m68k is unofficial port
/usr/share/link-monitor-applet/flags/mc.svg link-monitor-applet-common
This is app-specific directory.
too many mc.png's to even count:
Exactly 14 to be specific;) every one in it's own directory.
but whatever you say... I just wanted to play it safe :)
If some minor, not widely used nor important project would like to use 'mc' in a future... well, it would be their problem. MC by it's history owns the right to this short name.
comment:12 Changed 13 years ago by andrew_b
- Branch state set to no branch
- Milestone changed from 4.7.5 to Future Releases
comment:13 Changed 9 years ago by andrew_b
Ticket #3592 has been marked as a duplicate of this ticket.
comment:14 follow-up: ↓ 15 Changed 8 years ago by andrew_b
Ticket #3812 has been marked as a duplicate of this ticket.
comment:15 in reply to: ↑ 14 Changed 8 years ago by asy
comment:16 Changed 8 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.20
Branch: 2314_mc_freedesktop
changeset:cdcc78fa5099f7672190ef44ab9c5cf58f9b232e
comment:17 follow-up: ↓ 19 Changed 8 years ago by egmont
In many projects, the .desktop file is generated from a .desktop.in, propagating translations from the *.po files. (And also the other way around: .pot also takes the strings to be translated from .desktop.in.
I think we should also do the same. Otherwise, user-visible strings in the desktop menu will remain untranslated to most of the languages, and it'll be a PITA to manually update to the few languages where we actually get reports.
comment:19 in reply to: ↑ 17 Changed 8 years ago by andrew_b
Replying to egmont:
In many projects, the .desktop file is generated from a .desktop.in, propagating translations from the *.po files. (And also the other way around: .pot also takes the strings to be translated from .desktop.in.
Could you please give me some such project as example?
comment:20 Changed 8 years ago by egmont
Pretty much all GNOME applications, as far as I know. E.g. gnome-terminal :) Third party apps for GNOME often do this too, e.g. I've just checked geeqie and it's also a good example.
Note: Often (e.g. in gnome-terminal, but not in geeqie) there's a two-phase processing, starting from a .desktop.in.in file. I don't know what's the other phase, in which order they're executed, whether they're done before tarball creation (from autogen.sh) of after (from Makefile) etc... long story short, I'm not aware of the technical details, just the big picture.
comment:21 Changed 8 years ago by andrew_b
As described in https://wiki.gnome.org/MigratingFromIntltoolToGettext, gettext >= 0.19 is required to translation support of desktop files. But some LTS distros (such as Ubuntu 14.04) have gettext = 0.18.x.
comment:22 Changed 8 years ago by egmont
GNOME has been doing this for at least 10-15 years now. As suggested by that link (the link itself, I haven't clicked), probably it was done using intltool for a long time, and nowadays they're replacing it by a new enough gettext. We could go for intltool for now.
comment:25 Changed 7 years ago by Cool_IRON
I created an HD icon for MC.
What do you think?
Here it is
comment:34 Changed 22 months ago by zaytsev
Another source for a base desktop file:
https://github.com/MidnightCommander/mc/pull/176#issuecomment-1373535638