Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
291 changes: 291 additions & 0 deletions .settings/formatter.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .settings/org.eclipse.jdt.ui.prefs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Mon Oct 31 16:46:21 CET 2011
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_settings_version=11
formatter_profile=_JDownloader
formatter_settings_version=12
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public int getTooltipDelay(Point mousePositionOnScreen) {
@Override
public void actionPerformed(ActionEvent e) {
try {
ExtFileChooserDialog d = new ExtFileChooserDialog(0, _GUI._.ManagerFrame_actionPerformed_export_title(), null, null);
ExtFileChooserDialog d = new ExtFileChooserDialog(0, _GUI._.ManagerFrame_actionPerformed_import_title(), null, null);
d.setFileFilter(new FileFilter() {

@Override
Expand Down
9 changes: 9 additions & 0 deletions src/org/jdownloader/gui/toolbar/MainToolbarManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
import org.jdownloader.gui.translate._GUI;
import org.jdownloader.gui.views.SelectionInfo;
import org.jdownloader.gui.views.components.packagetable.context.RenameAction;
import org.jdownloader.gui.views.downloads.action.DeleteDisabledSelectedLinks;
import org.jdownloader.gui.views.downloads.action.DeleteSelectedAndFailedLinksAction;
import org.jdownloader.gui.views.downloads.action.DeleteSelectedFinishedLinksAction;
import org.jdownloader.gui.views.downloads.action.DeleteSelectedOfflineLinksAction;
import org.jdownloader.gui.views.downloads.action.MenuManagerAction;
import org.jdownloader.gui.views.linkgrabber.actions.AddContainerAction;

Expand Down Expand Up @@ -182,6 +186,11 @@ public MenuContainerRoot createDefaultStructure() {
ocr.add(JAntiCaptchaToogleAction.class);
ocr.add(RemoteCaptchaToogleAction.class);
ocr.add(CaptchaDialogsToogleAction.class);

opt.add(DeleteDisabledSelectedLinks.class);
opt.add(DeleteSelectedAndFailedLinksAction.class);
opt.add(DeleteSelectedFinishedLinksAction.class);
opt.add(DeleteSelectedOfflineLinksAction.class);
return mr;
}

Expand Down
19 changes: 11 additions & 8 deletions src/org/jdownloader/gui/translate/GuiTranslation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2270,14 +2270,14 @@ public interface GuiTranslation extends TranslateInterface {
@Default(lngs = { "en" }, values = { "\r\n%s1 Links(s) to delete\r\n%s2 Files on Disk\r\nLinks left in Downloadlist: %s3" })
String DeleteSelectionAction_actionPerformed_affected(int linkCount, String bytes, int i);

@Default(lngs = { "en" }, values = { "Do you want to delete all selected & disabled Downloadlinks?" })
String DeleteDisabledLinksFromListAndDiskAction_actionPerformed_object_();
@Default(lngs = { "en" }, values = { "Do you want to delete all %s1disabled Downloadlinks?" })
String DeleteDisabledLinksFromListAndDiskAction_actionPerformed_object_(String selected);

@Default(lngs = { "en" }, values = { "Do you want to delete all selected & failed Downloadlinks?" })
String DeleteFailedFromListAndDiskAction_actionPerformed();
@Default(lngs = { "en" }, values = { "Do you want to delete all %s1failed Downloadlinks?" })
String DeleteFailedFromListAndDiskAction_actionPerformed(String selected);

@Default(lngs = { "en" }, values = { "Do you want to delete all selected & unavailable Downloadlinks?" })
String DeleteSelectedOfflineLinksAction_actionPerformed();
@Default(lngs = { "en" }, values = { "Do you want to delete all %s1unavailable Downloadlinks?" })
String DeleteSelectedOfflineLinksAction_actionPerformed(String selected);

@Default(lngs = { "en" }, values = { "Ups... something is wrong!" })
String lit_ups_something_is_wrong();
Expand All @@ -2288,8 +2288,8 @@ public interface GuiTranslation extends TranslateInterface {
@Default(lngs = { "en" }, values = { "Delete" })
String lit_delete();

@Default(lngs = { "en" }, values = { "Do you want to delete all selected & successfully downloaded Downloadlinks?" })
String DeleteSelectedFinishedLinksAction_actionPerformed();
@Default(lngs = { "en" }, values = { "Do you want to delete all %s1successfully downloaded Downloadlinks?" })
String DeleteSelectedFinishedLinksAction_actionPerformed(String selected);

@Default(lngs = { "en" }, values = { "Right Click Menu: Download Table" })
String gui_config_menumanager_downloadlist();
Expand Down Expand Up @@ -2447,6 +2447,9 @@ public interface GuiTranslation extends TranslateInterface {
@Default(lngs = { "en" }, values = { "Export the current Menu Structure" })
String ManagerFrame_actionPerformed_export_title();

@Default(lngs = { "en" }, values = { "Import the current Menu Structure" })
String ManagerFrame_actionPerformed_import_title();

@Default(lngs = { "en" }, values = { "An Error occured..." })
String lit_error_occured();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,32 @@ public DeleteDisabledSelectedLinks(SelectionInfo<FilePackage, DownloadLink> si)
public void actionPerformed(ActionEvent e) {

List<DownloadLink> nodesToDelete = new ArrayList<DownloadLink>();
for (DownloadLink dl : si.getChildren()) {
if (!dl.isEnabled()) {
nodesToDelete.add(dl);

if (si != null) {
for (DownloadLink dl : si.getChildren()) {
if (!dl.isEnabled()) {
nodesToDelete.add(dl);
}
}
} else {
DownloadController dlc = DownloadController.getInstance();
final boolean readL = dlc.readLock();
try {
for (FilePackage fp : dlc.getPackages()) {
synchronized (fp) {
for (DownloadLink dl : fp.getChildren()) {
if (!dl.isEnabled())
nodesToDelete.add(dl);
}
}
}
} finally {
dlc.readUnlock(readL);
}
}
DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete), _GUI._.DeleteDisabledLinksFromListAndDiskAction_actionPerformed_object_());

DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete),
_GUI._.DeleteDisabledLinksFromListAndDiskAction_actionPerformed_object_(si != null ? "selected & " : ""));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,30 @@ public DeleteSelectedAndFailedLinksAction(SelectionInfo<FilePackage, DownloadLin
public void actionPerformed(ActionEvent e) {

List<DownloadLink> nodesToDelete = new ArrayList<DownloadLink>();
for (DownloadLink dl : si.getChildren()) {
if (dl.getLinkStatus().isFailed()) {
nodesToDelete.add(dl);

if (si != null) {
for (DownloadLink dl : si.getChildren()) {
if (dl.getLinkStatus().isFailed()) {
nodesToDelete.add(dl);
}
}
} else {
DownloadController dlc = DownloadController.getInstance();
final boolean readL = dlc.readLock();
try {
for (FilePackage fp : dlc.getPackages()) {
synchronized (fp) {
for (DownloadLink dl : fp.getChildren()) {
if (dl.getLinkStatus().isFailed()) nodesToDelete.add(dl);
}
}
}
} finally {
dlc.readUnlock(readL);
}
}
DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete), _GUI._.DeleteFailedFromListAndDiskAction_actionPerformed());

DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete), _GUI._.DeleteFailedFromListAndDiskAction_actionPerformed(si != null ? "selected & " : ""));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,32 @@ public DeleteSelectedFinishedLinksAction(SelectionInfo<FilePackage, DownloadLink
public void actionPerformed(ActionEvent e) {

List<DownloadLink> nodesToDelete = new ArrayList<DownloadLink>();
for (DownloadLink dl : si.getChildren()) {
if (dl.getLinkStatus().isFinished()) {
nodesToDelete.add(dl);

if (si != null) {
for (DownloadLink dl : si.getChildren()) {
if (dl.getLinkStatus().isFinished()) {
nodesToDelete.add(dl);
}
}
} else {
DownloadController dlc = DownloadController.getInstance();
final boolean readL = dlc.readLock();
try {
for (FilePackage fp : dlc.getPackages()) {
synchronized (fp) {
for (DownloadLink dl : fp.getChildren()) {
if (dl.getLinkStatus().isFinished())
nodesToDelete.add(dl);
}
}
}
} finally {
dlc.readUnlock(readL);
}
}
DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete), _GUI._.DeleteSelectedFinishedLinksAction_actionPerformed());

DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete),
_GUI._.DeleteSelectedFinishedLinksAction_actionPerformed(si != null ? "selected & " : ""));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,34 @@ public DeleteSelectedOfflineLinksAction(SelectionInfo<FilePackage, DownloadLink>
public void actionPerformed(ActionEvent e) {

List<DownloadLink> nodesToDelete = new ArrayList<DownloadLink>();
for (DownloadLink dl : si.getChildren()) {
if (dl.getAvailableStatus() == AvailableStatus.FALSE || dl.getLinkStatus().hasStatus(LinkStatus.ERROR_FILE_NOT_FOUND)) {
nodesToDelete.add(dl);

if (si != null) {
for (DownloadLink dl : si.getChildren()) {
if (dl.getAvailableStatus() == AvailableStatus.FALSE || dl.getLinkStatus().hasStatus(LinkStatus.ERROR_FILE_NOT_FOUND)) {
nodesToDelete.add(dl);
}
}
} else {
DownloadController dlc = DownloadController.getInstance();
final boolean readL = dlc.readLock();
try {
for (FilePackage fp : dlc.getPackages()) {
synchronized (fp) {
for (DownloadLink dl : fp.getChildren()) {
if (dl.getAvailableStatus() == AvailableStatus.FALSE
|| dl.getLinkStatus().hasStatus(LinkStatus.ERROR_FILE_NOT_FOUND)) {
nodesToDelete.add(dl);
}
}
}
}
} finally {
DownloadController.getInstance().readUnlock(readL);
}
}
DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete), _GUI._.DeleteSelectedOfflineLinksAction_actionPerformed());

DownloadController.deleteLinksRequest(new SelectionInfo<FilePackage, DownloadLink>(null, nodesToDelete),
_GUI._.DeleteSelectedOfflineLinksAction_actionPerformed(si != null ? "selected & " : ""));

}

Expand Down