From ed2c65dc0ab5fd331e5e4cf81e737ece2f5f66b8 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Tue, 14 Jan 2020 10:07:12 +0800 Subject: [PATCH] format code --- demos/demo_file_browser.c | 2 +- src/ext_widgets/file_browser/file_browser_view.c | 2 +- src/ext_widgets/file_browser/file_browser_view.h | 2 +- src/ext_widgets/file_browser/file_chooser.c | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/demos/demo_file_browser.c b/demos/demo_file_browser.c index 304c0a40a..c8ad4d877 100644 --- a/demos/demo_file_browser.c +++ b/demos/demo_file_browser.c @@ -36,7 +36,7 @@ static ret_t tk_on_choose_file_result(file_chooser_t* chooser) { widget_set_text_utf8(filename, "aborted"); } else { widget_set_text_utf8(cwd, chooser->cwd.str); - if(chooser->filename.str) { + if (chooser->filename.str) { widget_set_text_utf8(filename, chooser->filename.str); } else { widget_set_text_utf8(filename, ""); diff --git a/src/ext_widgets/file_browser/file_browser_view.c b/src/ext_widgets/file_browser/file_browser_view.c index 541193f04..e3aa9152f 100644 --- a/src/ext_widgets/file_browser/file_browser_view.c +++ b/src/ext_widgets/file_browser/file_browser_view.c @@ -329,7 +329,7 @@ static ret_t file_browser_view_reload(widget_t* widget) { wstr_t* str = &(item_child->text); wstr_format_time(str, FB_DATE_TIME_FORMAT, info->ctime); } - + item_child = widget_lookup_by_type(item, WIDGET_TYPE_CHECK_BUTTON, TRUE); if (item_child != NULL) { widget_set_visible(item_child, file_browser_view->show_check_button, FALSE); diff --git a/src/ext_widgets/file_browser/file_browser_view.h b/src/ext_widgets/file_browser/file_browser_view.h index 63140b5da..bbba7b793 100644 --- a/src/ext_widgets/file_browser/file_browser_view.h +++ b/src/ext_widgets/file_browser/file_browser_view.h @@ -89,7 +89,7 @@ typedef struct _file_browser_view_t { * 是否为升序排序。 */ bool_t sort_ascending; - + /** * @property {bool_t} show_check_button * @annotation ["set_prop","get_prop","readable","persitent","design","scriptable"] diff --git a/src/ext_widgets/file_browser/file_chooser.c b/src/ext_widgets/file_browser/file_chooser.c index efae043e5..0717fec1f 100644 --- a/src/ext_widgets/file_browser/file_chooser.c +++ b/src/ext_widgets/file_browser/file_chooser.c @@ -91,8 +91,7 @@ ret_t file_chooser_choose(file_chooser_t* chooser) { widget_t* win = window_open(chooser->ui); widget_child_on(win, FILE_CHOOSER_OK, EVT_CLICK, file_choose_on_ok, chooser); - widget_child_on(win, FILE_CHOOSER_CANCEL, EVT_CLICK, - file_choose_on_click_to_close, chooser); + widget_child_on(win, FILE_CHOOSER_CANCEL, EVT_CLICK, file_choose_on_click_to_close, chooser); return RET_OK; }