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 641949 - Open new links in tabs if new-windows-in-tabs preference is set
Open new links in tabs if new-windows-in-tabs preference is set
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-09 18:34 UTC by Stanislav Brabec
Modified: 2012-09-12 16:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
session_tab.diff (1.74 KB, patch)
2012-09-12 15:17 UTC, Xan Lopez
committed Details | Review
present_window.diff (2.17 KB, patch)
2012-09-12 16:09 UTC, Xan Lopez
committed Details | Review

Description Stanislav Brabec 2011-02-09 18:34:32 UTC
I would like to open links in tabs by default and try to open mails with balsa. It is no more possible, I can just select Epiphany or Firefox and Evolution and nothing else.

There is no way to define "epiphany -n" or "balsa" any more.
Comment 1 Bastien Nocera 2011-03-17 12:39:51 UTC
For balsa, it should add to its desktop that it can handle a "x-scheme-handler/mailto" mime-type, and will automatically show up in the default applications list.

As for tweaking "epiphany -n", it should be a preference within Epiphany, rather than something you tweak outside it. Reassigning to my fav web browser.
Comment 2 Alexandre Mazari 2011-03-18 10:14:15 UTC
Cant we do that now within the UI freeze or should we wait for the next cycle ?
Comment 3 Gustavo Noronha (kov) 2011-03-18 14:34:52 UTC
FWIW, Epiphany already has such an option in its dconf settings /apps/epiphany new-windows-in-tabs.  The only problem is this option seems to only be respected when clicking links or when javascript opens new windows, we would just need to make it also be respected when new windows are requested from outside epiphany (and I think that would make sense).
Comment 4 Xan Lopez 2011-03-18 14:37:57 UTC
(In reply to comment #3)
> FWIW, Epiphany already has such an option in its dconf settings /apps/epiphany
> new-windows-in-tabs.  The only problem is this option seems to only be
> respected when clicking links or when javascript opens new windows, we would
> just need to make it also be respected when new windows are requested from
> outside epiphany (and I think that would make sense).

Agreed. I'm still on the fence about adding a UI option for it post 3.0 though.
Comment 5 Reinout van Schouwen 2011-03-19 23:50:58 UTC
(In reply to comment #3)
> FWIW, Epiphany already has such an option in its dconf settings /apps/epiphany
> new-windows-in-tabs.  The only problem is this option seems to only be
> respected when clicking links or when javascript opens new windows, we would
> just need to make it also be respected when new windows are requested from
> outside epiphany (and I think that would make sense).

Perhaps in GNOME 3 the Preferred Applications preferences panel has changed?
At least in 2.32, you can indicate there that you want links to be opened in tabs. When selected, this causes Epiphany to be called with the --new-tab parameter when opening a link from, for instance, Evolution.
Comment 6 Bastien Nocera 2011-03-20 00:00:43 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > FWIW, Epiphany already has such an option in its dconf settings /apps/epiphany
> > new-windows-in-tabs.  The only problem is this option seems to only be
> > respected when clicking links or when javascript opens new windows, we would
> > just need to make it also be respected when new windows are requested from
> > outside epiphany (and I think that would make sense).
> 
> Perhaps in GNOME 3 the Preferred Applications preferences panel has changed?
> At least in 2.32, you can indicate there that you want links to be opened in
> tabs. When selected, this causes Epiphany to be called with the --new-tab
> parameter when opening a link from, for instance, Evolution.

Yes, we removed those options in the default applications selection. Those are just that now, default applications. You cannot choose, or add options how your application will be launched.
Comment 7 Reinout van Schouwen 2011-03-20 16:05:43 UTC
(In reply to comment #6)

> Yes, we removed those options in the default applications selection. Those are
> just that now, default applications. You cannot choose, or add options how your
> application will be launched.

A bit of a shame then, that a former desktop-wide pref is forced back into the browser UI!
Comment 8 Bastien Nocera 2011-03-20 16:38:50 UTC
(In reply to comment #7)
> (In reply to comment #6)
> 
> > Yes, we removed those options in the default applications selection. Those are
> > just that now, default applications. You cannot choose, or add options how your
> > application will be launched.
> 
> A bit of a shame then, that a former desktop-wide pref is forced back into the
> browser UI!

The code to do this for multiple different browsers was unwieldly, and bad. And we had more than just epiphany to support.

FWIW, Chrome doesn't offer an option here, and will only create new windows when the user asks for one, never for newly opened links.
Comment 9 Stanislav Brabec 2011-03-22 12:06:16 UTC
Balsa issue from comment 0 was fixed in a way suggested in comment 1 in a separate bug 645444. Bug 645447 was found and reported.

Using the balsa way (two separate desktop files) is usable here as well.
epiphany-new-tab.desktop would contain:
X-GNOME-FullName=Epiphany New Tab
Exec=epiphany -n %U
NoDisplay=true
Comment 10 Bastien Nocera 2011-03-22 18:27:48 UTC
I don't think this scales as a solution.

Balsa's problem is a different one, and one solely within Balsa's ability to fix (it needs to check whether it's passed a file or a mailto: URI before checking on how to proceed).
Comment 11 Stanislav Brabec 2011-03-23 17:09:46 UTC
Yes, it works. I did it just now as a work-around for this regression in GNOME 2.32:

Copy /usr/share/applications/epiphany.desktop to /usr/share/applications/epiphany-new-tab.desktop, then edit Exec=epiphany -n %U, add NoDisplay=true, and adjust X-GNOME-FullName=New Tab in Epiphany Web Browser and Name=Epiphany New Tab (and delete out-of-sync translations). Then call update-desktop-database.

As a user, run gnome-default-applications-properties, pick "New Tab in Epiphany Web Browser". Works as expected.
Comment 12 Dmitrij D. Czarkoff 2011-09-05 14:31:12 UTC
(In reply to comment #1)
> As for tweaking "epiphany -n", it should be a preference within Epiphany,
> rather than something you tweak outside it. Reassigning to my fav web browser.

Sorry for raising deads, but I can't agree with that:

1. There are different browsers, and some of them just don't share that opinion.
2. It is not enough to open a link in a new tab; GNOME should also raise the actual window the tab is opened in, which should not depend on browser's internal policy on new windows/tabs.
3. Generally, there could be some other options that are not supposed to reflect the application defaults.

Effectively, the whole command line of the default application should be configurable. And if that is supposed to be done with creating a separate ".desktop" entry, that should be made clear by the preference window.
Comment 13 Simon Schampijer 2012-07-31 10:01:35 UTC
Looks like there have been several requests to open a link clicked on in an external application in a new tab in epiphany (or the equivalent in the new pages design) and not opening a new epiphany window for that.

For the record, Firefox is doing the same thing, you request to open a link from an within an external application and it is opened in a new tab in Firefox and the application is focused.

Bugs that are related, if not even dups to this one, are: 

https://bugzilla.gnome.org/show_bug.cgi?id=658344

https://bugzilla.gnome.org/show_bug.cgi?id=651590
Comment 14 Xan Lopez 2012-09-12 15:17:35 UTC
Created attachment 224124 [details] [review]
session_tab.diff

This should take care of the main issue. We still need to present the window somehow, but that's more complex than it seems (for instance multiple links might be queued to be opened), so better do it in a follow-up patch.
Comment 15 Xan Lopez 2012-09-12 16:09:35 UTC
Created attachment 224130 [details] [review]
present_window.diff

And now present the windows too.
Comment 16 Claudio Saavedra 2012-09-12 16:12:54 UTC
Both patches look good and make sense.
Comment 17 Xan Lopez 2012-09-12 16:19:57 UTC
Comment on attachment 224124 [details] [review]
session_tab.diff

Committed.
Comment 18 Xan Lopez 2012-09-12 16:20:02 UTC
Comment on attachment 224130 [details] [review]
present_window.diff

Committed.
Comment 19 Xan Lopez 2012-09-12 16:20:22 UTC
Closing.