Ticket #2314 (accepted enhancement)

Opened 7 years ago

Last modified 3 months ago

Freedesktop standard .desktop entry for Midnight Commander

Reported by: ssuominen Owned by: andrew_b
Priority: trivial Milestone: 4.8.20
Component: mc-core Version: master
Keywords: Cc: gotar@…, zaytsev, egmont
Blocked By: Blocking:
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 )

  1. Install this file:

http://www.midnight-commander.org/chrome/site/MidnightCommander.png

To path:

/usr/share/icons/hicolor/64x64/apps/MidnightCommander.png

  1. Install attached file, "MidnightCommander?.desktop":

To path:

/usr/share/applications/MidnightCommander.desktop

Attachments

MidnightCommander.desktop (184 bytes) - added by ssuominen 7 years ago.
mc.svg (41.9 KB) - added by zaytsev 7 years ago.
mc.desktop (580 bytes) - added by zaytsev 7 years ago.
mcedit.desktop (357 bytes) - added by asy 4 months ago.

Change History

Changed 7 years ago by ssuominen

comment:1 Changed 7 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 7 years ago by gotar

  • Cc gotar@… added

Changed 7 years ago by zaytsev

Changed 7 years ago by zaytsev

comment:3 Changed 7 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 7 years ago by gotar

It's really nice. There is midnight, maybe some battleship with commander fits too? ;)

comment:5 Changed 7 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 7 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 7 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 7 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 7 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 7 years ago by ssuominen

comment:11 in reply to: ↑ 10 Changed 7 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 6 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7.5 to Future Releases

comment:13 Changed 19 months ago by andrew_b

Ticket #3592 has been marked as a duplicate of this ticket.

comment:14 follow-up: ↓ 15 Changed 4 months ago by andrew_b

Ticket #3812 has been marked as a duplicate of this ticket.

Changed 4 months ago by asy

comment:15 in reply to: ↑ 14 Changed 4 months ago by asy

Replying to andrew_b:

Ticket #3812 has been marked as a duplicate of this ticket.

Ticket #3812 was similar but was not a duplicate. I copied the mcedit.desktop here. Now a duplicate.

comment:16 Changed 4 months 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

comment:17 follow-up: ↓ 19 Changed 4 months 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:18 Changed 4 months ago by egmont

  • Cc egmont added

comment:19 in reply to: ↑ 17 Changed 4 months 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 4 months 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 4 months 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 4 months 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:23 Changed 3 months ago by andrew_b

  • Branch state changed from on review to on rework
Note: See TracTickets for help on using tickets.