File IvoRSS.hws changed (mode: 100755) (index 12ff258..d3996f6) |
15 |
15 |
@INCLUDE "feedtree.hws" |
@INCLUDE "feedtree.hws" |
16 |
16 |
|
|
17 |
17 |
@BRUSH 1, "128px-Feed-icon.png", {LoadAlpha=True, ScaleHeight=32, ScaleWidth=32} |
@BRUSH 1, "128px-Feed-icon.png", {LoadAlpha=True, ScaleHeight=32, ScaleWidth=32} |
|
18 |
|
ChannelIconBrush = 1 |
|
19 |
|
|
18 |
20 |
;Width=#KEEPASPRAT |
;Width=#KEEPASPRAT |
19 |
21 |
/* |
/* |
20 |
22 |
** Handles all incoming events |
** Handles all incoming events |
|
... |
... |
Function p_MUIEvent(msg) |
41 |
43 |
End |
End |
42 |
44 |
Case "menu_muisettings": |
Case "menu_muisettings": |
43 |
45 |
mui.DoMethod("app", "OpenConfigWindow") |
mui.DoMethod("app", "OpenConfigWindow") |
|
46 |
|
Case "rssi_copy": |
|
47 |
|
p_CopyIcon() |
|
48 |
|
Case "rsst_copy": |
|
49 |
|
p_CopyContents("channel_title", "Channel title") |
|
50 |
|
Case "rssd_copy": |
|
51 |
|
p_CopyContents("channel_description", "Channel description") |
|
52 |
|
Case "artt_copy": |
|
53 |
|
p_CopyContents("item_title", "Title") |
|
54 |
|
Case "art_copy": |
|
55 |
|
p_CopyText() |
44 |
56 |
EndSwitch |
EndSwitch |
45 |
57 |
Case "Listview": |
Case "Listview": |
46 |
58 |
;assert(msg.Attribute = "Active") |
;assert(msg.Attribute = "Active") |
|
... |
... |
Function p_MUIEvent(msg) |
56 |
68 |
EndFunction |
EndFunction |
57 |
69 |
|
|
58 |
70 |
|
|
|
71 |
|
/* |
|
72 |
|
Function p_Replay(err_code, msg$) |
|
73 |
|
If err_code = #ERR_NONE |
|
74 |
|
mui.Set("status", "Contents", msg$) |
|
75 |
|
Else |
|
76 |
|
mui.Set("status", "Contents", "\27b" .. GetErrorName(err_code)) |
|
77 |
|
EndIf |
|
78 |
|
EndFunction |
|
79 |
|
*/ |
|
80 |
|
|
|
81 |
|
Function p_Replay(err_code, msg$) |
|
82 |
|
mui.Set("status", "Contents", |
|
83 |
|
IIf(err_code = #ERR_NONE, msg$, "\27b" .. GetErrorName(err_code)) |
|
84 |
|
) |
|
85 |
|
EndFunction |
59 |
86 |
|
|
60 |
87 |
|
|
|
88 |
|
Function p_CopyIcon() |
|
89 |
|
err_code = ?SetClipboard(#CLIPBOARD_IMAGE, ChannelIconBrush) |
|
90 |
|
p_Replay(err_code, "Icon is copied") |
|
91 |
|
EndFunction |
|
92 |
|
|
|
93 |
|
Function p_CopyContents(source_id$, source_desc$) |
|
94 |
|
err_code = ?SetClipboard(#CLIPBOARD_TEXT, mui.Get(source_id$, "Contents")) |
|
95 |
|
p_Replay(err_code, source_desc$ .. " is copied") |
|
96 |
|
EndFunction |
|
97 |
|
|
|
98 |
|
Function p_CopyText() |
|
99 |
|
err_code = ?SetClipboard(#CLIPBOARD_TEXT, mui.Get("textfield", "Text")) |
|
100 |
|
p_Replay(err_code, "Text is copied") |
|
101 |
|
EndFunction |
61 |
102 |
|
|
62 |
103 |
mui.CreateGUI(ReadString(1)) |
mui.CreateGUI(ReadString(1)) |
63 |
104 |
InstallEventHandler({MUIRoyale = p_MUIEvent}) |
InstallEventHandler({MUIRoyale = p_MUIEvent}) |
64 |
105 |
|
|
65 |
106 |
|
|
66 |
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
67 |
112 |
url$ = "https://www.powerpc-notebook.org/en/feed/" |
url$ = "https://www.powerpc-notebook.org/en/feed/" |
68 |
113 |
|
|
69 |
114 |
DownloadFile(url$, {File = "feed.xml", Adapter = "hurl"}) |
DownloadFile(url$, {File = "feed.xml", Adapter = "hurl"}) |