[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need help on fixing GTK3 File Chooser



On Sun, Apr 7, 2019 at 10:58 PM Pál Tamás Ács wrote:

> Dear Debian GTK+ Maintainers,

I'm not one of those, but hopefully my answer is helpful anyway.

> So what should I do with a piece of open-source software that has gone awry?

In general, there are several of options for software with behaviour
you don't like (in order of decreasing time commitment):

Learn to live with the new behaviour.

Reconfigure the software to change the behaviour if that is possible.

Add some extensions or hacks to the software to change the behaviour
if that is possible.

Switch to other software that doesn't have that behaviour.

Report a bug to Debian or upstream. Wait for the maintainer of the
Debian package to forward it upstream (or do that yourself). Wait for
upstream to read the issue. Wait for upstream to prioritise the issue.
Wait for upstream to fix the issue. Wait for upstream to make a new
release containing the fix. Wait for the maintainer of the Debian
package to import the new upstream release. Wait for Debian to make a
new release containing the issue. Upgrade to the new Debian release.

Edit the latest upstream code. Request your changes get merged
upstream. Backport the changes to the version you are using. Rebuild
the Debian package with your backport and install it. Request your
backport gets merged upstream (if there is an LTS branch). Request
that Debian update to the latest version on the LTS branch.

Write new software that has the behaviour you want.

> I highlighted desktop with bold

HTML mail should not be used on the Debian mailing lists. In addition,
I understand your frustration, but some parts of your mail are a bit
flamy, it would be nice if you could avoid that in future posts.

https://www.debian.org/MailingLists/#codeofconduct
https://www.debian.org/code_of_conduct

> I try to avoid GTK3 as much as possible

During the Debian bullseye cycle (stretch+2), it is likely that
GTK2-only applications will be removed from Debian and other
applications upgraded to GTK3/GTK4 as GTK2 is deprecated. I expect
that some upstreams will drop support for GTK2 entirely. So I think
the most sustainable approach would be for you to either convince the
GTK developers to make it more configurable (I guess that is unlikely)
or to patch GTK for yourself and rebuild it after every update to GTK.

> 1. Scrolling Indicator Cursor
> Every time I scroll inside GTK3 File Chooser, a cross cursor is shown

This behaviour is not triggered on desktop systems with a mouse, only
on touchpads and other places where kinetic scrolling is possible.

> I find the scrolling indicator cursor annoying.
> I need some advice on how to revert it properly

I think if you comment out the call to gtk_widget_set_cursor_from_name
in the install_scroll_cursor function and the call to the
gtk_widget_set_cursor in the uninstall_scroll_cursor function in
gtk/gtkscrolledwindow.c and then rebuild GTK3 then this behaviour
should get disabled.

> 2. Overshoot Animation
> I find the overshoot animation annoying.
> I need some advice on how to revert the changes properly

I'm not entirely sure and I have not tested this, but I think that if
you set smooth_scroll to FALSE in the scroll_controller_scroll_begin
function in gtk/gtkscrolledwindow.c and then rebuild GTK3 then this
behaviour should get disabled. If that doesn't work, then changing the
return line to "return FALSE;" (without quotes) in the
_gtk_scrolled_window_get_overshoot function in gtk/gtkscrolledwindow.c
might work.

> 3. Recursive directory search
> Most annoying of all.
> I need some advice on how to revert the changes properly

I'm not entirely sure and I have not tested this, but I think that if
you change the OPERATION_MODE_SEARCH values to OPERATION_MODE_BROWSE
in the widget_key_press_cb function in gtk/gtkfilechooserwidget.c and
then rebuild GTK3 then this behaviour should get disabled.

> If there is no chance of maintainers doing this (which is very likely because Stretch has already been code-frozen)

Both Debian stretch and buster are frozen for changes other than
security updates. In addition, it is unlikely that Debian would
deviate from GTK upstream's behaviour anyway due to the extra
maintenance burden of having additional Debian-specific patches.

> I appreciate any help on finding a sustainable way of patching GTK3 in Debian Stretch source packages to achieve the goals above.

Unfortunately Debian doesn't make keeping long-term local patches
easy. The apt-build & apt-src packages might be able to help with
that.

Personally, I'd keep a git clone of the upstream GTK repo with my
personal patches. Then export the patches and copy them into the
Debian source package patch directory, rebuild in sbuild/pbuilder,
install the binary packages, delete the Debian source package again
and repeat for each rebuild after each GTK update.

> where I can replace GTK3 File Chooser with GTK2 File Chooser

I don't think this is a sustainable option, but ISTR there are ways to
use the KDE file chooser in GTK-based programs when running on KDE.
You could look into emulating that under GNOME.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


Reply to: