Moving from MIDP2/CLDC1.1 to MIDP1/CLDC1.0. Added About windows.
--- a/Makefile Sun Jan 14 11:53:35 2007 +0100
+++ b/Makefile Sun Jan 14 18:27:47 2007 +0100
@@ -1,12 +1,12 @@
# PRJ
PRJ=horaris
VENDOR=viric
-VERSION=0.1
+VERSION=0.7
# RTE
WTK2?=/opt/wtk2.2
EMULATOR=${WTK2}/bin/emulator
-CLASSPATH=${WTK2}/lib/midpapi20.jar:${WTK2}/lib/cldcapi11.jar:${PRJ}.jar:.
+CLASSPATH=${WTK2}/lib/midpapi10.jar:${WTK2}/lib/cldcapi10.jar:${PRJ}.jar:.
#CLASSPATH=${WTK2}/lib/midpapi.zip:mojab.jar:./src/:.
SRCDIRS=${PRJ} ogdl
PKGADDONS=icons data
--- a/src/META-INF/MANIFEST.MF Sun Jan 14 11:53:35 2007 +0100
+++ b/src/META-INF/MANIFEST.MF Sun Jan 14 18:27:47 2007 +0100
@@ -1,6 +1,6 @@
MIDlet-1: horaris, , horaris.Main
MIDlet-Name: Horaris
MIDlet-Vendor: viric
-MIDlet-Version: 0.1
-MicroEdition-Configuration: CLDC-1.1
+MIDlet-Version: 0.7
+MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
--- a/src/data/list.g Sun Jan 14 11:53:35 2007 +0100
+++ b/src/data/list.g Sun Jan 14 18:27:47 2007 +0100
@@ -1,3 +1,3 @@
teisa.g Teisa-Olot
fgc.g FGC-Sabadell
-bjoan.g Bus St.Joan
+bjoan.g "Bus St.Joan"
--- a/src/data/renfegi.g Sun Jan 14 11:53:35 2007 +0100
+++ b/src/data/renfegi.g Sun Jan 14 18:27:47 2007 +0100
@@ -36,7 +36,6 @@
7:54 "Passeig de Gràcia"
7:59 "Sants"
-# SENSE ACABAR
Comboi
Dies
Dl-Dv
@@ -47,6 +46,33 @@
Sentit
Girona-Barcelona
Hores
- 6:38 Girona
- 7:54 "Passeig de Gràcia"
- 7:59 "Sants"
+ 7:24 Girona
+ 8:38 "Passeig de Gràcia"
+ 8:44 "Sants"
+Comboi
+ Dies
+ Dl-Dv
+ Comentari
+ Catalunya
+ "No circula 24/06, 15/08, 12/10, 1/11, 6 i 8/12"
+ Sentit
+ Girona-Barcelona
+ Hores
+ 7:56 Girona
+ 9:08 "Passeig de Gràcia"
+ 9:13 "Sants"
+
+# SENSE ACABAR
+Comboi
+ Dies
+ Dl-Dv
+ Dissabte
+ Comentari
+ Catalunya
+ "No circula 12/10, 1/11, 6 i 8/12"
+ Sentit
+ Girona-Barcelona
+ Hores
+ 7:56 Girona
+ 9:08 "Passeig de Gràcia"
+ 9:13 "Sants"
--- a/src/horaris/HoraroTransporta.java Sun Jan 14 11:53:35 2007 +0100
+++ b/src/horaris/HoraroTransporta.java Sun Jan 14 18:27:47 2007 +0100
@@ -65,11 +65,11 @@
addSencoj(fsenco);
myform.append(fsenco);
- fkomenco = new ChoiceGroup("Origen", ChoiceGroup.POPUP);
+ fkomenco = new ChoiceGroup("Origen", ChoiceGroup.EXCLUSIVE);
addLokoj(fkomenco);
myform.append(fkomenco);
- ffino = new ChoiceGroup("Destí", ChoiceGroup.POPUP);
+ ffino = new ChoiceGroup("Destí", ChoiceGroup.EXCLUSIVE);
addLokoj(ffino);
myform.append(ffino);
@@ -172,14 +172,20 @@
/* Krei la informon aldonan */
gtmp = veturo.getNode("Comentari");
Vector comments = new Vector();
- for (int j = 0; j < gtmp.size(); j++)
+ if (gtmp != null)
{
- comments.addElement(gtmp.get(j).getName());
+ for (int j = 0; j < gtmp.size(); j++)
+ {
+ comments.addElement(gtmp.get(j).getName());
+ }
}
/* Trovita! */
addSortedTime(elirtempo, alventempo, comments);
}
+
+ /* Free memory */
+ tmpTempoj = null;
}
private Tempo str2Tempo(String s)
--- a/src/horaris/MainList.java Sun Jan 14 11:53:35 2007 +0100
+++ b/src/horaris/MainList.java Sun Jan 14 18:27:47 2007 +0100
@@ -2,6 +2,7 @@
import javax.microedition.lcdui.*;
import java.util.Hashtable;
+import java.util.Vector;
import ogdl.*;
@@ -10,6 +11,7 @@
private Graph list;
private List mylist;
private Command cmd_eliri;
+ private Command cmd_about;
private Main main;
private Hashtable table;
@@ -28,8 +30,10 @@
mylist.append(list.get(i).get(0).getName(), null);
cmd_eliri = new Command("Sortir", Command.BACK, 0);
+ cmd_about = new Command("Programa", Command.HELP, 0);
mylist.addCommand(cmd_eliri);
+ mylist.addCommand(cmd_about);
mylist.setCommandListener(this);
System.err.println("Setting screen");
main.display.setCurrent(mylist);
@@ -64,6 +68,13 @@
System.err.println("Loading file " + dosiero);
loadHoraro(dosiero);
+ } else if (c == cmd_about)
+ {
+ Vector str = new Vector();
+ str.addElement("Programa \"Horaris\"");
+ str.addElement("Llicència GPL 1.2");
+ str.addElement("Autor: Lluís Batlle i Rossell");
+ ShowText st = new ShowText(str, this);
}
}