Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support changing tabs using mouse wheel for Gtk3 #872

Open
carrotIndustries opened this issue Jan 17, 2016 · 11 comments
Open

Support changing tabs using mouse wheel for Gtk3 #872

carrotIndustries opened this issue Jan 17, 2016 · 11 comments

Comments

@carrotIndustries
Copy link

Unfortunately Gtk3 dropped the support for flipping through notebook pages for 'usability reasons' without making it available again with some kind of options. So applications like gnome-terminal started to re-implement this feature.
For maintaining feature parity with the Gtk2 backend, geany should re-implement scrolling through notebook pages as well.

@carrotIndustries carrotIndustries changed the title [enhancement] Support changing tabs using mouse wheel for Gtk3 Support changing tabs using mouse wheel for Gtk3 Jan 17, 2016
@dagbdagb
Copy link

There are two ways to do this. At least on my computer, firefox and chrome illustrates this.

In chrome, hovering over the tab bar and scrolling, the active tab changes as you scroll.

In firefox, hovering over the tab bar and scrolling, the tab bar scrolls sideways, but the active tab does not change as you scroll.

I much prefer the firefox way, as it prevents that what I am currently reading disappears when I scroll after having mispositioned my mouse cursor.

@elextr
Copy link
Member

elextr commented Mar 25, 2019

@dagbdagb you may notice that there are lots of thumbs up, but no implementation has turned up in three years. If you implement it you can probably choose your favourite, although IIRC the former GTK2 way was closer to the Chrome one.

@dagbdagb
Copy link

Well and duly noted. Not much of a programmer, though.

@codebrainz
Copy link
Member

@elextr
Copy link
Member

elextr commented Mar 26, 2019

Thanks @codebrainz clearly GTK isn't getting it back anytime soon. I note the Geany maintainer was very anti the removal, but even he hasn't come up with a re-implementation in Geany.

@VanessaE
Copy link

VanessaE commented May 27, 2019

This is just the latest in a string of GTK3-related breakages that just makes otherwise-good programs either a pain in the ass to use or just plain UGLY. The desktop world should have stuck to GTK2 - GTK3 is just not ready for actual humans to use.

@elextr
Copy link
Member

elextr commented May 27, 2019

@VanessaE no matter how passionate you feel, ranting about GTK on a project that is simply a user of GTK will do nothing.

@VanessaE
Copy link

VanessaE commented May 27, 2019

@elextr , granted, but there was a choice being made to make Geany use GTK3 instead of sticking with 2. I won't fault the author for making sure Geany works with GTK3, but surely there's some way to at least defer to GTK2 if it's available.. especially since GTK2 ain't going away any time soon.

@elextr
Copy link
Member

elextr commented May 27, 2019

@VanessaE Geany has not made a choice, it works on both GTK-2 and GTK-3 and, as far as reasonably possible without re-implementing parts of GTK, works the same on both.

A distribution may have made a choice which version it wanted to package, but thats the distros choice, not Geanys, so again you have ranted at the wrong target.

@lah7
Copy link
Contributor

lah7 commented Jul 3, 2019

I had a stab at (re)implementing this as I know the MATE Desktop project had this issue when migrating from GTK2 to GTK3.

https://github.com/lah7/geany/commit/5bfad0da637836b63d087b791e7b26ebcb512580

This only reinstates scrolling over tabs in the main editor. I'd consider the commit incomplete as all the other tabs (notebook?) like the sidebar and preferences should add the scroll event too but I'm terribly unfamiliar with C and didn't have much luck at this point. Any help greatly appreciated.

But... it's a step towards having it back in GTK3 and doesn't impact the GTK2 build.


Scrolling over tabs is definitely part of my workflow. Too bad GTK3 requires each app to implement it separately. Unfortunately for me, as I switched distributions and finally made use of my HiDPI display, GTK2 is out of the question, as much as I like GTK2.

lah7 added a commit to lah7/gtk3-classic that referenced this issue Apr 10, 2021
A behaviour observed in GTK2, but was removed in GTK3. Restores the
ability to use mouse wheel to switch between tabs (GtkNotebook).

Example programs (that haven't been re-implemented)
- Geany: geany/geany#872
- MATE System Monitor:
mate-desktop/mate-applets#398

Reuses an old patch contributed in:
https://gitlab.gnome.org/GNOME/gtk/-/issues/234

Closes #25.
@lah7
Copy link
Contributor

lah7 commented Apr 12, 2022

For any one watching this issue - this feature is back for the document tabs! (#3134)

Some further work is needed to fully restore other tabs: like the sidebar, message window and preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants