Bug Hunting Session
Bug 70553 - Update .desktop files to use freedesktop actions
Summary: Update .desktop files to use freedesktop actions
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other Linux (All)
: low minor
Assignee: Jean-Baptiste Faure
URL:
Whiteboard: target:4.2.0 target:4.3.0
Keywords: difficultyBeginner, easyHack, skillScript
Depends on:
Blocks:
 
Reported: 2013-10-16 23:13 UTC by Björn Michaelsen
Modified: 2016-02-18 16:37 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
proposed patch (5.68 KB, patch)
2013-10-26 09:05 UTC, Jean-Baptiste Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2013-10-16 23:13:40 UTC
Desktop files in sysui/desktop/menus still use an old unity quickstart action:

[X-New Shortcut Group]
UnityQuicklist=New Document
Exec=libreoffice --base %%FILE%%
TargetEnvironment=Unity

Instead it should use a new style quicklist entry as per https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles:

Actions=NewDocument;

[Desktop Action NewDocument]
Name=New Document
Exec=libreoffice --writer %%FILE%%
OnlyShowIn=Unity;
Comment 1 Jean-Baptiste Faure 2013-10-17 04:32:41 UTC
AFAIK .desktop files are in /core/sysui/desktop/menus/
Not sure if it is enough to modify these files.

Best regards.
Comment 2 Jean-Baptiste Faure 2013-10-26 09:05:12 UTC
Created attachment 88144 [details]
proposed patch

Here is a patch that updates desktop files.
Proposed changes are:
- reactivate StartCenter and Math desktop file: NoDisplay keyword set to false
- add "New Document" menu for each module in StartCenter desktop file
- make desktop files more standard conforming (hopefully) : 
  a- removed X-Ayatana-Desktop-Shortcuts keyword
  b- %U parameter is useless when creating a new document
  c- use OnlyShowIn keyword instead of TargetEnvironment
Comment 3 Maxim Monastirsky 2013-10-26 17:27:07 UTC
@Jean-Baptiste Faure: There is no need to set NoDisplay=false, you just need to remove this line completely.
Comment 4 Jean-Baptiste Faure 2013-10-26 19:40:03 UTC
(In reply to comment #3)
> @Jean-Baptiste Faure: There is no need to set NoDisplay=false, you just need
> to remove this line completely.

I know, the idea was to keep track of the hidden state of the StartCenter and the Math module in previous version.

Best regards. JBF
Comment 5 Björn Michaelsen 2013-10-31 21:27:12 UTC
FWIW, I had a vendor patch for this in on 4.1, but will of course push _your_ changes as soon as I am back home.
Comment 6 Björn Michaelsen 2013-11-02 17:12:51 UTC
Pushed, Thanks Jean-Baptiste!
Comment 7 Commit Notification 2013-11-02 17:19:47 UTC
Jean-Baptiste Faure committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=78e4c8a925f4735a7e9a4c32a29b19fd2b77670d

fdo#70553: Fix Unity Quicklists



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Jean-Baptiste Faure 2013-11-03 09:05:56 UTC
Thank you Björn :-)

Could this patch be backported to 4.1 ? If I am not wrong, before this change desktop files were identical in 4.1 and the master.

Best regards. JBF
Comment 9 Jean-Baptiste Faure 2013-11-05 14:32:17 UTC
(In reply to comment #8)
> Thank you Björn :-)
> 
> Could this patch be backported to 4.1 ? 

Perhaps not so good idea because this would imply to add translatable strings.

Best regards. JBF
Comment 10 Björn Michaelsen 2013-11-08 23:37:41 UTC
I vendorpatched that independently on 4.1 for Ubuntu. The PPA versions should already have this patched and this should also go into the archive with the next SRU, so TBH I dont want to backport that patch (just to kick out the vendor patch there).
Comment 11 David Tardon 2014-01-23 12:22:45 UTC
(In reply to comment #2)
> Created attachment 88144 [details] [review]
> proposed patch
> 
> Here is a patch that updates desktop files.
> Proposed changes are:
> - reactivate StartCenter 

Why? What good does it do to the user, when there are already separate records for the applications?

> and Math desktop file: NoDisplay keyword set to
> false

This is a regression from bug 41681. IIRC the consensus of most distro maintainers was not to show it. (And yes, there is no way to please users anyway. We have got bugs in Fedora asking for both.)
Comment 12 Commit Notification 2014-01-23 12:40:45 UTC
David Tardon committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=12546c8511f0cc8eec0ca7e8cb86ff00dfd429e6

regression since fdo#70553



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Maxim Monastirsky 2014-01-23 13:12:16 UTC
(In reply to comment #11)
> (In reply to comment #2)
> > Proposed changes are:
> > - reactivate StartCenter 
> 
> Why? What good does it do to the user, when there are already separate
> records for the applications?
Hi David,

What the point of having a "Start" center if no one will ever see it when he "starts" the application?
Comment 14 David Tardon 2014-01-23 13:28:33 UTC
(In reply to comment #13)
> (In reply to comment #11)
> > (In reply to comment #2)
> > > Proposed changes are:
> > > - reactivate StartCenter 
> > 
> > Why? What good does it do to the user, when there are already separate
> > records for the applications?
> Hi David,
> 
> What the point of having a "Start" center if no one will ever see it when he
> "starts" the application?

I doubt anyone just wants to start the application. One wants to create a document or presentation or...
Comment 15 Maxim Monastirsky 2014-01-23 13:40:57 UTC
(In reply to comment #14)
> I doubt anyone just wants to start the application. One wants to create a
> document or presentation or...
Or to open recently edited document. The new start center allows to do that in a convenient way, instead of opening the file browser and navigating through endless folders...
Comment 16 Jean-Baptiste Faure 2014-01-23 17:46:48 UTC
(In reply to comment #14)
> [...]
> I doubt anyone just wants to start the application. One wants to create a
> document or presentation or...

So, to be consistent, you should commit a patch to remove the StartCenter, including for the MS-Windows version. Very strange idea to remove the visibility of the StartCenter when we create a new one.

If Linux distributions maintainers do not want give the access to the StartCenter and the Math module, they can do that in their distro build without deciding for all Linux users.

Best regards. JBF
Comment 17 David Tardon 2014-01-23 18:15:54 UTC
(In reply to comment #16)
> (In reply to comment #14)
> > [...]
> > I doubt anyone just wants to start the application. One wants to create a
> > document or presentation or...
> 
> So, to be consistent, you should commit a patch to remove the StartCenter,
> including for the MS-Windows version. Very strange idea to remove the
> visibility of the StartCenter when we create a new one.

To be honest, I do not care much either way. And _if_ this was changed as a result of a discussion (or a bug) that said: "Hey, we have a shiny new start center. Let's all the users see it!", I would not say anything. But it was not, so I see it as a regression.

> 
> If Linux distributions maintainers do not want give the access to the
> StartCenter and the Math module, they can do that in their distro build
> without deciding for all Linux users.

Well, we tend to assume the majority of linux users gets libreoffice through their distribution. And the last time this come up, more distro maintainers were for disabling than against it. If that has changed, so be it. We patched it in Fedora before; we can do it again...

Note that math has been hidden since 3.5 and nobody has protested. Startcenter was only hidden in 4.1, but I do not remember any bugs related to that either...
Comment 18 Samuel Mehrbrodt (CIB) 2014-01-23 18:32:36 UTC
Well, I don't think the start center is of great use for Linux users.
For Windows it's ok, you need to put something on their desktop so they can find the program they installed.
But I doubt there are many Linux users who use the start center. I have it there since 4.1 but have never opened it.

But I'm not sure what's the reason Math is hidden.
Comment 19 Maxim Monastirsky 2014-01-23 19:07:16 UTC
(In reply to comment #17)
> Startcenter was only hidden in 4.1, but I do not remember any bugs related
> to that either...
There is Bug 70133. Also keep in mind that Debian/Ubuntu patched 4.1 to re-enable the start center, and that might be the reason we don't have many reports about it.
Comment 20 David Tardon 2014-01-23 20:55:55 UTC
(In reply to comment #19)
> (In reply to comment #17)
> > Startcenter was only hidden in 4.1, but I do not remember any bugs related
> > to that either...
> There is Bug 70133.

... where the reporter does not say why he needs it, just that it is missing. Cue http://xkcd.com/1172/ .

> Also keep in mind that Debian/Ubuntu patched 4.1 to
> re-enable the start center, and that might be the reason we don't have many
> reports about it.

But that does not supports the "generic unix" case. Reciprocally, keep in mind that Fedora has had it disabled for at least 4 releases and we have not had any bug reports concerning that either.

> Or to open recently edited document. The new start center allows to do
> that in a convenient way, instead of opening the file browser and
> navigating through endless folders...

And only allows to do that one document at a time, because as soon as you have opened one, the only way to go back to the start center is to close the document. So the user needs to remember two ways to access recently opened documents. (Three, actually, because the desktop typically offers one as well.) 

But whatever... I have had enough of this discussion. I will revert my earlier commit and just handle it in Fedora.
Comment 21 Tor Lillqvist 2014-01-23 20:58:18 UTC
David, don't give up! This is just getting fun.
Comment 22 Commit Notification 2014-01-23 21:00:40 UTC
David Tardon committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a2b2f2d5194313f6a53d35eee39357dbca5f0bd4

Revert "regression since fdo#70553"



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 23 Robinson Tryon (qubit) 2015-12-15 23:20:34 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript )
[NinjaEdit]
Comment 24 Robinson Tryon (qubit) 2016-02-18 16:37:23 UTC
Remove LibreOffice Dev List from CC on EasyHacks
(curtailing excessive email to list)
[NinjaEdit]