chatgui: add Status page in settings (NTP + connections status)
This commit is contained in:
1 parent
f0bb03c2cf
commit
960cde3eda
15 files changed
+651
-62
No files matched your search
@@ -32,6 +32,7 @@ static gui_my_node_id_fn g_my_node_id_cb = nullptr;
|
||||
static gui_auto_connect_status_fn g_auto_connect_status_cb = nullptr;
|
||||
static gui_channel_peers_online_fn g_channel_peers_online_cb = nullptr;
|
||||
static gui_db_ready_fn g_db_ready_cb = nullptr;
|
||||
static gui_status_refresh_fn g_status_refresh_cb = nullptr;
|
||||
static struct UASYNC* g_ua = nullptr;
|
||||
|
||||
/* ── GuiBridgeReceiver implementation ── */
|
||||
@@ -126,6 +127,9 @@ void GuiBridgeReceiver::processPost(int eventType, QByteArray data) {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "gui_bridge: DB_READY");
|
||||
if (g_db_ready_cb) g_db_ready_cb();
|
||||
break;
|
||||
case GUI_EVT_STATUS_REFRESH:
|
||||
if (g_status_refresh_cb) g_status_refresh_cb((const char*)d, dlen);
|
||||
break;
|
||||
default:
|
||||
DEBUG_WARN(DEBUG_CATEGORY_DEBUG, "gui_bridge: unknown event type %d", eventType);
|
||||
break;
|
||||
@@ -204,6 +208,10 @@ void gui_bridge_set_db_ready_cb(gui_db_ready_fn cb) {
|
||||
g_db_ready_cb = cb;
|
||||
}
|
||||
|
||||
void gui_bridge_set_status_refresh_cb(gui_status_refresh_fn cb) {
|
||||
g_status_refresh_cb = cb;
|
||||
}
|
||||
|
||||
} /* extern "C" */
|
||||
|
||||
#include "gui_bridge_impl.moc"
|
||||
Reference in new issue
Block a user