From 33e7b4700f06c78f3fce9f446e42d43f4356e1f6 Mon Sep 17 00:00:00 2001 From: Rik Date: Wed, 11 Sep 2019 11:21:52 +0100 Subject: [PATCH 1/2] Sync button text and def. window size https://issues.apache.org/jira/browse/NETBEANS-2722 The text "Take over local changes" it's unclear. Changed into "Upload local changes" The default diff window size is too small. Changed to 1024x768 (Just to be conservative... but it's still too small for me). The diff window size should be improved implementing the persistance of the resized window size to let any user set whatever he wants. --- .../modules/php/project/connections/sync/diff/DiffPanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java b/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java index af180019e0b0..130317080230 100644 --- a/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java +++ b/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java @@ -84,13 +84,13 @@ public DiffPanel(RemoteClient remoteClient, SyncItem syncItem, String charsetNam this.charsetName = charsetName; initComponents(); - setPreferredSize(new Dimension(600, 450)); + setPreferredSize(new Dimension(1024, 768)); } @NbBundle.Messages({ "# {0} - file path", "DiffPanel.title=Remote Diff for {0}", - "DiffPanel.button.titleWithMnemonics=&Take Over Local Changes" + "DiffPanel.button.titleWithMnemonics=&Upload Local Changes" }) public boolean open() throws IOException { assert SwingUtilities.isEventDispatchThread(); From 08549112915b2b09c666ad23904cb14bf8d80f82 Mon Sep 17 00:00:00 2001 From: Junichi Yamamoto Date: Wed, 11 Sep 2019 20:35:57 +0900 Subject: [PATCH 2/2] Keep the last diff window size --- .../modules/php/project/connections/sync/diff/DiffPanel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java b/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java index 130317080230..b512e1887bac 100644 --- a/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java +++ b/php/php.project/src/org/netbeans/modules/php/project/connections/sync/diff/DiffPanel.java @@ -62,6 +62,8 @@ public final class DiffPanel extends JPanel { static final Logger LOGGER = Logger.getLogger(DiffPanel.class.getName()); private static final RequestProcessor RP = new RequestProcessor(DiffPanel.class); + // @GuardedBy(AWT) + private static Dimension PREFERRED_SIZE = new Dimension(1024, 768); final SyncItem syncItem; final RemoteClient remoteClient; @@ -84,7 +86,7 @@ public DiffPanel(RemoteClient remoteClient, SyncItem syncItem, String charsetNam this.charsetName = charsetName; initComponents(); - setPreferredSize(new Dimension(1024, 768)); + setPreferredSize(PREFERRED_SIZE); } @NbBundle.Messages({ @@ -112,6 +114,7 @@ public boolean open() throws IOException { try { dialog.setVisible(true); } finally { + PREFERRED_SIZE = getSize(); dialog.dispose(); DiffFileEncodingQueryImpl.clear(); }