summaryrefslogtreecommitdiff
path: root/apps/plugins/open_plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/open_plugins.c')
-rw-r--r--apps/plugins/open_plugins.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/apps/plugins/open_plugins.c b/apps/plugins/open_plugins.c
index 6deaf80f7d..9a2fa3593f 100644
--- a/apps/plugins/open_plugins.c
+++ b/apps/plugins/open_plugins.c
@@ -189,17 +189,20 @@ static void op_entry_set_name(void)
189static int op_entry_set_path(void) 189static int op_entry_set_path(void)
190{ 190{
191 int ret = 0; 191 int ret = 0;
192 struct browse_context browse;
193 char tmp_buf[OPEN_PLUGIN_BUFSZ+1]; 192 char tmp_buf[OPEN_PLUGIN_BUFSZ+1];
194 193
195 if (op_entry.path[0] == '\0') 194 if (op_entry.path[0] == '\0')
196 rb->strcpy(op_entry.path, PLUGIN_DIR"/"); 195 rb->strcpy(op_entry.path, PLUGIN_DIR"/");
197 196
198 rb->browse_context_init(&browse, SHOW_ALL, BROWSE_SELECTONLY, rb->str(LANG_ADD), 197 struct browse_context browse = {
199 Icon_Plugin, op_entry.path, NULL); 198 .dirfilter = SHOW_ALL,
200 199 .flags = BROWSE_SELECTONLY,
201 browse.buf = tmp_buf; 200 .title = rb->str(LANG_ADD),
202 browse.bufsize = OPEN_PLUGIN_BUFSZ; 201 .icon = Icon_Plugin,
202 .root = op_entry.path,
203 .buf = tmp_buf,
204 .bufsize = sizeof(tmp_buf),
205 };
203 206
204 if (rb->rockbox_browse(&browse) == GO_TO_PREVIOUS) 207 if (rb->rockbox_browse(&browse) == GO_TO_PREVIOUS)
205 { 208 {
@@ -213,7 +216,6 @@ static int op_entry_set_path(void)
213static int op_entry_set_param_path(void) 216static int op_entry_set_param_path(void)
214{ 217{
215 int ret = 0; 218 int ret = 0;
216 struct browse_context browse;
217 char tmp_buf[OPEN_PLUGIN_BUFSZ+1]; 219 char tmp_buf[OPEN_PLUGIN_BUFSZ+1];
218 220
219 if (op_entry.param[0] == '\0') 221 if (op_entry.param[0] == '\0')
@@ -221,11 +223,15 @@ static int op_entry_set_param_path(void)
221 else 223 else
222 rb->strcpy(tmp_buf, op_entry.param); 224 rb->strcpy(tmp_buf, op_entry.param);
223 225
224 rb->browse_context_init(&browse, SHOW_ALL, BROWSE_SELECTONLY, "", 226 struct browse_context browse = {
225 Icon_Plugin, tmp_buf, NULL); 227 .dirfilter = SHOW_ALL,
226 228 .flags = BROWSE_SELECTONLY,
227 browse.buf = tmp_buf; 229 .title = rb->str(LANG_PARAMETER),
228 browse.bufsize = OPEN_PLUGIN_BUFSZ; 230 .icon = Icon_Plugin,
231 .root = tmp_buf,
232 .buf = tmp_buf,
233 .bufsize = sizeof(tmp_buf),
234 };
229 235
230 if (rb->rockbox_browse(&browse) == GO_TO_PREVIOUS) 236 if (rb->rockbox_browse(&browse) == GO_TO_PREVIOUS)
231 { 237 {