Permalink
Browse files

1.8

  • Loading branch information...
1 parent 3c7fede commit 667685864371bbc456f756fc8f8d55bc713c8049 tong committed Apr 28, 2012
Showing with 35 additions and 15 deletions.
  1. +5 −5 ext.hxml
  2. +1 −1 ext/manifest.json
  3. +4 −2 release
  4. +10 −1 src/chrome/xep/App.hx
  5. +12 −3 src/chrome/xep/XEPDescription.hx
  6. +3 −3 update_xep_list
View
@@ -8,9 +8,9 @@
chrome.xep.App
-D chrome
-D noEmbedJS
--D DEBUG
-#--no-traces
--resource xeps_description@xep
+#-D DEBUG
+--no-traces
+#-resource xeps_description@xep
--next
-cp src
@@ -22,5 +22,5 @@ chrome.xep.App
chrome.xep.Options
-D chrome
-D noEmbedJS
--D DEBUG
-#--no-traces
+#-D DEBUG
+--no-traces
View
@@ -1,7 +1,7 @@
{
"name": "XEP Search",
"description": "XMPP/XEP omnibox search",
- "version": "1.7",
+ "version": "1.8",
"icons": {
"16": "img/icon_16.png",
"32": "img/icon_32.png",
View
@@ -1,8 +1,10 @@
#!/bin/bash
echo '*** Compressing javascript ...'
-java -jar /home/t0ng/data/bin/yuicompressor.jar ext/js/app.js -o ext/app.js
-java -jar /home/t0ng/data/bin/yuicompressor.jar ext/js/options.js -o ext/options.js
+#java -jar /home/t0ng/data/bin/yuicompressor.jar ext/js/app.js -o ext/app.js
+#java -jar /home/t0ng/data/bin/yuicompressor.jar ext/js/options.js -o ext/options.js
+yui ext/js/app.js ext/js/app.js
+yui ext/js/options.js ext/js/options.js
echo Done.
echo '*** Creating zip ...'
View
@@ -31,6 +31,14 @@ class App implements IApp {
Storage.setObject( "xep_status_filters", xepStatusFilters );
}
+ xeps = XEPS_DESC.list;
+ for( xep in xeps ) {
+ xep.abstract = jabber.util.Base64.decode( xep.abstract );
+ }
+ trace( xeps.length+" XEP descriptions loaded" );
+ run();
+
+ /*
xeps = new Array();
var r = haxe.Resource.getString( "xep" );
for( d in r.split("\n") )
@@ -42,6 +50,7 @@ class App implements IApp {
trace( xeps.length+" XEP descriptions loaded" );
//UI.desktopNotification( "", "XEP descriptions updated", 3000 );
run();
+ */
/*
var xeps_description = LocalStorage.getItem( "xeps_description" );
@@ -254,7 +263,7 @@ class App implements IApp {
}
static function nav( url : String ) {
- chrome.Tabs.getCurrent( function(tab) { chrome.Tabs.update( tab.id, { url: url } ); });
+ chrome.Tabs.update( null, { url : url } ); // update current tab
}
static function setDefaultSuggestion( text : String = " " ) {
@@ -10,7 +10,9 @@ using StringTools;
*/
class XEPDescription {
- public static inline var FILE = "xep_description";
+ //public static inline var FILE = "xep_description";
+ public static inline var FILE = "XEPS_DESC.hx";
+
public static inline var MAX_ABSTRACT_LEN = 256;
public static function getXEPStatus( s : String ) : Int {
@@ -130,12 +132,19 @@ class XEPDescription {
xeps.sort( function(a,b){ return ( a.number > b.number ) ? 1 : -1; } );
var fo = File.write( FILE );
+ fo.writeString( 'class XEPS_DESC {\n' );
+ fo.writeString( '\tpublic static inline var list = [\n' );
+
for( i in 0...xeps.length ) {
var xep = xeps[i];
//fo.writeString( '{ "number":"'+xep.number+'","title":"'+xep.title+'","name":"'+xep.name+'","status":"'+Type.enumConstructor(xep.status)+'","abstract":"'+xep.abstract+'"}' );
- fo.writeString( '{ "number":"'+xep.number+'","title":"'+xep.title+'","name":"'+xep.name+'","status":"'+xep.status+'","abstract":"'+xep.abstract+'"}' );
- if( i != xeps.length-1 ) fo.writeString( '\n' );
+ fo.writeString( '\t\t{ number:'+xep.number+',title:"'+xep.title+'",name:"'+xep.name+'",status:'+xep.status+',abstract:"'+xep.abstract+'"}' );
+ //if( i != xeps.length-1 ) fo.writeString( '\n' );
+ if( i != xeps.length-1 ) fo.writeString( ',' );
+ fo.writeString( '\n' );
}
+ fo.writeString( '\t];\n' );
+ fo.writeString( '}\n' );
fo.flush();
fo.close();
View
@@ -17,8 +17,8 @@ fi
tar xvfz data/master
mv xmpp-xmpp/extensions/xep-0* data/xeps
-rm -r data/xmpp-xmpp
-rm -r data/xep
-rm data/master
+#rm -r data/xmpp-xmpp
+#rm -r data/xep
+#rm data/master
echo Done

0 comments on commit 6676858

Please sign in to comment.