Révision 2352
| tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java (revision 2352) | ||
|---|---|---|
| 52 | 52 |
import org.txm.core.preferences.TXMPreferences; |
| 53 | 53 |
import org.txm.objects.CorpusCommandPreferences; |
| 54 | 54 |
import org.txm.rcp.editors.ITXMResultEditor; |
| 55 |
import org.txm.rcp.messages.TXMUIMessages; |
|
| 55 | 56 |
import org.txm.rcp.swt.dialog.UsernamePasswordDialog; |
| 56 | 57 |
import org.txm.rcp.utils.SWTEditorsUtils; |
| 57 | 58 |
import org.txm.searchengine.core.SearchEngine; |
| ... | ... | |
| 288 | 289 |
if (media_auth) {
|
| 289 | 290 |
|
| 290 | 291 |
if (secured_media_password == null) {
|
| 291 |
UsernamePasswordDialog dialog = new UsernamePasswordDialog(shell, new boolean[] { false, true }, media_directory);
|
|
| 292 |
URL url = new URL(media_directory); |
|
| 293 |
|
|
| 294 |
UsernamePasswordDialog dialog = new UsernamePasswordDialog(shell, new boolean[] { true, true }, url.getHost()) ;
|
|
| 295 |
dialog.setUsername(secured_media_login); |
|
| 296 |
dialog.setTitle("You must authenticate to access the media file");
|
|
| 297 |
dialog.setDetails(NLS.bind(TXMUIMessages.loginToP0, new URL(media_directory).getHost())); |
|
| 292 | 298 |
if (dialog.open() == dialog.OK) {
|
| 293 | 299 |
System.setProperty(BackToMediaPreferences.MEDIA_AUTH_PASSWORD, dialog.getPassword()); |
| 294 | 300 |
secured_media_password = dialog.getPassword(); |
| 301 |
} else {
|
|
| 302 |
return null; |
|
| 295 | 303 |
} |
| 296 | 304 |
} |
| 297 | 305 |
path_prefix = NLS.bind(media_directory, secured_media_login, secured_media_password); |
Formats disponibles : Unified diff