mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-20 03:24:55 +00:00
Merge pull request #1370 from karlmortensen/UNC
Warn if failure, allow retry, for UNC compatibility
This commit is contained in:
commit
d12c70f333
@ -189,6 +189,7 @@ MissingImageDialog.allDesc.text=All Supported Types
|
||||
MissingImageDialog.display.title=Search for Missing Image
|
||||
MissingImageDialog.confDlg.noFileSel.msg=No image file has been selected, are you sure you\nwould like to exit without finding the image.
|
||||
MissingImageDialog.confDlg.noFileSel.title=Missing Image
|
||||
MissingImageDialog.ErrorSettingImage=Error setting image path. Please try again.
|
||||
NewCaseVisualPanel1.getName.text=Case Info
|
||||
NewCaseVisualPanel1.caseDirBrowse.selectButton.text=Select
|
||||
NewCaseVisualPanel1.badCredentials.text=Bad multi-user settings. See Tools, Options, Multi-user.
|
||||
@ -249,3 +250,5 @@ CollaborationMonitor.restoredService.notify.title=Collaboration Service Restored
|
||||
CollaborationMonitor.restoredDbService.notify.msg=Connection to database server restored
|
||||
CollaborationMonitor.restoredSolrService.notify.msg=Connection to keyword search server restored
|
||||
CollaborationMonitor.restoredMessageService.notify.msg=Connection to messaging server restored
|
||||
MissingImageDialog.lbWarning.text=
|
||||
MissingImageDialog.lbWarning.toolTipText=
|
||||
|
@ -540,7 +540,7 @@ public class Case {
|
||||
int ret = JOptionPane.showConfirmDialog(null,
|
||||
NbBundle.getMessage(Case.class,
|
||||
"Case.checkImgExist.confDlg.doesntExist.msg",
|
||||
appName, path),
|
||||
getAppName(), path),
|
||||
NbBundle.getMessage(Case.class,
|
||||
"Case.checkImgExist.confDlg.doesntExist.title"),
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
|
@ -112,10 +112,15 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pathNameTextField" min="-2" pref="285" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="83" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbWarning" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="pathNameTextField" min="-2" pref="285" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="83" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -127,7 +132,9 @@
|
||||
<Component id="pathNameTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="62" max="32767" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="lbWarning" pref="19" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -153,6 +160,22 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbWarning">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="12" style="1"/>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="f4" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="MissingImageDialog.lbWarning.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="MissingImageDialog.lbWarning.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="titleLabel">
|
||||
|
@ -65,7 +65,6 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
fc.addChoosableFileFilter(encaseFilter);
|
||||
fc.setFileFilter(allFilter);
|
||||
|
||||
|
||||
customInit();
|
||||
}
|
||||
|
||||
@ -138,6 +137,7 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
containerPanel = new javax.swing.JPanel();
|
||||
pathNameTextField = new javax.swing.JTextField();
|
||||
browseButton = new javax.swing.JButton();
|
||||
lbWarning = new javax.swing.JLabel();
|
||||
titleLabel = new javax.swing.JLabel();
|
||||
titleSeparator = new javax.swing.JSeparator();
|
||||
|
||||
@ -192,16 +192,24 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
lbWarning.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
|
||||
lbWarning.setForeground(new java.awt.Color(244, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbWarning, org.openide.util.NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.lbWarning.text")); // NOI18N
|
||||
lbWarning.setToolTipText(org.openide.util.NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.lbWarning.toolTipText")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout containerPanelLayout = new javax.swing.GroupLayout(containerPanel);
|
||||
containerPanel.setLayout(containerPanelLayout);
|
||||
containerPanelLayout.setHorizontalGroup(
|
||||
containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(containerPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(pathNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(browseButton)
|
||||
.addContainerGap(83, Short.MAX_VALUE))
|
||||
.addGroup(containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbWarning, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(containerPanelLayout.createSequentialGroup()
|
||||
.addComponent(pathNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(browseButton)
|
||||
.addContainerGap(83, Short.MAX_VALUE))))
|
||||
);
|
||||
containerPanelLayout.setVerticalGroup(
|
||||
containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -210,12 +218,13 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
.addGroup(containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(pathNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(browseButton))
|
||||
.addContainerGap(62, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(lbWarning, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE)
|
||||
.addGap(18, 18, 18))
|
||||
);
|
||||
|
||||
titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 12));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle
|
||||
.getMessage(MissingImageDialog.class, "MissingImageDialog.titleLabel.text")); // NOI18N
|
||||
titleLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.titleLabel.text")); // NOI18N
|
||||
|
||||
titleSeparator.setForeground(new java.awt.Color(102, 102, 102));
|
||||
|
||||
@ -255,10 +264,11 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
String newPath = pathNameTextField.getText();
|
||||
//TODO handle local files
|
||||
db.setImagePaths(obj_id, Arrays.asList(new String[]{newPath}));
|
||||
this.dispose();
|
||||
} catch (TskCoreException ex) {
|
||||
lbWarning.setText(NbBundle.getMessage(this.getClass(), "MissingImageDialog.ErrorSettingImage"));
|
||||
logger.log(Level.WARNING, "Error setting image paths", ex); //NON-NLS
|
||||
}
|
||||
this.dispose();
|
||||
}//GEN-LAST:event_selectButtonActionPerformed
|
||||
|
||||
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
||||
@ -274,7 +284,7 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
|
||||
|
||||
String oldText = pathNameTextField.getText();
|
||||
|
||||
lbWarning.setText("");
|
||||
// set the current directory of the FileChooser if the ImagePath Field is valid
|
||||
File currentDir = new File(oldText);
|
||||
if (currentDir.exists()) {
|
||||
@ -295,6 +305,7 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JPanel buttonPanel;
|
||||
private javax.swing.JButton cancelButton;
|
||||
private javax.swing.JPanel containerPanel;
|
||||
private javax.swing.JLabel lbWarning;
|
||||
private javax.swing.JTextField pathNameTextField;
|
||||
private javax.swing.JButton selectButton;
|
||||
private javax.swing.JLabel titleLabel;
|
||||
|
@ -837,7 +837,7 @@ public final class ImageGalleryController {
|
||||
for (FileSystem fs : image.getFileSystems()) {
|
||||
fsObjIds.add(fs.getId());
|
||||
}
|
||||
fsQuery = "(fs_obj_id = " + StringUtils.join(fsObjIds, " or fs_obj_id = ") + ") ";
|
||||
fsQuery = "(fs_obj_id = " + StringUtils.join(fsObjIds, " OR fs_obj_id = ") + ") ";
|
||||
} // NOTE: Logical files currently (Apr '15) have a null value for fs_obj_id in DB.
|
||||
// for them, we will not specify a fs_obj_id, which means we will grab files
|
||||
// from another data source, but the drawable DB is smart enough to de-dupe them.
|
||||
@ -845,7 +845,7 @@ public final class ImageGalleryController {
|
||||
fsQuery = "(fs_obj_id IS NULL) ";
|
||||
}
|
||||
|
||||
files = getSleuthKitCase().findAllFilesWhere(fsQuery + " and " + DRAWABLE_QUERY);
|
||||
files = getSleuthKitCase().findAllFilesWhere(fsQuery + " AND " + DRAWABLE_QUERY);
|
||||
progressHandle.switchToDeterminate(files.size());
|
||||
|
||||
//do in transaction
|
||||
|
Loading…
x
Reference in New Issue
Block a user