File IvoRSS.hws changed (mode: 100755) (index 4c0cfe6..959cdd4) |
21 |
21 |
@BRUSH 1, "128px-Feed-icon.png", {LoadAlpha=True, ScaleHeight=32, ScaleWidth=32} |
@BRUSH 1, "128px-Feed-icon.png", {LoadAlpha=True, ScaleHeight=32, ScaleWidth=32} |
22 |
22 |
ChannelIconBrush = 1 |
ChannelIconBrush = 1 |
23 |
23 |
|
|
24 |
|
PleaseStop = False |
|
|
24 |
|
PleaseStop = True |
25 |
25 |
|
|
26 |
26 |
|
|
27 |
27 |
|
|
|
... |
... |
Function p_MUIEvent(msg) |
79 |
79 |
Case "fdtm_expand": |
Case "fdtm_expand": |
80 |
80 |
p_ExpandFeeds() |
p_ExpandFeeds() |
81 |
81 |
|
|
|
82 |
|
Case "menu_fetchall": |
|
83 |
|
FallThrough |
|
84 |
|
Case "fdtm_fetchall": |
|
85 |
|
p_FetchAll() |
|
86 |
|
|
|
87 |
|
Case "fdtm_fetch": |
|
88 |
|
p_FetchCurrent() |
|
89 |
|
|
|
90 |
|
|
82 |
91 |
|
|
83 |
92 |
EndSwitch |
EndSwitch |
84 |
93 |
Case "Listview": |
Case "Listview": |
|
... |
... |
Function p_MUIEvent(msg) |
87 |
96 |
Local chosen_item = items_list[msg.TriggerValue] |
Local chosen_item = items_list[msg.TriggerValue] |
88 |
97 |
mui.Set("item_title", "Contents", chosen_item.title) |
mui.Set("item_title", "Contents", chosen_item.title) |
89 |
98 |
mui.Set("textfield", "Text", chosen_item.description) |
mui.Set("textfield", "Text", chosen_item.description) |
90 |
|
;Switch msg.ID |
|
91 |
|
;Case "CloseRequest": |
|
92 |
|
; End |
|
93 |
|
;EndSwitch |
|
|
99 |
|
|
|
100 |
|
Case "Button": |
|
101 |
|
Switch msg.ID |
|
102 |
|
Case "fetchbtn": |
|
103 |
|
p_FetchCurrent() |
|
104 |
|
Case "fetchallbtn": |
|
105 |
|
p_FetchAll() |
|
106 |
|
Case "stopbtn": |
|
107 |
|
p_Unlock() |
|
108 |
|
|
|
109 |
|
EndSwitch |
94 |
110 |
EndSwitch |
EndSwitch |
95 |
111 |
EndFunction |
EndFunction |
96 |
112 |
|
|
|
... |
... |
EndFunction |
147 |
163 |
|
|
148 |
164 |
Function p_Replay(err_code, msg$) |
Function p_Replay(err_code, msg$) |
149 |
165 |
mui.Set("status", "Contents", |
mui.Set("status", "Contents", |
150 |
|
IIf(err_code = #ERR_NONE, msg$, "\27b" .. GetErrorName(err_code)) |
|
151 |
|
) |
|
|
166 |
|
IIf(err_code = #ERR_NONE, msg$, "\27b" .. GetErrorName(err_code))) |
152 |
167 |
EndFunction |
EndFunction |
153 |
168 |
|
|
154 |
169 |
|
|
File feedtree.hws changed (mode: 100755) (index 974ac45..672f3db) |
... |
... |
Function p_FillListTree(listtree$, treetable) |
9 |
9 |
|
|
10 |
10 |
For _i, t In IPairs(treetable) |
For _i, t In IPairs(treetable) |
11 |
11 |
mui.DoMethod(listtree$, "Insert", |
mui.DoMethod(listtree$, "Insert", |
12 |
|
t.name, t.id, t.parent, "Tail", IIf(t.isNode, "List", "")) |
|
|
12 |
|
t.name, t.id, t.parent, "Tail", IIf(t.isNode, "List", "")) |
|
13 |
|
;č pro jednotlivé položky nelze zadat kontextové menu |
|
14 |
|
;mui.Set(t.id, "ContextMenu ", "channeltitlemenu") |
13 |
15 |
Next |
Next |
14 |
16 |
mui.Set(listtree$, "Quiet", False) |
mui.Set(listtree$, "Quiet", False) |
15 |
17 |
EndFunction |
EndFunction |
|
... |
... |
Function p_DumpListTree(listtree$, tabletree, nodeid, muiid) |
33 |
35 |
EndFunction |
EndFunction |
34 |
36 |
|
|
35 |
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
Function p_FetchAll() |
|
41 |
|
p_Lock() |
|
42 |
|
p_FetchGroup("Root") |
|
43 |
|
p_Unlock() |
|
44 |
|
EndFunction |
|
45 |
|
|
|
46 |
|
;č zjistit co je Node zač, |
|
47 |
|
;č podle toho postupovat |
|
48 |
|
Function p_FetchCurrent() |
|
49 |
|
p_Lock() |
|
50 |
|
Local isFound, t = mui.DoMethod(#LIST_TREE, "GetEntry", "Active", "Active", "") |
|
51 |
|
If isFound And Not PleaseStop |
|
52 |
|
If t.Node |
|
53 |
|
p_FetchGroup(t.muiid) |
|
54 |
|
Else |
|
55 |
|
p_FetchFeed(t.id) |
|
56 |
|
EndIf |
|
57 |
|
EndIf |
|
58 |
|
p_Unlock() |
|
59 |
|
EndFunction |
|
60 |
|
|
|
61 |
|
|
|
62 |
|
;č zjistit co je Node zač, |
|
63 |
|
;č podle toho postupovat |
|
64 |
|
;č musí být rekurzivní |
|
65 |
|
Function p_FetchGroup(muiid$) |
|
66 |
|
Local isFound, t = mui.DoMethod(#LIST_TREE, "GetEntry", muiid$, "Head", "") |
|
67 |
|
While isFound And Not PleaseStop |
|
68 |
|
If t.Node |
|
69 |
|
p_FetchGroup(t.muiid) |
|
70 |
|
Else |
|
71 |
|
p_FetchFeed(t.id) |
|
72 |
|
EndIf |
|
73 |
|
isFound, t = mui.DoMethod(#LIST_TREE, "GetEntry", t.muiid, "Next", "") |
|
74 |
|
Wend |
|
75 |
|
EndFunction |
|
76 |
|
|
|
77 |
|
|
36 |
78 |
;č stáhnout soubor, spočítat hešy, |
;č stáhnout soubor, spočítat hešy, |
37 |
79 |
;č označit buď jako nové, nebo jako přečtené |
;č označit buď jako nové, nebo jako přečtené |
38 |
80 |
;č smí se posílat JENOM fidy, nikoliv skupiny |
;č smí se posílat JENOM fidy, nikoliv skupiny |
39 |
|
Function p_FetchFeed(feedid$, feedsdata) |
|
|
81 |
|
Function p_FetchFeed(feedid$) |
40 |
82 |
If HaveItem(feedsdata, feedid$) |
If HaveItem(feedsdata, feedid$) |
41 |
83 |
;č Pokud záznam existuje, MUSÍ mít MD5Sum a Name atributy |
;č Pokud záznam existuje, MUSÍ mít MD5Sum a Name atributy |
42 |
84 |
Local t = feedsdata[feedid$] |
Local t = feedsdata[feedid$] |
43 |
|
current_item.category = str$ |
|
|
85 |
|
If err_code = #ERR_NONE |
|
86 |
|
mui.DoMethod(#LIST_TREE, "Rename", feedid$, "\27".."5\27b" .. feedid$) |
|
87 |
|
Else |
|
88 |
|
mui.DoMethod(#LIST_TREE, "Rename", feedid$, "\27i" .. feedid$) |
|
89 |
|
EndIf |
44 |
90 |
Else |
Else |
45 |
|
p_Download(feedid$, "Feeds/" .. p_GetFileID(feedid$) .. ".xml") |
|
|
91 |
|
Local err_code = p_Download(feedid$, |
|
92 |
|
"Feeds/"..p_GetFileID(feedid$)..".xml") |
|
93 |
|
;č zde je to jednoduchý, stahování je bud úspěšné, nebo neúspěšné |
|
94 |
|
mui.DoMethod(#LIST_TREE, "Rename", feedid$, |
|
95 |
|
IIf(err_code = #ERR_NONE, "\27".."5\27b", "\27i") .. feedid$) |
|
96 |
|
|
46 |
97 |
EndIf |
EndIf |
47 |
|
;p_DumpListTree(listtree$, cFeeds, "Root", "Root") |
|
48 |
|
;Return(cFeeds) |
|
49 |
|
;mui.DoMethod(#LIST_TREE, "Rename", treenode$, newname$) |
|
50 |
|
;CheckEvents() |
|
51 |
98 |
EndFunction |
EndFunction |
52 |
99 |
|
|
53 |
100 |
|
|