19
19
import org .openstreetmap .josm .gui .preferences .SubPreferenceSetting ;
20
20
import org .openstreetmap .josm .gui .preferences .TabPreferenceSetting ;
21
21
import org .openstreetmap .josm .plugins .mapillary .MapillaryPlugin ;
22
- import org .openstreetmap .josm .plugins .mapillary .downloads .MapillaryDownloader ;
22
+ import org .openstreetmap .josm .plugins .mapillary .io . download .MapillaryDownloader ;
23
23
import org .openstreetmap .josm .plugins .mapillary .oauth .MapillaryUser ;
24
24
import org .openstreetmap .josm .plugins .mapillary .oauth .OAuthPortListener ;
25
25
import org .openstreetmap .josm .plugins .mapillary .utils .MapillaryUtils ;
@@ -51,18 +51,15 @@ public TabPreferenceSetting getTabPreferenceSetting(PreferenceTabbedPane gui) {
51
51
@ Override
52
52
public void addGui (PreferenceTabbedPane gui ) {
53
53
JPanel panel = new JPanel ();
54
-
55
54
this .reverseButtons .setSelected (Main .pref
56
55
.getBoolean ("mapillary.reverse-buttons" ));
57
56
this .displayHour .setSelected (Main .pref .getBoolean ("mapillary.display-hour" ,
58
57
true ));
59
58
this .format24 .setSelected (Main .pref .getBoolean ("mapillary.format-24" ));
60
59
this .moveTo .setSelected (Main .pref .getBoolean ("mapillary.move-to-picture" ,
61
60
true ));
62
-
63
61
panel .setLayout (new FlowLayout (FlowLayout .LEFT ));
64
62
panel .add (this .reverseButtons );
65
-
66
63
// Sets the value of the ComboBox.
67
64
if (Main .pref .get ("mapillary.download-mode" ).equals (
68
65
MapillaryDownloader .MODES [0 ]))
@@ -77,7 +74,6 @@ public void addGui(PreferenceTabbedPane gui) {
77
74
downloadModePanel .add (new JLabel (tr ("Download mode: " )));
78
75
downloadModePanel .add (this .downloadMode );
79
76
panel .add (downloadModePanel );
80
-
81
77
panel .add (this .displayHour );
82
78
panel .add (this .format24 );
83
79
panel .add (this .moveTo );
@@ -87,12 +83,10 @@ public void addGui(PreferenceTabbedPane gui) {
87
83
else
88
84
this .login .setText ("Logged as: " + MapillaryUser .getUsername ()
89
85
+ ". Click to relogin." );
90
-
91
86
panel .add (this .login );
92
87
if (MapillaryUser .getUsername () != null ) {
93
88
JButton logout = new JButton (new LogoutAction ());
94
89
logout .setText ("Logout" );
95
-
96
90
panel .add (logout );
97
91
}
98
92
gui .getDisplayPreference ().addSubTab (this , "Mapillary" , panel );
@@ -116,7 +110,6 @@ public boolean ok() {
116
110
Main .pref .put ("mapillary.download-mode" , MapillaryDownloader .MODES [2 ]);
117
111
MapillaryPlugin .setMenuEnabled (MapillaryPlugin .DOWNLOAD_VIEW_MENU , true );
118
112
}
119
-
120
113
Main .pref .put ("mapillary.display-hour" , this .displayHour .isSelected ());
121
114
Main .pref .put ("mapillary.format-24" , this .format24 .isSelected ());
122
115
Main .pref .put ("mapillary.move-to-picture" , this .moveTo .isSelected ());
@@ -142,7 +135,6 @@ public class LoginAction extends AbstractAction {
142
135
public void actionPerformed (ActionEvent arg0 ) {
143
136
OAuthPortListener portListener = new OAuthPortListener ();
144
137
portListener .start ();
145
-
146
138
String url = "http://www.mapillary.com/connect?redirect_uri=http:%2F%2Flocalhost:8763%2F&client_id=T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz&response_type=token&scope=user:read%20public:upload%20public:write" ;
147
139
try {
148
140
MapillaryUtils .browse (new URL (url ));
@@ -169,5 +161,4 @@ public void actionPerformed(ActionEvent arg0) {
169
161
MapillaryPreferenceSetting .this .login .setText ("Login" );
170
162
}
171
163
}
172
-
173
164
}
0 commit comments