Project import/SweetHome3D - Diff affdb19a63...cd5b4c53d8

... ... --- a/.abf.yml
... ... +++ b/.abf.yml
... ... @@ -7,8 +7,8 @@ sources:
7 7
  3DModels-Reallusion-1.6.3.zip: 8d6c64c61f4cc6b6bbf889825ae22c31763d9e0d
8 8
  3DModels-Scopia-1.6.3.zip: d2f176605aa5de2f2db3d303d6bc5bac044d0789
9 9
  3DModels-Trees-1.6.3.zip: d447db6d3d68958e16dd5ed0f17ab8b1c423bbfe
10
  FurnitureLibraryEditor-1.21-src.zip: bc8f353042aef1655434ceadbe2e69504caa1e18
11
  SweetHome3D-5.6-src.zip: c552894990f53bfadb14300692a9693fac92e611
10
  FurnitureLibraryEditor-1.22-src.zip: 079198b76fbfd8ac2e07815d9203213b7b9c13c7
11
  SweetHome3D-5.7-src.zip: d53acba42afbb22103872d07da628b8b2daef0dd
12 12
  Textures-Contributions-1.2.zip: 0ceac89ddc2e3d997ab8921a5f3106840b2873a1
13 13
  Textures-eTeksScopia-1.2.zip: c9bbc84aa2b1dc35b24897bc47cd89db78560c61
14 14
  TexturesLibraryEditor-1.5-src.zip: dcfffd6bc88beb0c160b5a6c4de0ef68c60292ad
view file @ cd5b4c53d8
... ... --- a/SweetHome3D.spec
... ... +++ b/SweetHome3D.spec
... ... @@ -4,16 +4,16 @@
4 4
%define modelver 1.6.3
5 5
%define textuver 1.2
6 6
%define texturesver 1.5
7
%define furniturever 1.21
7
%define furniturever 1.22
8 8
9 9
Summary:	A free interior design application, with a 3D preview
10 10
Name:		SweetHome3D
11
Version:	5.6
11
Version:	5.7
12 12
Release:	1
13 13
License:	GPLv2
14 14
Group:		Graphics
15 15
Url:		http://www.sweethome3d.com/
16
Source0:	http://sourceforge.net/projects/%{name}/files/SweetHome3D-source/SweetHome3D-%{version}-src/%{pkgname}-%{version}-src.zip
16
Source0:	http://sourceforge.net/projects/sweethome3d/files/SweetHome3D-source/%{pkgname}-%{version}-src/%{pkgname}-%{version}-src.zip
17 17
Source1:	http://sourceforge.net/projects/%{name}/files/SweetHome3D-models/3DModels-%{modelver}/%{pkgmod}-Contributions-%{modelver}.zip
18 18
Source2:	http://sourceforge.net/projects/%{name}/files/SweetHome3D-models/3DModels-%{modelver}/%{pkgmod}-KatorLegaz-%{modelver}.zip
19 19
Source3:	http://sourceforge.net/projects/%{name}/files/SweetHome3D-models/3DModels-%{modelver}/%{pkgmod}-LucaPresidente-%{modelver}.zip
... ... @@ -25,7 +25,7 @@ Source8: http://sourceforge.net/projects/%{name}/files/SweetHome3D-models/3DMode
25 25
Source9:	sweethome3d_128x128.png
26 26
Source10:	sweethome3d-4.6-script
27 27
Source11:	http://sourceforge.net/projects/%{name}/files/TexturesLibraryEditor-source/TexturesLibraryEditor-%{texturesver}-src.zip
28
Source12:	http://sourceforge.net/projects/%{name}/files/FurnitureLibraryEditor-source/FurnitureLibraryEditor-%{furniturever}-src.zip
28
Source12:	https://sourceforge.net/projects/sweethome3d/files/FurnitureLibraryEditor-source/FurnitureLibraryEditor-%{furniturever}-src.zip
29 29
Source13:	http://sourceforge.net/projects/%{name}/files/SweetHome3D-textures/Textures-%{textuver}/%{pkgtextu}-Contributions-%{textuver}.zip
30 30
Source14:	http://sourceforge.net/projects/%{name}/files/SweetHome3D-textures/Textures-%{textuver}/%{pkgtextu}-eTeksScopia-%{textuver}.zip
31 31
Source15:	SweetHome3D.rpmlintrc
view file @ cd5b4c53d8
... ... --- a/sweethome3d-5.4-javadoc.patch
... ... +++ b/sweethome3d-5.4-javadoc.patch
... ... @@ -16,7 +16,7 @@ diff -Naur SweetHome3D-5.4-src-orig/build.xml SweetHome3D-5.4-src/build.xml
16 16
       <doctitle><![CDATA[<img src='http://www.sweethome3d.com/SweetHome3DIcon.gif' width='48' height='48' alt='Sweet Home 3D' align='absmiddle'> Sweet Home 3D ${version} API]]></doctitle>
17 17
@@ -1300,8 +1300,8 @@
18 18
                        <td><a href='http://www.eteks.com' target='_parent'><img align='absmiddle' src='http://www.sweethome3d.com/images/eteks.gif' border='0'><a></td>
19
                        <td>&copy; Copyrights 2006-2017 Emmanuel PUYBARET / <a href='http://www.eteks.com' target='_parent'>eTeks</a>
19
                        <td>&copy; Copyrights 2006-2018 Emmanuel PUYBARET / <a href='http://www.eteks.com' target='_parent'>eTeks</a>
20 20
                            <br>Distributed under <a href='http://www.gnu.org/licenses/gpl-2.0.html' target='_parent'>GNU General Public License</a></td></tr></table>]]></bottom>
21 21
-      <link href="http://docs.oracle.com/javase/1.5.1/docs/api/"/>
22 22
-      <link href="http://download.java.net/media/java3d/javadoc/1.5.3/"/>
view file @ cd5b4c53d8
... ... --- a/sweethome3d-5.6-01noMacOSX.patch
... ... +++ b/sweethome3d-5.6-01noMacOSX.patch
... ... @@ -28,12 +28,10 @@ index 57fb352..56234d7 100644
28 28
     updateFrameTitle(homeFrame, this.home, this.application);
29 29
     // Change component orientation
30 30
     applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));    
31
diff --git a/src/com/eteks/sweethome3d/MacOSXConfiguration.java b/src/com/eteks/sweethome3d/MacOSXConfiguration.java
32
deleted file mode 100644
33
index c1428b1..0000000
34
--- a/src/com/eteks/sweethome3d/MacOSXConfiguration.java
35
+++ /dev/null
36
@@ -1,815 +0,0 @@
31
diff -Naur SweetHome3D-5.7-src-orig/src/com/eteks/sweethome3d/MacOSXConfiguration.java SweetHome3D-5.7-src/src/com/eteks/sweethome3d/MacOSXConfiguration.java
32
--- SweetHome3D-5.7-src-orig/src/com/eteks/sweethome3d/MacOSXConfiguration.java	2018-01-25 16:15:28.000000000 +0300
33
+++ SweetHome3D-5.7-src/src/com/eteks/sweethome3d/MacOSXConfiguration.java	1970-01-01 03:00:00.000000000 +0300
34
@@ -1,837 +0,0 @@
37 35
-/*
38 36
- * MacOSXConfiguraton.java 6 sept. 2006
39 37
- *
... ... @@ -181,7 +179,7 @@ index c1428b1..0000000
179 179
-          } else {
180 180
-            macosxApplication.setDefaultMenuBar(defaultMenuBar);
181 181
-          }
182
-          addWindowMenu(null, defaultMenuBar, homeApplication, defaultHomeView, true);
182
-          addWindowMenu(null, defaultMenuBar, homeApplication, defaultHomeView, null);
183 183
-        } catch (Throwable ex) {
184 184
-          // Create default frame if setDefaultMenuBar isn't available
185 185
-          frame = createDummyFrameWithDefaultMenuBar(homeApplication, defaultHomeView, defaultMenuBar);
... ... @@ -328,7 +326,7 @@ index c1428b1..0000000
326 326
-          }
327 327
-          // Add Mac OS X Window menu on new homes
328 328
-          MacOSXConfiguration.addWindowMenu(
329
-              homeFrame, homeFrame.getJMenuBar(), homeApplication, defaultHomeView, false);
329
-              homeFrame, homeFrame.getJMenuBar(), homeApplication, defaultHomeView, ev.getItem());
330 330
-          
331 331
-          if (OperatingSystem.isJavaVersionBetween("1.7", "1.7.0_60")) {
332 332
-            // Help system to understand it should display the main menu of one of the remaining windows when a window is closed
... ... @@ -581,7 +579,7 @@ index c1428b1..0000000
579 579
-          frame.setVisible(true);
580 580
-          frame.setJMenuBar(defaultMenuBar);
581 581
-          frame.setContentPane(defaultHomeView);
582
-          addWindowMenu(frame, defaultMenuBar, homeApplication, defaultHomeView, true);
582
-          addWindowMenu(frame, defaultMenuBar, homeApplication, defaultHomeView, null);
583 583
-        }
584 584
-      });
585 585
-    homeApplication.addHomesListener(new CollectionListener<Home>() {
... ... @@ -611,21 +609,22 @@ index c1428b1..0000000
609 609
-                                    final JMenuBar menuBar, 
610 610
-                                    final SweetHome3D homeApplication,
611 611
-                                    final HomePane defaultHomeView, 
612
-                                    boolean defaultFrame) {
612
-                                    final Home home) {
613 613
-    UserPreferences preferences = homeApplication.getUserPreferences();
614 614
-    final JMenu windowMenu = new JMenu(
615 615
-        new ResourceAction(preferences, MacOSXConfiguration.class, "WINDOW_MENU", true));
616
-    final boolean enabledMenuItem = home != null;
616 617
-    // Add Window menu before Help menu
617 618
-    menuBar.add(windowMenu, menuBar.getComponentCount() - 1);
618 619
-    windowMenu.add(new JMenuItem(
619
-        new ResourceAction(preferences, MacOSXConfiguration.class, "MINIMIZE", !defaultFrame) {
620
-        new ResourceAction(preferences, MacOSXConfiguration.class, "MINIMIZE", enabledMenuItem) {
620 621
-            @Override
621 622
-            public void actionPerformed(ActionEvent ev) {
622 623
-              frame.setState(JFrame.ICONIFIED);
623 624
-            }
624 625
-          }));
625 626
-    windowMenu.add(new JMenuItem(
626
-        new ResourceAction(preferences, MacOSXConfiguration.class, "ZOOM", !defaultFrame) {
627
-        new ResourceAction(preferences, MacOSXConfiguration.class, "ZOOM", enabledMenuItem) {
627 628
-            @Override
628 629
-            public void actionPerformed(ActionEvent ev) {
629 630
-              if ((frame.getExtendedState() & JFrame.MAXIMIZED_BOTH) != 0) {
... ... @@ -637,7 +636,7 @@ index c1428b1..0000000
636 636
-          }));
637 637
-    windowMenu.addSeparator();
638 638
-    windowMenu.add(new JMenuItem(
639
-        new ResourceAction(preferences, MacOSXConfiguration.class, "BRING_ALL_TO_FRONT", !defaultFrame) {
639
-        new ResourceAction(preferences, MacOSXConfiguration.class, "BRING_ALL_TO_FRONT", enabledMenuItem) {
640 640
-            @Override
641 641
-            public void actionPerformed(ActionEvent ev) {
642 642
-              // Avoid blinking while bringing other windows to front
... ... @@ -655,39 +654,60 @@ index c1428b1..0000000
654 654
-            }
655 655
-          }));
656 656
-    
657
-    // Prepare window menu items and their action
658
-    // It would be nicer to dynamically add these menu items when the Window menu is selected 
659
-    // but a regression in Java 8u152 prevented to listen to dynamic menu items 
660
-    final int alwaysVisibleItemsCount = windowMenu.getMenuComponentCount();
661
-    windowMenu.addSeparator();
662
-    List<Home> homes = homeApplication.getHomes();
663
-    for (int i = 0; i < homes.size(); i++) {
664
-      windowMenu.add(createWindowCheckBoxMenuItem(homeApplication, i));
665
-    }
666
-    homeApplication.addHomesListener(new CollectionListener<Home>() {
667
-        public void collectionChanged(CollectionEvent<Home> ev) {
668
-          switch (ev.getType()) {
669
-            case ADD :
670
-              windowMenu.add(createWindowCheckBoxMenuItem(homeApplication, homeApplication.getHomes().size() - 1));
671
-              break;
672
-            case DELETE :
673
-              windowMenu.remove(windowMenu.getMenuComponentCount() - 1);
674
-              if (home == ev.getItem()) {
675
-                homeApplication.removeHomesListener(this);
676
-              }
677
-              break;
678
-          } 
679
-        }
680
-      });
681
-
657 682
-    windowMenu.addMenuListener(new MenuListener() {
658 683
-        public void menuSelected(MenuEvent ev) {
659
-          boolean firstMenuItem = true;
660
-          // Fill menu dynamically with a menu item for the frame of each application home
661
-          for (Home home : homeApplication.getHomes()) {
662
-            final JFrame applicationFrame = homeApplication.getHomeFrame(home);
663
-            JCheckBoxMenuItem windowMenuItem = new JCheckBoxMenuItem(
664
-                new AbstractAction(applicationFrame.getTitle()) {
665
-                    public void actionPerformed(ActionEvent ev) {
666
-                      applicationFrame.toFront();
667
-                    }
668
-                  });
669
-              
670
-            if (frame == applicationFrame) {
671
-              windowMenuItem.setSelected(true);
672
-            }
673
-            if (firstMenuItem) {
674
-              windowMenu.addSeparator();
675
-              firstMenuItem = false;
676
-            }
677
-            windowMenu.add(windowMenuItem);
684
-          // Update menu dynamically with a visible menu item for the frame of each application home
685
-          List<Home> homes = homeApplication.getHomes();
686
-          // Show separator and menu items with home names 
687
-          windowMenu.getMenuComponent(alwaysVisibleItemsCount).setVisible(homes.size() > 0);
688
-          for (int i = alwaysVisibleItemsCount + 1, index = 0; i < windowMenu.getMenuComponentCount(); i++, index++) {
689
-            JCheckBoxMenuItem windowMenuItem =  (JCheckBoxMenuItem)windowMenu.getMenuComponent(i);
690
-            JFrame applicationFrame = homeApplication.getHomeFrame(homes.get(index));
691
-            windowMenuItem.setText(applicationFrame.getTitle());
692
-            windowMenuItem.setSelected(frame == applicationFrame);
678 693
-          }
679 694
-        }
680 695
-
681 696
-        public void menuDeselected(MenuEvent ev) {
682
-          // Remove dynamically filled part of menu
683
-          for (int i = windowMenu.getMenuComponentCount() - 1; i >= 4; i--) {
684
-            windowMenu.remove(i);
685
-          }
686 697
-        }
687 698
-
688 699
-        public void menuCanceled(MenuEvent ev) {
689
-          menuDeselected(ev);
700
-        }
701
-      });
702
-  }
703
-
704
-  /**
705
-   * Returns a check box menu item which action will bring to front the home at the given <code>index</code>.
706
-   */
707
-  private static JCheckBoxMenuItem createWindowCheckBoxMenuItem(final SweetHome3D homeApplication, final int index) {
708
-    return new JCheckBoxMenuItem(new AbstractAction() {
709
-        public void actionPerformed(ActionEvent ev) {
710
-          homeApplication.getHomeFrame(homeApplication.getHomes().get(index)).toFront();
690 711
-        }
691 712
-      });
692 713
-  }