user_interface: make get_translator() and get_translator_name() static

This commit is contained in:
Syping 2026-04-20 15:15:16 +02:00
parent 823a60d64d
commit 4b1d0a6ff8
2 changed files with 3 additions and 3 deletions

View file

@ -121,7 +121,7 @@ user_interface::user_interface()
set_child(*vertical_box); set_child(*vertical_box);
} }
std::vector<Glib::ustring> user_interface::get_translator() { const std::vector<Glib::ustring> user_interface::get_translator() {
return {"Stub", "DeepL", "Mozhi", "LibreTranslate", "Lingva Translate"}; return {"Stub", "DeepL", "Mozhi", "LibreTranslate", "Lingva Translate"};
} }

View file

@ -31,8 +31,8 @@ namespace bot {
class user_interface : public Gtk::Window { class user_interface : public Gtk::Window {
public: public:
explicit user_interface(); explicit user_interface();
std::vector<Glib::ustring> get_translator(); static const std::vector<Glib::ustring> get_translator();
const char* get_translator_name(guint translator_id); static const char* get_translator_name(guint translator_id);
void log_append(const std::string &message, const std::string &type = "Log", bool is_error = false); void log_append(const std::string &message, const std::string &type = "Log", bool is_error = false);
void log_scroll_down(); void log_scroll_down();
void run(); void run();