Skip to content

Commit c4044e8

Browse files
committed
add new icon, move theme location, fix another menubar bug
1 parent caffc7c commit c4044e8

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed

app/src/processing/app/Base.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ static public void main(String args[]) {
199199
Base.openURL("http://dev.processing.org/bugs/show_bug.cgi?id=786");
200200
}
201201
}
202-
System.setProperty("apple.laf.useScreenMenuBar", menubar);
203202
}
203+
System.setProperty("apple.laf.useScreenMenuBar", menubar);
204204
}
205205

206206
// Set the look and feel before opening the window
@@ -1436,15 +1436,8 @@ static public File selectFolder(String prompt, File folder, Frame frame) {
14361436
* Give this Frame a Processing icon.
14371437
*/
14381438
static public void setIcon(Frame frame) {
1439-
// set the window icon
1440-
if (icon == null) {
1441-
try {
1442-
icon = Base.getLibImage("icon.gif", frame);
1443-
} catch (Exception e) { } // fail silently, no big whup
1444-
}
1445-
if (icon != null) {
1446-
frame.setIconImage(icon);
1447-
}
1439+
Image image = Toolkit.getDefaultToolkit().createImage(PApplet.ICON_IMAGE);
1440+
frame.setIconImage(image);
14481441
}
14491442

14501443

@@ -1629,6 +1622,14 @@ static public File getContentFile(String name) {
16291622
}
16301623

16311624

1625+
/**
1626+
* Get an image associated with the current color theme.
1627+
*/
1628+
static public Image getThemeImage(String name, Component who) {
1629+
return getLibImage("theme/" + name, who);
1630+
}
1631+
1632+
16321633
/**
16331634
* Return an Image object from inside the Processing lib folder.
16341635
*/

app/src/processing/app/EditorHeader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public EditorHeader(Editor eddie) {
8181
pieces = new Image[STATUS.length][WHERE.length];
8282
for (int i = 0; i < STATUS.length; i++) {
8383
for (int j = 0; j < WHERE.length; j++) {
84-
pieces[i][j] = Base.getLibImage("tab-" + STATUS[i] + "-" +
85-
WHERE[j] + ".gif", this);
84+
String path = "theme/tab-" + STATUS[i] + "-" + WHERE[j] + ".gif";
85+
pieces[i][j] = Base.getThemeImage(path, this);
8686
}
8787
}
8888
}

app/src/processing/app/EditorLineStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public EditorLineStatus(JEditTextArea textarea) {
5555
high = Preferences.getInteger("linestatus.height");
5656

5757
if (Base.isMacOS()) {
58-
resize = Base.getLibImage("resize.gif", this);
58+
resize = Base.getThemeImage("resize.gif", this);
5959
}
6060
//linestatus.bgcolor = #000000
6161
//linestatus.font = SansSerif,plain,10

app/src/processing/app/EditorToolbar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public EditorToolbar(Editor editor, JMenu menu) { //JPopupMenu popup) {
9696
this.menu = menu;
9797

9898
if (buttons == null) {
99-
buttons = Base.getLibImage("buttons.gif", this);
99+
buttons = Base.getThemeImage("buttons.gif", this);
100100
}
101101

102102
buttonCount = 0;

core/src/processing/core/PApplet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6268,7 +6268,7 @@ public void componentResized(ComponentEvent e) {
62686268
/**
62696269
* GIF image of the Processing logo.
62706270
*/
6271-
static final byte[] ICON_IMAGE = {
6271+
static public final byte[] ICON_IMAGE = {
62726272
71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -77, 0, 0, 0, 0, 0, -1, -1, -1, 12,
62736273
12, 13, -15, -15, -14, 45, 57, 74, 54, 80, 111, 47, 71, 97, 62, 88, 117,
62746274
1, 14, 27, 7, 41, 73, 15, 52, 85, 2, 31, 55, 4, 54, 94, 18, 69, 109, 37,

todo.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ X this seems to have fixed itself
2828

2929
design updates
3030
X update about box in windows app and lib folder
31-
_ update icon.gif in the source code
32-
_ add in new buttons from casey
33-
_ move all editor theme graphics into their own subfolder
31+
X update icon.gif in the source code
32+
X add in new buttons from casey
33+
X move all editor theme graphics into their own subfolder
3434
_ add space between run/stop and the others
3535

3636
_ change windows and linux to use jdk 6u10

0 commit comments

Comments
 (0)