Skip to content

Commit 2ba4f14

Browse files
committed
commit of example app
0 parents  commit 2ba4f14

11 files changed

+122
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
tmp

CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Place your change log text here. This file will be incorporated with your app at package time.

LICENSE.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2012 Mitchell Amihod
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Resources/default_app_logo.png

30.2 KB
Loading

Resources/index.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4+
<title>TrayRy</title>
5+
6+
<script type="text/javascript">
7+
var Ti = Titanium;
8+
</script>
9+
<script src="tray.js"></script>
10+
11+
</head>
12+
13+
<body>
14+
</body>
15+
16+
</html>

Resources/readme.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Some example code on how to make a menu item style application using TideSDK for OSX.
2+
3+
To hide the window, open tiapp.xml and change the height & width of your project to 0.
4+
5+
tip: While in development, you might want to keep the window so you can view the web inspector/console.
6+
7+
To make this a perfect OSX style menu app, and hide the app from the dock & app switcher you'll need to modify the Info.plist in the package of your built application.
8+
9+
```
10+
<key>LSUIElement</key>
11+
<string>1</string>
12+
```
13+
14+
( via: http://hints.macworld.com/article.php?story=20010701191518268 )
15+
16+
Questions? You can usually find me in #tidesdk on freenode.

Resources/tray-active.png

1.48 KB
Loading

Resources/tray.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
var tray = Ti.UI.addTray('tray.png'),
2+
menu = Ti.UI.createMenu(),
3+
4+
//Add some menu items
5+
menuItems = [
6+
7+
Titanium.UI.createMenuItem('Change Icon', function(e) {
8+
//Something's going on... let's change the icon.
9+
tray.setIcon('tray-active.png');
10+
setTimeout(function() {
11+
tray.setIcon('tray.png');
12+
}, 3000);
13+
}),
14+
15+
Titanium.UI.createMenuItem('Cat', function(e) {
16+
alert('Meow Meow');
17+
}),
18+
19+
Titanium.UI.createMenuItem('Quit', function(e) {
20+
confirm('You sure?', function() {
21+
Ti.App.exit();
22+
});
23+
})
24+
25+
];
26+
27+
menuItems.forEach(function(item) {
28+
menu.appendItem(item);
29+
});
30+
31+
tray.setMenu(menu);

Resources/tray.png

780 Bytes
Loading

manifest

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#appname:MenuOnlyApp
2+
#appid:com.meeech.menuonly
3+
#publisher:mitch
4+
#image:default_app_logo.png
5+
#url:http://www.example.com
6+
#guid:28e50209-4c4f-4849-8fb5-117e784f588d
7+
#desc:No description provided
8+
#type:desktop
9+
runtime:1.2.1.RC1
10+
tiapp:1.2.1.RC1
11+
tifilesystem:1.2.1.RC1
12+
tiplatform:1.2.1.RC1
13+
tiui:1.2.1.RC1
14+
ticodec:1.2.1.RC1
15+
tidatabase:1.2.1.RC1
16+
timedia:1.2.1.RC1
17+
timonkey:1.2.1.RC1
18+
tinetwork:1.2.1.RC1
19+
tiprocess:1.2.1.RC1
20+
tiworker:1.2.1.RC1

tiapp.xml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<ti:app xmlns:ti='http://ti.appcelerator.org'>
3+
<!-- These values are edited/maintained by Titanium Developer -->
4+
<id>com.meeech.menuonly</id>
5+
<name>MenuOnlyApp</name>
6+
<version>1.0</version>
7+
<publisher>mitch</publisher>
8+
<url>http://www.example.com</url>
9+
<icon>default_app_logo.png</icon>
10+
<copyright>2012 by mitch</copyright>
11+
<!-- Window Definition - these values can be edited -->
12+
<window>
13+
<id>initial</id>
14+
<title>MenuOnlyApp</title>
15+
<url>app://index.html</url>
16+
<width>0</width>
17+
<max-width>3000</max-width>
18+
<min-width>0</min-width>
19+
<height>0</height>
20+
<max-height>3000</max-height>
21+
<min-height>0</min-height>
22+
<fullscreen>false</fullscreen>
23+
<resizable>false</resizable>
24+
<chrome scrollbars="true">false</chrome>
25+
<maximizable>true</maximizable>
26+
<minimizable>true</minimizable>
27+
<closeable>true</closeable>
28+
</window>
29+
</ti:app>

0 commit comments

Comments
 (0)