]> gitweb.fperrin.net Git - GpsPrune.git/blob - tim/prune/function/IgnoreExifThumb.java
8b292e503a447b27612b4226b2052fd34781e197
[GpsPrune.git] / tim / prune / function / IgnoreExifThumb.java
1 package tim.prune.function;
2
3 import tim.prune.App;
4 import tim.prune.DataSubscriber;
5 import tim.prune.GenericFunction;
6 import tim.prune.UpdateMessageBroker;
7 import tim.prune.data.Photo;
8
9 /**
10  * Class to provide the function to disable the exif thumbnail
11  * for the current photo so that the full image must be loaded
12  */
13 public class IgnoreExifThumb extends GenericFunction
14 {
15         /**
16          * Constructor
17          * @param inApp application object for callback
18          */
19         public IgnoreExifThumb(App inApp)
20         {
21                 super(inApp);
22         }
23
24         /** Get the name key */
25         public String getNameKey() {
26                 return "function.ignoreexifthumb";
27         }
28
29         /**
30          * Begin the function
31          */
32         public void begin()
33         {
34                 Photo photo = _app.getTrackInfo().getCurrentPhoto();
35                 if (photo != null)
36                 {
37                         // no undo necessary, no data being edited
38                         photo.setExifThumbnail(null);
39                         UpdateMessageBroker.informSubscribers(DataSubscriber.PHOTOS_MODIFIED);
40                 }
41         }
42 }