GNOME Bugzilla – Bug 641949
Open new links in tabs if new-windows-in-tabs preference is set
Last modified: 2012-09-12 16:20:22 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.
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.
Cant we do that now within the UI freeze or should we wait for the next cycle ?
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).
(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.
(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.
(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.
(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!
(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.
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
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).
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.
(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.
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
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.
Created attachment 224130 [details] [review] present_window.diff And now present the windows too.
Both patches look good and make sense.
Comment on attachment 224124 [details] [review] session_tab.diff Committed.
Comment on attachment 224130 [details] [review] present_window.diff Committed.
Closing.