After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792849 - Add preferences action to .desktop file
Add preferences action to .desktop file
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-24 00:08 UTC by Egmont Koblinger
Modified: 2018-08-22 07:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egmont Koblinger 2018-01-24 00:08:37 UTC
Add something like this to the desktop file:

    [Desktop Entry]
    [...]
    Actions=Preferences;

    [Desktop Action Preferences]
    _Name=Preferences
    Exec=gnome-terminal --preferences

This way on unity7's and gnome-shell's (at least the Ubuntu flavor) launcher, the desktop icon has a right-click entry to invoke preferences.

Useful e.g. if the user has locked that icon to the launcher, and later screws up g-t's prefs.

Firefox and Chrome have similar options to open private a.k.a. incognito mode.

Requires to add startup notification when g-t is invoked this way.
Comment 1 Christian Persch 2018-08-21 12:52:51 UTC
Fine with me.

> Requires to add startup notification when g-t is invoked this way.

What do you mean? g-t should have startup notification already.
Comment 2 Egmont Koblinger 2018-08-21 13:16:07 UTC
Not when started up with --preferences, if I remember correctly. I think I got stuck with a spinning wheel until it timed out.
Comment 3 Christian Persch 2018-08-21 16:35:10 UTC
Could you try with master? I think the latest commit should have fixed that.
Comment 4 Egmont Koblinger 2018-08-21 20:13:33 UTC
> Could you try with master? I think the latest commit should have fixed that.

Confirmed, thanks!
Comment 5 Egmont Koblinger 2018-08-21 20:18:00 UTC
At least in Unity7 (not sure about real GNOME) these "actions" show up first, followed by the main entry to launch the app.

It would look silly if the first entry was "Preferences" and the next would be to open a terminal.

In accordance, firefox and chrome have explicit "action" entries for the main operation (opening a new window) too, not just for the private/incognito mode.

I guess we should follow this pattern too.

(Shall we squeeze it in to 0-53, relying on existing UI strings?)
Comment 6 Egmont Koblinger 2018-08-21 20:23:49 UTC
Oh, and it has another beautiful property. The "default" thing just focuses the existing gnome-terminal window, whereas the "New" entry would always open a new one.

So it should be something like:

    [Desktop Entry]
    [...]
    Actions=new;prefs;

    [Desktop Action new]
    _Name=New Window
    Exec=gnome-terminal

    [Desktop Action prefs]
    _Name=Preferences
    Exec=gnome-terminal --preferences
Comment 7 Christian Persch 2018-08-21 20:43:50 UTC
If there's no new UI strings necessary, should be fine to squeeze into g-t 3.29.92 :-)
Comment 8 Egmont Koblinger 2018-08-22 07:49:22 UTC
Submitted.