linuxmint / xviewer

A generic Image viewer
GNU General Public License v2.0
75 stars 37 forks source link

Configure Mouse Wheel #101

Closed programmer-ceds closed 4 years ago

programmer-ceds commented 4 years ago

These changes address issues #17 and #59 by adding the feature requested in issue #17 and making the mouse scroll and tilt configurable.

Whilst the existing version of xviewer did allow the user to pan the image using scroll in conjunction with Shift and Ctrl this was not obvious without looking at the program code.

The new code adds a tab to the user preferences dialog that allows the user to select the actions for:

Scroll, Scroll + Shift, Scroll + Ctrl, Scroll + Shift + Ctrl Tilt, Tilt + Shift, Tilt + Ctrl, Tilt + Shift + Ctrl

The actions that can be assigned to the 8 key combinations listed above are:

Zoom Vertical pan Horizontal pan Move to next/previous image Rotate 90 degrees No action

("No action" has been included to cover the situation where a user is habituated to use a particular mouse-wheel action in another program - if this action is not in the above list it may be better for the program to take no action, rather than do something that then needs to be undone. It also doesn't take any code to implement "No action")

The default actions for the mouse-wheel in this new version replicate the settings in the current master, so there will be no unexpected behaviour for users.

Adding further actions that are initiated by a single keypress would be an easy task.

programmer-ceds commented 4 years ago

So why do the circlecl tests all fail? The report shown by the details links shows warnings of deprecated functions but they are in code from the master that I haven't edited. I can't see any reports about the code that I have modified. Would the master branch build at this time?

programmer-ceds commented 4 years ago

@mtwebster Hi Michael - sorry to trouble you but I'm in trouble again. :-(

Looking at the details for the three circlecl reports there appears to be a problem with the version of xapps-common. Apparently xviewer depends on xapps-common >= 1.8.4. (this may not be the only problem)

The versions of xapps-common on the (circlecl?) system for the three reports are:

lmde3 1.6.9 mint18 1.2.1 mint19 1.8.0

I have tried searching for xapps-commons adn -commons in the source files without success. What has changed and what do I need to do to resolve this problem.

programmer-ceds commented 4 years ago

If I use GDebi try to install xviewer_2.6.0_amd64.deb produced with the sources uploaded for this pull request it displays a message that a dependency on xapps-common >= 1.8.4 has not been met.

Moreover I get the same message if I build the master version using the following commands:

git clone https://github.com/linuxmint/xviewer.git mint-build

According to the synaptic package manager I am using mint-dev-tools 1.2.2

I can't see anything in the source code that mentions xapp - what am missing?

Can anyone else build the xviewer master version and not get this dependency error?

Is the cause line 16 in xviewer/.circleci/config.yml?

mtwebster commented 4 years ago

Hi, can you change the labels to be 'modifiers->action', like 'shift-control-scroll' - this will make it consistent with how keybindings are typically displayed.

Then can you squash the commits also? Or I can do it automatically, up to you.

Thanks

edit: this built fine, I'm not sure what issue you were having. Are you on Mint 19 or 20? This could be the difference.

programmer-ceds commented 4 years ago

I have made the changes requested - both to the dialog and to the definitions in the program code (just to be consistent)

The problem I was having were due to the fork being made before the circlci tests were changed for Mint 20. This was resolved using the new version of .circleci/config.yml.

Now I'm getting the same problems again but they are not cured by using the latest version of that file.

My thoughts are to close this PR and start a new one using the current master and integrating the changes. Is there a problem with this approach?

programmer-ceds commented 4 years ago

Closed in order to retry the changes with a fork of the latest code rather than a fork from the pre-Mint 20 code