w2l: Add status label to BibTeX dialog

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@265 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2015-07-28 08:01:16 +00:00
parent f70c77e5ca
commit d854a50a2d
4 changed files with 25 additions and 15 deletions

View file

@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
* Version 1.6 (2015-07-24)
* Version 1.6 (2015-07-28)
*
*/
@ -168,6 +168,7 @@ public class BibTeXDialog extends DialogBase implements com.sun.star.lang.XIniti
// **** Implement XDialogEventHandler
@Override public boolean callHandlerMethod(XDialog xDialog, Object event, String sMethod) {
clearUpdateLabel();
if (sMethod.equals("FileChange")) { //$NON-NLS-1$
// The user has selected another BibTeX file
fileChange();
@ -206,6 +207,11 @@ public class BibTeXDialog extends DialogBase implements com.sun.star.lang.XIniti
// **** Implement the UI functions
// Clear the contents of the update info label
private void clearUpdateLabel() {
setLabelText("UpdateLabel","");
}
// (Re)load the list of BibTeX files
private void reload(String sSelectedFileName) {
String sFile = null;
@ -509,15 +515,15 @@ public class BibTeXDialog extends DialogBase implements com.sun.star.lang.XIniti
}
// Inform the user about the result
if (xFrame!=null) {
MessageBox msgBox = new MessageBox(xContext, xFrame);
if (notUpdated.isEmpty()) {
msgBox.showMessage("Writer2LaTeX",Messages.getString("BibTeXDialog.allbibfieldsupdated")); //$NON-NLS-1$ //$NON-NLS-2$
}
else {
msgBox.showMessage("Writer2LaTeX",Messages.getString("BibTeXDialog.bibfieldsnotupdated")+":\n"+notUpdated.toString()); //$NON-NLS-1$ //$NON-NLS-2$
}
}
//MessageBox msgBox = new MessageBox(xContext, xFrame);
if (notUpdated.isEmpty()) {
setLabelText("UpdateLabel",Messages.getString("BibTeXDialog.allbibfieldsupdated")); //$NON-NLS-1$ //$NON-NLS-2$
//msgBox.showMessage("Writer2LaTeX",Messages.getString("BibTeXDialog.allbibfieldsupdated")); //$NON-NLS-1$ //$NON-NLS-2$
}
else {
setLabelText("UpdateLabel",Messages.getString("BibTeXDialog.bibfieldsnotupdated")+":\n"+notUpdated.toString()); //$NON-NLS-1$ //$NON-NLS-2$
//msgBox.showMessage("Writer2LaTeX",Messages.getString("BibTeXDialog.bibfieldsnotupdated")+":\n"+notUpdated.toString()); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}