|
|
|
@ -254,9 +254,9 @@ public class NativeProductBridge {
|
|
|
|
|
MiniComponentShopDialog.getInstance().getContentPane(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Incompatible_Component_Tip"), |
|
|
|
|
"", |
|
|
|
|
FineJOptionPane.YES_NO_OPTION |
|
|
|
|
FineJOptionPane.OK_CANCEL_OPTION |
|
|
|
|
); |
|
|
|
|
allowedDownload = result == JOptionPane.YES_OPTION; |
|
|
|
|
allowedDownload = result == JOptionPane.OK_OPTION; |
|
|
|
|
} |
|
|
|
|
if (allowedDownload) { |
|
|
|
|
fireStartEvent(null); |
|
|
|
@ -353,33 +353,14 @@ public class NativeProductBridge {
|
|
|
|
|
SwingUtilities.invokeLater(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
boolean allowedDownload; |
|
|
|
|
OnlineShareWidget[] childrenWidgets = OnlineShopUtils.getPackageWidgets(widget, false); |
|
|
|
|
boolean isCompatibleWithCurrentEnv = true; |
|
|
|
|
for (OnlineShareWidget children: childrenWidgets) { |
|
|
|
|
if (!children.isCompatibleWithCurrentEnv()) { |
|
|
|
|
isCompatibleWithCurrentEnv = false; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
int result; |
|
|
|
|
if (!isCompatibleWithCurrentEnv) { |
|
|
|
|
result = FineJOptionPane.showConfirmDialog( |
|
|
|
|
MiniComponentShopDialog.getInstance().getContentPane(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Incompatible_Components_Package_Tip", childrenCount), |
|
|
|
|
"", |
|
|
|
|
FineJOptionPane.YES_NO_OPTION |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
result = FineJOptionPane.showConfirmDialog( |
|
|
|
|
OnlineShareWidget[] childrenWidgets = OnlineShopUtils.getPackageWidgets(widget, true); |
|
|
|
|
int result = FineJOptionPane.showConfirmDialog( |
|
|
|
|
MiniComponentShopDialog.getInstance().getContentPane(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Components_Package_Tip", childrenCount), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Components_Package_Tip", childrenWidgets.length), |
|
|
|
|
"", |
|
|
|
|
FineJOptionPane.YES_NO_OPTION |
|
|
|
|
FineJOptionPane.OK_CANCEL_OPTION |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
allowedDownload = result == JOptionPane.YES_OPTION; |
|
|
|
|
if (allowedDownload) { |
|
|
|
|
if (result == JOptionPane.OK_OPTION) { |
|
|
|
|
fireStartEvent(null); |
|
|
|
|
action.install(); |
|
|
|
|
} else { |
|
|
|
|