Browse Source

Merge pull request #60 in BA/design from ~VITO/design:store_bug to dev

* commit '83a9bdf8dd3688ee3fce8096cf17f6ccb28bc162':
  去掉多余的import
  1、减小插件商店窗体高度 2、提醒插件升级的时候使用的框体改为新版插件商店的框体
  修复提示消息在页面背部的问题
master
richie 9 years ago
parent
commit
0cc699c28d
  1. 36
      designer_base/src/com/fr/design/extra/PluginManagerPane.java
  2. 2
      designer_base/src/com/fr/design/extra/PluginShopDialog.java
  3. 7
      designer_base/src/com/fr/start/BaseDesigner.java

36
designer_base/src/com/fr/design/extra/PluginManagerPane.java

@ -43,22 +43,22 @@ public class PluginManagerPane extends BasicPane {
URL url = ClassLoader.getSystemResource("");
installHome = url.getPath();
} else {
installHome = StableUtils.getInstallHome();
File file = new File(StableUtils.pathJoin(installHome, "scripts"));
if (!file.exists()) {
int rv = JOptionPane.showConfirmDialog(
null,
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Install"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
if (rv == JOptionPane.OK_OPTION) {
downloadShopScripts();
installHome = StableUtils.getInstallHome();
File file = new File(StableUtils.pathJoin(installHome, "scripts"));
if (!file.exists()) {
int rv = JOptionPane.showConfirmDialog(
this,
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Install"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
if (rv == JOptionPane.OK_OPTION) {
downloadShopScripts();
}
} else {
updateShopScripts();
}
} else {
updateShopScripts();
}
}
PluginWebPane webPane = new PluginWebPane(new File(installHome).getAbsolutePath());
add(webPane, BorderLayout.CENTER);
@ -90,7 +90,7 @@ public class PluginManagerPane extends BasicPane {
}
});
} catch (PluginVerifyException e) {
JOptionPane.showMessageDialog(null, e.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(PluginManagerPane.this, e.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
return false;
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e);
@ -106,7 +106,7 @@ public class PluginManagerPane extends BasicPane {
if (get()) {
IOUtils.unzip(new File(StableUtils.pathJoin(PluginHelper.DOWNLOAD_PATH, PluginHelper.TEMP_FILE)), StableUtils.getInstallHome());
int rv = JOptionPane.showOptionDialog(
null,
PluginManagerPane.this,
Inter.getLocText("FR-Designer-Plugin_Shop_Installed"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
@ -135,7 +135,7 @@ public class PluginManagerPane extends BasicPane {
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) {
if (!ComparatorUtils.equals(httpClient.getResponseText(), LATEST)) {
int rv = JOptionPane.showConfirmDialog(
null,
PluginManagerPane.this,
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Update"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,

2
designer_base/src/com/fr/design/extra/PluginShopDialog.java

@ -10,7 +10,7 @@ import java.awt.*;
* Created by vito on 16/4/18.
*/
public class PluginShopDialog extends UIDialog {
private static final Dimension DEFAULT_SHOP = new Dimension(900, 700);
private static final Dimension DEFAULT_SHOP = new Dimension(900, 690);
public PluginShopDialog(Frame frame, BasicPane pane) {
super(frame, pane, false);

7
designer_base/src/com/fr/start/BaseDesigner.java

@ -7,8 +7,10 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.RestartHelper;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.PluginManagerPane;
import com.fr.design.extra.PluginShopDialog;
import com.fr.design.extra.PluginWebBridge;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.file.TemplateTreePane;
@ -130,7 +132,8 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
int r = JOptionPane.showConfirmDialog(null, text, Inter.getLocText("FR-Designer_Plugin_Should_Update_Title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
if (r == JOptionPane.OK_OPTION) {
final PluginManagerPane managerPane = new PluginManagerPane();
BasicDialog dlg = managerPane.showLargeWindow(DesignerContext.getDesignerFrame(),null);
UIDialog dlg = new PluginShopDialog(DesignerContext.getDesignerFrame(),managerPane);
PluginWebBridge.getHelper().setDialogHandle(dlg);
dlg.setVisible(true);
}
}

Loading…
Cancel
Save