Skip to content

Commit

Permalink
Map25 wording "create Tour Marker" (#331)
Browse files Browse the repository at this point in the history
* Revert "removed scaled thumb image, it had the same size as the original thumb but this was not the reason to remove it, this image was NEVER disposed -> SWT was running very fast out of handles when moving the tour chart slider as this would create a new image for every new slider position, discovered this issue with SWT sleak"

This reverts commit d3e09e3.

* reverted 'reverted "removed scaled image"'

* Starting with upgrading VTM 0.15

many changes in Libs...
ItemizedLayer
Mutable marker

* before deactivating some red code

* ItemizedLayer<> removing <> for vtm 0.15

* reactivating changed mapbookmarklayer and

avoid nullpointer when photolist is empty

* photolayer modified to work with vtm 0.15

and avoiding nullpointer again. 1sr try was nor working.

* Photoscaled On/Off

* run save actions for modified files

* Debug off

* cleanup some codelines

* latest vtm 0.15 updates

* Map25: PhotoLayer-> Starting with Adjustable PhotoSize and save and
restore state

* Map25 Photoresize with working save and restore

need some cleanup

* resolving one confict

* resolving conflicts...

* solving more conflicts

* adjusted the copyright text, just have a diff.

* undoing modified save actions

* revert save actions

* starting with some javadoc...

setting image quality from thumb to HQ

* in the slideout the "_chkShowPhoto_Scaled" button was to much.

something is going wrong with git, that was the second time.

* revert to ImageQuality.THUMB

increased stepsize in slideout from 5 to 10

* README

* Use same wording for "create Tour marker"

was different in create marker from chart

the wording i copied from net/tourbook/map2/messages*.properties to
net/tourbook/messages*.properties for all languages.

* README

Co-authored-by: top <top@MB14>
  • Loading branch information
telemaxx and top committed Apr 18, 2021
1 parent a005192 commit 75fecb7
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 22 deletions.
1 change: 0 additions & 1 deletion bundles/net.tourbook/src/net/tourbook/map25/Map25App.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*******************************************************************************
* Copyright (C) 2005, 2021 Wolfgang Schramm and Contributors
* Copyright (C) 2018, 2021 Thomas Theussing
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class PhotoToolkit extends MarkerToolkit implements ItemizedLayer.OnItemG
// public static final int IMAGE_SIZE_SMALL = 160;
// public static final int IMAGE_SIZE_MEDIUM = 320;
// public static final int IMAGE_SIZE_LARGE = 320;

private Bitmap _bitmapCluster;
//private boolean _isBillboard;
public MarkerSymbol _symbol; //marker symbol, circle or star
Expand Down Expand Up @@ -139,6 +139,7 @@ protected Bitmap getClusterBitmap(final int size) {
};
}


public MarkerSymbol createPhotoBitmapFromPhoto(final Photo photo, final MarkerItem item, final boolean showPhotoTitle) {

Bitmap bitmapImage = getPhotoBitmap(photo);
Expand All @@ -152,6 +153,16 @@ public MarkerSymbol createPhotoBitmapFromPhoto(final Photo photo, final MarkerIt
return bitmapPhoto;
}

/**
* creates a LIST with tourphotos, which can directly added to the photoLayer via addItems
*
* @param galleryPhotos
* Arraylist of photos
* @param showPhotoTitle
* boolean, show photo with title or not
* @param showPhotoScaled
* @return
*/
public List<MarkerInterface> createPhotoItemList(final ArrayList<Photo> galleryPhotos,
final boolean showPhotoTitle,
final boolean showPhotoScaled) {
Expand Down Expand Up @@ -214,10 +225,12 @@ public List<MarkerInterface> createPhotoItemList(final ArrayList<Photo> galleryP
if (photo.isGeoFromExif &&
Math.abs(photo.getImageMetaData().latitude) > Double.MIN_VALUE &&
Math.abs(photo.getImageMetaData().longitude) > Double.MIN_VALUE) {
//photo contains valid(>0) GPS position in the EXIF
// debugPrint("PhotoToolkit: *** createPhotoItemList: using exif geo");
photoLat = photo.getImageMetaData().latitude;
photoLon = photo.getImageMetaData().longitude;
} else {
//using position via time marker
debugPrint("PhotoToolkit: *** createPhotoItemList: using tour geo"); //$NON-NLS-1$
photoLat = photo.getTourLatitude();
photoLon = photo.getTourLongitude();
Expand All @@ -226,10 +239,11 @@ public List<MarkerInterface> createPhotoItemList(final ArrayList<Photo> galleryP
//debugPrint("PhotoToolkit: *** createPhotoItemList Name: " + photo.getImageMetaData().objectName + " Description: " + photo.getImageMetaData().captionAbstract);

final MarkerItem item = new MarkerItem(photoKey,
photoName,
photoDescription,
photoName, //time as name
photoDescription, //rating stars as description
new GeoPoint(photoLat, photoLon));

//now create the marker: photoimage with time and stars
final MarkerSymbol markerSymbol = createPhotoBitmapFromPhoto(photo, item, showPhotoTitle);

if (markerSymbol != null) {
Expand Down Expand Up @@ -276,13 +290,18 @@ private Bitmap getPhotoBitmap(final Photo photo) {
return photoBitmap;
}

/**
* @param photo
* @param thumbSize
* thumbnail size from slideout
* @return
*/
private Image getPhotoImage(final Photo photo, final int thumbSize) {

Image photoImage = null;
Image scaledThumbImage = null;

final ImageQuality requestedImageQuality = ImageQuality.THUMB;

// check if image has an loading error
final PhotoLoadingState photoLoadingState = photo.getLoadingState(requestedImageQuality);
if (photoLoadingState != PhotoLoadingState.IMAGE_IS_INVALID) {
Expand Down Expand Up @@ -366,6 +385,7 @@ public boolean onItemSingleTapUp(final int index, final MarkerInterface mi) {
return false;
}


public void showPhoto(final Photo photo) {

final Image image = getPhotoImage(photo, PhotoLoadManager.IMAGE_SIZE_LARGE_DEFAULT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public void mouseScrolled(final MouseEvent event) {
_spinnerPhoto_Size = new Spinner(containerPhotoSize, SWT.BORDER);
_spinnerPhoto_Size.setMinimum(160);
_spinnerPhoto_Size.setMaximum(640);
_spinnerPhoto_Size.setIncrement(5);
_spinnerPhoto_Size.setIncrement(10);
_spinnerPhoto_Size.setPageIncrement(10);
_spinnerPhoto_Size.setToolTipText(Messages.Slideout_Map25MapOptions_Spinner_Layer_Photo_Size);

Expand Down Expand Up @@ -293,15 +293,6 @@ public void mouseScrolled(final MouseEvent event) {
_chkShowPhoto_Title.addSelectionListener(_layerSelectionListener);
}

{
/*
* Photo Title
*/
_chkShowPhoto_Scaled = new Button(group, SWT.CHECK);
_chkShowPhoto_Scaled.setText("Slideout_Map25MapOptions_Checkbox_Sclaed_Photos");
_chkShowPhoto_Scaled.addSelectionListener(_layerSelectionListener);
}

{
/*
* Tile info
Expand All @@ -313,6 +304,7 @@ public void mouseScrolled(final MouseEvent event) {
}
}


private void createUI_80_Other(final Composite parent) {

final Composite container = new Composite(parent, SWT.NONE);
Expand Down
2 changes: 1 addition & 1 deletion bundles/net.tourbook/src/net/tourbook/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3395,7 +3395,7 @@ tag_view_title_tag = Tag:
tag_view_title_tag_category = Category:

tourCatalog_view_action_create_left_marker = Create &Left Marker
tourCatalog_view_action_create_marker = Create &Marker
tourCatalog_view_action_create_marker = Create Tour &Marker
tourCatalog_view_action_create_reference_tour = Create Reference Tour
tourCatalog_view_action_create_right_marker = Create &Right Marker
tourCatalog_view_action_delete_tours = &Remove Compared Tours...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3164,7 +3164,7 @@ tag_view_title_tag = Zna\u010Dka:
tag_view_title_tag_category = Kategorie:

tourCatalog_view_action_create_left_marker = Vytvo\u0159it zna\u010Dku v&levo
tourCatalog_view_action_create_marker = Vytvo\u0159it &zna\u010Dku
tourCatalog_view_action_create_marker = Vytvo\u0159it
tourCatalog_view_action_create_reference_tour = Vytvo\u0159it referen\u010Dn\u00ED trasu
tourCatalog_view_action_create_right_marker = Vytvo\u0159it zna\u010Dku vp&ravo
tourCatalog_view_action_delete_tours = Odeb&rat porovn\u00E1n\u00ED tras...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3374,7 +3374,7 @@ tag_view_title_tag = Tag:
tag_view_title_tag_category = Kategorie:

tourCatalog_view_action_create_left_marker = Markierung f\u00FCr den &linken Slider erstellen
tourCatalog_view_action_create_marker = &Markierung erstellen
tourCatalog_view_action_create_marker = Tour &Markierung erstellen
tourCatalog_view_action_create_reference_tour = &Referenz Tour erstellen
tourCatalog_view_action_create_right_marker = Markierung f\u00FCr den &rechten Slider erstellen
tourCatalog_view_action_delete_tours = Tourenvergleich &entfernen...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3320,7 +3320,7 @@ tag_view_title_tag = \u00C9tiquette:
tag_view_title_tag_category = Cat\u00E9gorie:
tourCatalog_view_action_create_left_marker = Cr\u00E9er Marqueur &Gauche
tourCatalog_view_action_create_marker = Cr\u00E9er &Marqueur
tourCatalog_view_action_create_marker = Cr\u00E9er un &Marqueur sur cette position du parcours
tourCatalog_view_action_create_reference_tour = Cr\u00E9er un parcours de r\u00E9f\u00E9rence
tourCatalog_view_action_create_right_marker = Cr\u00E9er Marqueur &Droit
tourCatalog_view_action_delete_tours = &Supprimer les parcours compar\u00E9s...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3313,7 +3313,7 @@ tag_view_title_tag = Etichetta:
tag_view_title_tag_category = Categoria:

tourCatalog_view_action_create_left_marker = Crea riferimento di sinistra
tourCatalog_view_action_create_marker = Crea riferimento
tourCatalog_view_action_create_marker = Crea riferimento percorso
tourCatalog_view_action_create_reference_tour = Crea percorso di riferimento
tourCatalog_view_action_create_right_marker = Crea riferimento di destra
tourCatalog_view_action_delete_tours = Elimina percorsi confrontati...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3335,7 +3335,7 @@ tag_view_title_tag = Label:
tag_view_title_tag_category = Categorie:

tourCatalog_view_action_create_left_marker = Markering voor het &linkse schuifbalkje aanmaken
tourCatalog_view_action_create_marker = &Markering aanmaken
tourCatalog_view_action_create_marker = Aanmaken tocht&markering
tourCatalog_view_action_create_reference_tour = &Referentietocht aanmaken
tourCatalog_view_action_create_right_marker = Markering voor het &rechtse schuifbalkje aanmaken
tourCatalog_view_action_delete_tours = Tochtenvergelijk &verwijderen...
Expand Down
9 changes: 8 additions & 1 deletion info/release-notes/21.next.0-readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Improvements
- Displaying the night sections with a grey color for a more intuitive chart and better readability (Frederic)
- More options to show R-R values together with other pules graphs (R-R average, device value)

* 2.5D Map (Thomas):
- Upgrading VTM lib to 0.15
- Size of photothumbnails can be changed via slideout

Changes
=======
Expand All @@ -66,8 +69,12 @@ Bugfix
* Chart Tooltip (Frederic)
- Displaying the hour from 0 when a new day starts

* Chart Create Tourmarker (Thomas)
- Same wording as on other places. "create marker" -> "create tour marker"

* Compress Database
Fixed SQL exception when the tour database size is too large to fit into an integer value
- Fixed SQL exception when the tour database size is too large to fit into an integer value


Translation
===========
Expand Down

0 comments on commit 75fecb7

Please sign in to comment.