Skip to content

move the logic setting GtkSpin port value to setup_for_type()

Landry Breuil requested to merge landry/gigolo:fix/11 into master

should fix #11 (closed).

setup_for_type() was forcefully setting the port value with the method default port, potentially overwriting a value coming from a bookmark previously set by init_values()

Instead, let's move the code setting the value to setup_for_type(), defaulting to 0, then to the method port if we've detected a known scheme, and if we're editing a bookmark, take the value from the bookmark.

tested in the following cases:

  • creating a new connection -> the port value is set to the scheme default
  • editing an existing bookmark -> the value comes from the bookmark
  • changing the scheme type on an existing bookmark -> the port value is reset to the scheme default

Merge request reports

Loading