From 0558a5ec5a00e01e843f2f4fa54b22bf90cd1148 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Fri, 8 Jun 2012 00:53:45 +0800 Subject: [PATCH] reread current directory files after unplug from PC --- commands.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/commands.lua b/commands.lua index 4819af607..2b793092e 100644 --- a/commands.lua +++ b/commands.lua @@ -191,8 +191,8 @@ function Commands:new(obj) G_screen_saver_mode = false end ) - obj:add(KEY_CHARGING, nil, nil, - "", + obj:add(KEY_CHARGING, nil, "plugin/out usb", + "toggle usb drive mode", function() --os.execute("echo 'usb in' >> /mnt/us/event_test.txt") if G_charging_mode == false and G_screen_saver_mode == false then @@ -206,8 +206,8 @@ function Commands:new(obj) G_charging_mode = true end ) - obj:add(KEY_NOT_CHARGING, nil, nil, - "", + obj:add(KEY_NOT_CHARGING, nil, "plugin/out usb", + "toggle usb drive mode", function() --os.execute("echo 'usb out' >> /mnt/us/event_test.txt") if G_charging_mode == true and G_screen_saver_mode == false then @@ -217,6 +217,8 @@ function Commands:new(obj) Screen:restoreFromSavedBB() fb:refresh(0) end + FileChooser:setPath(FileChooser.path) + FileChooser.pagedirty = true G_charging_mode = false end )