tray
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
|
||||
#include "rktwebview_qt.h"
|
||||
|
||||
#ifdef DEBUG_RKT_WEBVIEW
|
||||
#define WAIT_TIME (300 * 1000)
|
||||
#else
|
||||
#define WAIT_TIME (10 * 1000)
|
||||
#endif
|
||||
|
||||
static void free_data(rkt_data_t *d)
|
||||
{
|
||||
do_free_data(d);
|
||||
@@ -163,7 +169,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
void Handler::run()
|
||||
{
|
||||
int wait_ms = 10 * 1000; // 10 seconds.
|
||||
int wait_ms = WAIT_TIME; // 10 seconds.
|
||||
while (!quit) {
|
||||
int cmd;
|
||||
std::string data;
|
||||
@@ -350,7 +356,7 @@ void Handler::run()
|
||||
}
|
||||
break;
|
||||
case CMD_TRAY_SET_ICON: {
|
||||
int tray = data_obj["tray"].toInt();
|
||||
int tray = data_obj["wv"].toInt();
|
||||
QString icon_file = data_obj["icon"].toString();
|
||||
|
||||
result_t r = webview_handler->rktTraySetIcon(tray,
|
||||
@@ -359,7 +365,7 @@ void Handler::run()
|
||||
}
|
||||
break;
|
||||
case CMD_TRAY_SET_TOOLTIP: {
|
||||
int tray = data_obj["tray"].toInt();
|
||||
int tray = data_obj["wv"].toInt();
|
||||
QString tooltip = data_obj["tooltip"].toString();
|
||||
|
||||
result_t r = webview_handler->rktTraySetTooltip(tray,
|
||||
@@ -368,7 +374,7 @@ void Handler::run()
|
||||
}
|
||||
break;
|
||||
case CMD_TRAY_SHOW_MESSAGE: {
|
||||
int tray = data_obj["tray"].toInt();
|
||||
int tray = data_obj["wv"].toInt();
|
||||
QString title = data_obj["title"].toString();
|
||||
QString message = data_obj["message"].toString();
|
||||
|
||||
@@ -379,7 +385,7 @@ void Handler::run()
|
||||
}
|
||||
break;
|
||||
case CMD_TRAY_SET_MENU: {
|
||||
int tray = data_obj["tray"].toInt();
|
||||
int tray = data_obj["wv"].toInt();
|
||||
QString menu_json = data_obj["menu_json"].toString();
|
||||
|
||||
result_t r = webview_handler->rktTraySetMenu(tray,
|
||||
@@ -455,7 +461,7 @@ void Handler::run()
|
||||
|
||||
void Alive::run()
|
||||
{
|
||||
int wait_ms = 10 * 1000;
|
||||
int wait_ms = WAIT_TIME;
|
||||
int ping_no;
|
||||
std::string data;
|
||||
bool go_on = true;
|
||||
|
||||
Reference in New Issue
Block a user