|
27 | 27 | import java.net.*;
|
28 | 28 | import java.util.*;
|
29 | 29 |
|
30 |
| -import javax.swing.SwingWorker; |
31 |
| - |
32 | 30 | import processing.app.Base;
|
33 | 31 | import processing.app.Language;
|
34 | 32 | import processing.app.Messages;
|
@@ -676,79 +674,64 @@ static private void clearRestartFlags(File root) {
|
676 | 674 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
677 | 675 |
|
678 | 676 |
|
679 |
| - static ManagerFrame managerDialog; |
| 677 | + static ManagerFrame managerFrame; |
680 | 678 |
|
681 | 679 |
|
682 | 680 | static public void init(Base base) throws Exception {
|
683 | 681 | // long t1 = System.currentTimeMillis();
|
684 | 682 | listing = ContributionListing.getInstance(); // Moved here to make sure it runs on EDT [jv 170121]
|
685 | 683 | // long t2 = System.currentTimeMillis();
|
686 |
| - managerDialog = new ManagerFrame(base); |
| 684 | + managerFrame = new ManagerFrame(base); |
687 | 685 | // long t3 = System.currentTimeMillis();
|
688 | 686 | cleanup(base);
|
689 | 687 | // long t4 = System.currentTimeMillis();
|
690 | 688 | // System.out.println("ContributionManager.init() " + (t2-t1) + " " + (t3-t2) + " " + (t4-t3));
|
691 | 689 | }
|
692 | 690 |
|
693 | 691 |
|
| 692 | + static public void updateTheme() { |
| 693 | + if (managerFrame != null) { |
| 694 | + managerFrame.updateTheme(); |
| 695 | + } |
| 696 | + } |
| 697 | + |
| 698 | + |
694 | 699 | /**
|
695 | 700 | * Show the Library installer window.
|
696 | 701 | */
|
697 | 702 | static public void openLibraries() {
|
698 |
| - managerDialog.showFrame(ContributionType.LIBRARY); |
| 703 | + managerFrame.showFrame(ContributionType.LIBRARY); |
699 | 704 | }
|
700 | 705 |
|
701 | 706 |
|
702 | 707 | /**
|
703 | 708 | * Show the Mode installer window.
|
704 | 709 | */
|
705 | 710 | static public void openModes() {
|
706 |
| - managerDialog.showFrame(ContributionType.MODE); |
| 711 | + managerFrame.showFrame(ContributionType.MODE); |
707 | 712 | }
|
708 | 713 |
|
709 | 714 |
|
710 | 715 | /**
|
711 | 716 | * Show the Tool installer window.
|
712 | 717 | */
|
713 | 718 | static public void openTools() {
|
714 |
| - managerDialog.showFrame(ContributionType.TOOL); |
| 719 | + managerFrame.showFrame(ContributionType.TOOL); |
715 | 720 | }
|
716 | 721 |
|
717 | 722 |
|
718 | 723 | /**
|
719 | 724 | * Show the Examples installer window.
|
720 | 725 | */
|
721 | 726 | static public void openExamples() {
|
722 |
| - managerDialog.showFrame(ContributionType.EXAMPLES); |
| 727 | + managerFrame.showFrame(ContributionType.EXAMPLES); |
723 | 728 | }
|
724 | 729 |
|
725 | 730 |
|
726 | 731 | /**
|
727 | 732 | * Open the updates panel.
|
728 | 733 | */
|
729 | 734 | static public void openUpdates() {
|
730 |
| - managerDialog.showFrame(null); |
| 735 | + managerFrame.showFrame(null); |
731 | 736 | }
|
732 |
| - |
733 |
| - |
734 |
| - // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
735 |
| - |
736 |
| - |
737 |
| - /* |
738 |
| - static int getTypeIndex(ContributionType contributionType) { |
739 |
| - int index; |
740 |
| - if (contributionType == ContributionType.LIBRARY) { |
741 |
| - index = 0; |
742 |
| - } else if (contributionType == ContributionType.MODE) { |
743 |
| - index = 1; |
744 |
| - } else if (contributionType == ContributionType.TOOL) { |
745 |
| - index = 2; |
746 |
| - } else if (contributionType == ContributionType.EXAMPLES) { |
747 |
| - index = 3; |
748 |
| - } else { |
749 |
| - index = 4; |
750 |
| - } |
751 |
| - return index; |
752 |
| - } |
753 |
| - */ |
754 | 737 | }
|
0 commit comments