File IvoRSS.hws changed (mode: 100755) (index ee41046..b94ff01) |
4 |
4 |
@APPCOPYRIGHT "© 2022, Aleksei Gerasimov" |
@APPCOPYRIGHT "© 2022, Aleksei Gerasimov" |
5 |
5 |
@APPAUTHOR "Aleksei Gerasimov" |
@APPAUTHOR "Aleksei Gerasimov" |
6 |
6 |
@APPDESCRIPTION "Simple RSS reader" |
@APPDESCRIPTION "Simple RSS reader" |
|
7 |
|
@APPIDENTIFIER "ivorss" |
7 |
8 |
@REQUIRE "muiroyale", {Version=1, Revision=7} |
@REQUIRE "muiroyale", {Version=1, Revision=7} |
8 |
9 |
@REQUIRE "hurl" |
@REQUIRE "hurl" |
9 |
10 |
@REQUIRE "xmlparser" |
@REQUIRE "xmlparser" |
|
11 |
12 |
|
|
12 |
13 |
@FILE 1, "AppWindow.xml" |
@FILE 1, "AppWindow.xml" |
13 |
14 |
|
|
|
15 |
|
@INCLUDE "feedtree.hws" |
|
16 |
|
|
|
17 |
|
|
14 |
18 |
|
|
15 |
19 |
/* |
/* |
16 |
20 |
** Handles all incoming events |
** Handles all incoming events |
|
... |
... |
p:Close() |
128 |
132 |
|
|
129 |
133 |
|
|
130 |
134 |
|
|
131 |
|
|
|
132 |
135 |
|
|
|
136 |
|
p_FillListTree("feedtree", dFeeds) ; dFeeds is imported from feedtree.hws |
|
137 |
|
|
|
138 |
|
|
|
139 |
|
p_DumpListTree("feedtree", "root", 0) |
|
140 |
|
|
|
141 |
|
|
|
142 |
|
;sum$ = MD5Str(s$) |
|
143 |
|
|
|
144 |
|
;OpenURL(url$) |
|
145 |
|
|
|
146 |
|
;t = CreateList() |
|
147 |
|
|
|
148 |
|
; prf = {lastfile$ = "test.txt", lastxpos = 100, lastypos = 200} |
|
149 |
|
; SavePrefs(prf) |
|
150 |
|
|
|
151 |
|
;prf = {lastfile$ = "Unnamed", lastxpos = 0, lastypos = 0} |
|
152 |
|
; LoadPrefs(prf) |
|
153 |
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
|
;Print(GetCatalogString(4, "default string")) |
133 |
157 |
|
|
134 |
158 |
Repeat |
Repeat |
135 |
159 |
WaitEvent |
WaitEvent |
File feedtree.hws added (mode: 100755) (index 0000000..16bcef5) |
|
1 |
|
|
|
2 |
|
dFeeds = CreateList() ;defaultFeeds |
|
3 |
|
InsertItem(dFeeds, {id="PowerPC" , name="PowerPC", isNode=True, parent="Root"}) |
|
4 |
|
InsertItem(dFeeds, { |
|
5 |
|
id="https://www.powerpc-notebook.org/en/feed/", |
|
6 |
|
name="GNU/Linux Open Hardware PowerPC notebook Feed", |
|
7 |
|
isNode=False, parent="PowerPC"}) |
|
8 |
|
InsertItem(dFeeds, { |
|
9 |
|
id="https://www.powerpc-notebook.org/en/comments/feed/", |
|
10 |
|
name="GNU/Linux Open Hardware PowerPC notebook Comments Feed", |
|
11 |
|
isNode=False, parent="PowerPC"}) |
|
12 |
|
|
|
13 |
|
;<link rel="alternate" type="application/rss+xml" title="GNU/Linux Open Hardware PowerPC notebook » Feed" href="https://www.powerpc-notebook.org/en/feed/" /> |
|
14 |
|
;<link rel="alternate" type="application/rss+xml" title="GNU/Linux Open Hardware PowerPC notebook » Comments Feed" href="https://www.powerpc-notebook.org/en/comments/feed/" /> |
|
15 |
|
|
|
16 |
|
|
|
17 |
|
InsertItem(dFeeds, {id="Amiga" , name="Amiga", isNode=True, parent="Root"}) |
|
18 |
|
;InsertItem(dFeeds, {id="" , name="John Doe", isNode=True, parent="Root"}) |
|
19 |
|
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"}) |
|
20 |
|
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"}) |
|
21 |
|
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"}) |
|
22 |
|
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"}) |
|
23 |
|
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"}) |
|
24 |
|
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"}) |
|
25 |
|
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"}) |
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
;name, isNode, id, parent |
|
30 |
|
/* |
|
31 |
|
Function p_InsertNode(i, t, listtree$) |
|
32 |
|
Local flags$ = IIf(t.isNode, "List", "") |
|
33 |
|
DebugPrint(i, t.id) |
|
34 |
|
mui.DoMethod(listtree$, "Insert", t.name, t.id, t.parent, "Tail", flags$) |
|
35 |
|
EndFunction |
|
36 |
|
*/ |
|
37 |
|
|
|
38 |
|
|
|
39 |
|
Function p_FillListTree(listtree$, treetable) |
|
40 |
|
mui.Set(listtree$, "Quiet", True) |
|
41 |
|
;č ForEach začíná od 1 a teprve na konci se vrací k 0 |
|
42 |
|
;ForEach(treetable, p_InsertNode, listtree$) |
|
43 |
|
|
|
44 |
|
For _i, t In IPairs(treetable) |
|
45 |
|
mui.DoMethod(listtree$, "Insert", |
|
46 |
|
t.name, t.id, t.parent, "Tail", IIf(t.isNode, "List", "")) |
|
47 |
|
Next |
|
48 |
|
mui.Set(listtree$, "Quiet", False) |
|
49 |
|
EndFunction |
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
Function p_DumpListTree(id$, node, indent) |
|
56 |
|
Local found, t = mui.DoMethod(id$, "GetEntry", node, "Head", "") |
|
57 |
|
While found = True |
|
58 |
|
If indent > 0 |
|
59 |
|
DebugPrint(RepeatStr(" ", indent) .. |
|
60 |
|
IIf(t.Node = True, "+", "") .. t.name) |
|
61 |
|
Else |
|
62 |
|
DebugPrint(IIf(t.Node = True, "+", "") .. t.name) |
|
63 |
|
EndIf |
|
64 |
|
If t.Node = True Then p_DumpListTree(id$, t.muiid, indent + 4) |
|
65 |
|
found, t = mui.DoMethod(id$, "GetEntry", t.muiid, "Next", "") |
|
66 |
|
Wend |
|
67 |
|
EndFunction |
|
68 |
|
|
|
69 |
|
|