SocketApi: Add GET_STRINGS:BEGIN and END
authorJocelyn Turcotte <jturcotte@woboq.com>
Tue, 4 Jul 2017 14:45:48 +0000 (16:45 +0200)
committerChristian Kamm <mail@ckamm.de>
Fri, 7 Jul 2017 08:49:51 +0000 (10:49 +0200)
The Windows shell extension relied on the response of
SHARE_MENU_TITLE to advance its state machine, but in order
to use the new GET_STRINGS instead, we need to know when the
last string was received. Also add BEGIN for consistency.

src/gui/socketapi.cpp

index b43d77a4aaf1307a53d54b86b2f5bfe4a553bc9b..6fc4ea405c33a2eaff7368cefdbd65c5720ab67c 100644 (file)
@@ -532,9 +532,11 @@ void SocketApi::command_GET_STRINGS(const QString &, SocketListener *listener)
         { "COPY_PRIVATE_LINK_TITLE", tr("Copy private link to clipboard") },
         { "EMAIL_PRIVATE_LINK_TITLE", tr("Send private link by email...") },
     } };
+    listener->sendMessage(QString("GET_STRINGS:BEGIN"));
     for (auto key_value : strings) {
         listener->sendMessage(QString("STRING:%1:%2").arg(key_value.first, key_value.second));
     }
+    listener->sendMessage(QString("GET_STRINGS:END"));
 }
 
 QString SocketApi::buildRegisterPathMessage(const QString &path)