Révision 2828
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 2828) | ||
|---|---|---|
| 1109 | 1109 |
|
| 1110 | 1110 |
zoomInAmpoutColonMouseWheelORShiftPlusRightMousePlusDrag = \ Zoom +/-: Mouse wheel OR Shift + Right Mouse + Drag\n |
| 1111 | 1111 |
|
| 1112 |
zoomToSelectionColonCtrlPlusLeftMousePlusdrag = \ Zoom to selection: Ctrl + Left Mouse + Drag\n |
|
| 1112 |
zoomToSelectionColonCtrlPlusLeftMousePlusdrag = \ Zoom to selection: Ctrl + Left Mouse + Drag\n |
|
| 1113 |
|
|
| 1114 |
updateWarning=Update warning |
|
| 1115 |
abortingWindowsUpdate=To be able to check if new updates are available and install them, you must launch TXM as administrator. |
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 2828) | ||
|---|---|---|
| 1036 | 1036 |
zoomInAmpoutColonMouseWheelORShiftPlusRightMousePlusDrag = \ Zoom +/- : Roulette OU Maj + Clic Droit + Glisser\n |
| 1037 | 1037 |
|
| 1038 | 1038 |
zoomToSelectionColonCtrlPlusLeftMousePlusdrag = \ Zoomer sur la sélection : Ctrl + Clic Gauche + Glisser\n |
| 1039 |
|
|
| 1040 |
updateWarning=Mise à jour interompue |
|
| 1041 |
abortingWindowsUpdate=Pour pouvoir vérifier s'il y a de nouvelles mises à jour disponibles et les installer, vous devez lancer TXM en tant qu'administrateur. |
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java (revision 2828) | ||
|---|---|---|
| 7 | 7 |
public class TXMUIMessages extends NLS {
|
| 8 | 8 |
|
| 9 | 9 |
private static final String BUNDLE_NAME = "org.txm.rcp.messages.messages"; //$NON-NLS-1$ |
| 10 |
|
|
| 10 |
|
|
| 11 | 11 |
public static String theP0directoryNotABinaryCorpus; |
| 12 | 12 |
|
| 13 | 13 |
public static String P0CorpusLoaded; |
| ... | ... | |
| 1147 | 1147 |
public static String SourceDirectoryPage_6; |
| 1148 | 1148 |
|
| 1149 | 1149 |
public static String SourceDirectoryPage_8; |
| 1150 |
|
|
| 1150 |
|
|
| 1151 |
public static String updateWarning; |
|
| 1152 |
public static String abortingWindowsUpdate; |
|
| 1151 | 1153 |
static {
|
| 1152 | 1154 |
// initialize resource bundle |
| 1153 | 1155 |
Utf8NLS.initializeMessages(BUNDLE_NAME, TXMUIMessages.class); |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/p2/plugins/TXMUpdateHandler.java (revision 2828) | ||
|---|---|---|
| 42 | 42 |
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; |
| 43 | 43 |
import org.eclipse.equinox.p2.ui.ProvisioningUI; |
| 44 | 44 |
import org.eclipse.osgi.util.NLS; |
| 45 |
import org.eclipse.swt.SWT; |
|
| 46 |
import org.eclipse.swt.widgets.MessageBox; |
|
| 45 | 47 |
import org.eclipse.swt.widgets.Shell; |
| 48 |
import org.eclipse.ui.handlers.HandlerUtil; |
|
| 46 | 49 |
import org.eclipse.ui.statushandlers.StatusManager; |
| 47 | 50 |
import org.osgi.framework.Version; |
| 48 | 51 |
import org.txm.core.preferences.TBXPreferences; |
| 49 | 52 |
import org.txm.rcp.Activator; |
| 50 | 53 |
import org.txm.rcp.messages.TXMUIMessages; |
| 51 | 54 |
import org.txm.rcp.preferences.RCPPreferences; |
| 55 |
import org.txm.rcp.swt.dialog.TXMMessageBox; |
|
| 52 | 56 |
import org.txm.utils.BundleUtils; |
| 53 | 57 |
import org.txm.utils.OSDetector; |
| 54 | 58 |
import org.txm.utils.logger.Log; |
| ... | ... | |
| 72 | 76 |
|
| 73 | 77 |
if (OSDetector.isFamilyWindows() |
| 74 | 78 |
&& !isWindowsAdministratorUser()) {
|
| 75 |
Log.warning("Aborting TXM update. You need to run TXM as administrator to do updates.");
|
|
| 76 |
return null; |
|
| 79 |
int ret = TXMMessageBox.show(HandlerUtil.getActiveShell(event), TXMUIMessages.updateWarning, TXMUIMessages.abortingWindowsUpdate, SWT.ICON_WARNING); |
|
| 80 |
if (ret == SWT.CANCEL) {
|
|
| 81 |
Log.warning("Update canceled");
|
|
| 82 |
return null; |
|
| 83 |
} |
|
| 77 | 84 |
} |
| 78 | 85 |
|
| 79 | 86 |
String key = event.getParameter("org.txm.rcp.parameters.update"); //$NON-NLS-1$
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/TXMMessageBox.java (revision 2828) | ||
|---|---|---|
| 31 | 31 |
import org.eclipse.swt.widgets.MessageBox; |
| 32 | 32 |
import org.eclipse.swt.widgets.Shell; |
| 33 | 33 |
|
| 34 |
// TODO: Auto-generated Javadoc |
|
| 35 | 34 |
/** |
| 36 |
* The Class TXMMessageBox.
|
|
| 35 |
* wrap the SWT MessageBox class
|
|
| 37 | 36 |
*/ |
| 38 | 37 |
public class TXMMessageBox {
|
| 39 | 38 |
|
| ... | ... | |
| 41 | 40 |
Button button; |
| 42 | 41 |
|
| 43 | 42 |
/** |
| 44 |
* Instantiates a new tXM message box.
|
|
| 43 |
* Instantiates a new TXM message box.
|
|
| 45 | 44 |
* |
| 46 | 45 |
* @param shell the shell |
| 47 | 46 |
* @param title the title |
| 48 | 47 |
* @param message the message |
| 49 | 48 |
* @param style the style |
| 49 |
* |
|
| 50 |
* @return dialog return code (defaults: SWT.OK, SWT.CANCEL) |
|
| 50 | 51 |
*/ |
| 51 |
public static void show(Shell shell, String title, String message, int style) {
|
|
| 52 |
public static int show(Shell shell, String title, String message, int style) {
|
|
| 52 | 53 |
MessageBox messageBox = new MessageBox(shell, style); |
| 53 | 54 |
messageBox.setText(title); |
| 54 | 55 |
messageBox.setMessage(message); |
| 55 |
messageBox.open(); |
|
| 56 |
return messageBox.open();
|
|
| 56 | 57 |
} |
| 57 | 58 |
} |
Formats disponibles : Unified diff