diff options
author | Alexander Batischev <eual.jp@gmail.com> | 2021-05-17 14:49:52 +0300 |
---|---|---|
committer | Alexander Batischev <eual.jp@gmail.com> | 2021-05-17 15:23:15 +0300 |
commit | aff3f9bb87bd2b757a45af262b1c603b6562894c (patch) | |
tree | 77fa982bb0d7fa74c7192ef28de59d8d5f2f9c2f | |
parent | d39a0230252992beb93f212560d8d7b7fe17ebc2 (diff) |
Switch FileBrowserFormAction's storage to Utf8String
-rw-r--r-- | include/filebrowserformaction.h | 5 | ||||
-rw-r--r-- | src/filebrowserformaction.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/filebrowserformaction.h b/include/filebrowserformaction.h index 9b5d18fb..a62b93a1 100644 --- a/include/filebrowserformaction.h +++ b/include/filebrowserformaction.h @@ -9,6 +9,7 @@ #include "formaction.h" #include "listformatter.h" #include "listwidget.h" +#include "utf8string.h" namespace newsboat { @@ -22,7 +23,7 @@ public: void set_default_filename(const std::string& fn) { - default_filename = fn; + default_filename = Utf8String::from_utf8(fn); } std::string id() const override @@ -45,7 +46,7 @@ private: std::string get_formatted_filename(std::string filename, mode_t mode); - std::string default_filename; + Utf8String default_filename; ListWidget files_list; }; diff --git a/src/filebrowserformaction.cpp b/src/filebrowserformaction.cpp index f74fd252..80d216e4 100644 --- a/src/filebrowserformaction.cpp +++ b/src/filebrowserformaction.cpp @@ -292,7 +292,7 @@ void FileBrowserFormAction::init() const int status = ::chdir(save_path.c_str()); LOG(Level::DEBUG, "view::filebrowser: chdir(%s) = %i", save_path, status); - set_value("filenametext", default_filename); + set_value("filenametext", default_filename.to_utf8()); // Set position to 0 and back to ensure that the text is visible draw_form(); |