git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@49855 ebf7c1c2-ba36-0410-9fe8-c592906822b4

Former-commit-id: c82bc5bbf9e0d20e3b918ce799f81a8369c61ddd
This commit is contained in:
jiaz 2024-09-24 15:08:59 +00:00
parent a83ee0e604
commit 82b152ee6b
7 changed files with 20 additions and 5 deletions

View File

@ -182,7 +182,7 @@ public class BuyAction extends AbstractAction {
if (lazyHostPlugin != null) {
AccountController.openAfflink(lazyHostPlugin, null, "buypremium/accountmanager/buy" + (table == null ? "/context" : "/table"));
final BuyAndAddPremiumAccount dia;
UIOManager.I().show(BuyAndAddPremiumDialogInterface.class, dia = new BuyAndAddPremiumAccount(lazyHostPlugin.getDomainInfo()), "accountmanager" + (table == null ? "/context" : "/table")));
UIOManager.I().show(BuyAndAddPremiumDialogInterface.class, dia = new BuyAndAddPremiumAccount(lazyHostPlugin.getDomainInfo(), "accountmanager" + (table == null ? "/context" : "/table")));
dia.throwCloseExceptions();
}
} catch (DialogClosedException e1) {

View File

@ -6,6 +6,7 @@ import java.util.List;
import jd.plugins.AccountInfo;
import org.appwork.swing.exttable.tree.TreeNodeInterface;
import org.jdownloader.DomainInfo;
import org.jdownloader.controlling.hosterrule.AccountReference;
public class AccountWrapper implements AccountInterface {
@ -85,4 +86,8 @@ public class AccountWrapper implements AccountInterface {
public void setParent(TreeNodeInterface parent) {
this.parent = (GroupWrapper) parent;
}
public DomainInfo getDomainInfo() {
return account.getDomainInfo();
}
}

View File

@ -82,4 +82,5 @@ public class GroupWrapper implements AccountInterface {
public String getName() {
return name;
}
}

View File

@ -39,7 +39,7 @@ public class NewRuleAction extends AbstractAddAction {
/* Allow only one rule per hoster -> Remove items from list which a rule already exists for. */
final HosterRuleController hrc = HosterRuleController.getInstance();
for (final AccountUsageRule aur : hrc.list()) {
list.remove(DomainInfo.getInstance(aur.getHoster(), true));
list.remove(DomainInfo.getInstance(aur.getHoster()));
}
final ChooseHosterDialog d = new ChooseHosterDialog(_GUI.T.NewRuleAction_actionPerformed_choose_hoster_message(), list.toArray(new DomainInfo[] {}));
try {

View File

@ -22,7 +22,6 @@ import org.appwork.swing.exttable.renderercomponents.RendererTextField;
import org.appwork.swing.exttable.tree.ExtTreeTableModel;
import org.appwork.utils.StringUtils;
import org.appwork.utils.swing.renderer.RendererCheckBox;
import org.jdownloader.DomainInfo;
import org.jdownloader.controlling.hosterrule.FreeAccountReference;
import org.jdownloader.gui.IconKey;
import org.jdownloader.gui.translate._GUI;
@ -165,7 +164,7 @@ public class PackageColumn extends ExtTextColumn<AccountInterface> {
if (value instanceof GroupWrapper) {
return new AbstractIcon(IconKey.ICON_PACKAGE_OPEN, 18);
} else {
return DomainInfo.getInstance(((AccountWrapper) value).getHost()).getFavIcon(false);
return ((AccountWrapper) value).getDomainInfo().getFavIcon(false);
}
}

View File

@ -7,6 +7,7 @@ import jd.plugins.AccountInfo;
import jd.plugins.AccountTrafficView;
import org.appwork.utils.Hash;
import org.jdownloader.DomainInfo;
public class AccountReference {
public AccountReference() {
@ -54,6 +55,10 @@ public class AccountReference {
return getAccount().getHoster();
}
public DomainInfo getDomainInfo() {
return getAccount().getDomainInfo();
}
public String getUser() {
return getAccount().getUser();
}

View File

@ -7,6 +7,7 @@ import jd.plugins.AccountInfo;
import jd.plugins.AccountTrafficView;
import org.appwork.exceptions.WTFException;
import org.jdownloader.DomainInfo;
public class FreeAccountReference extends AccountReference {
static final int FREE_ID = 0;
@ -35,6 +36,10 @@ public class FreeAccountReference extends AccountReference {
return null;
}
public DomainInfo getDomainInfo() {
return DomainInfo.getInstance(getHoster());
}
public boolean isAvailable() {
return true;
}