@@ -63,6 +63,7 @@ HudClientQuery *hud_client_query_new(const gchar *query)
63DeeModel *hud_client_query_get_results_model(HudClientQuery *cquery)
63DeeModel *hud_client_query_get_results_model(HudClientQuery *cquery)
65 Q_ASSERT(cquery == HudClientStub::m_query);
65 Q_ASSERT(cquery == HudClientStub::m_query);
66 if (!resultsModel) {
67 if (!resultsModel) {
67 resultsModel = dee_sequence_model_new();
68 resultsModel = dee_sequence_model_new();
68 dee_model_set_schema_full(resultsModel, results_model_schema, G_N_ELEMENTS(results_model_schema));
69 dee_model_set_schema_full(resultsModel, results_model_schema, G_N_ELEMENTS(results_model_schema));
@@ -113,18 +114,21 @@ void hud_client_query_execute_toolbar_item(HudClientQuery *cquery, HudClientQuer
114 Q_ASSERT(cquery == HudClientStub::m_query);
115 Q_ASSERT(cquery == HudClientStub::m_query);
115 Q_UNUSED(timestamp);
116 Q_UNUSED(timestamp);
116 HudClientStub::m_lastExecutedToolbarItem = item;
118 HudClientStub::m_lastExecutedToolbarItem = item;
119void hud_client_query_set_query(HudClientQuery *cquery, const char *query)
121void hud_client_query_set_query(HudClientQuery *cquery, const char *query)
121 Q_ASSERT(cquery == HudClientStub::m_query);
123 Q_ASSERT(cquery == HudClientStub::m_query);
122 HudClientStub::m_lastSetQuery = QString::fromUtf8(query);
125 HudClientStub::m_lastSetQuery = QString::fromUtf8(query);
125void hud_client_query_execute_command(HudClientQuery *cquery, GVariant *command_key, guint timestamp)
128void hud_client_query_execute_command(HudClientQuery *cquery, GVariant *command_key, guint timestamp)
127 Q_ASSERT(cquery == HudClientStub::m_query);
130 Q_ASSERT(cquery == HudClientStub::m_query);
128 Q_UNUSED(timestamp);
132 Q_UNUSED(timestamp);
129 for (uint i = 0; i < dee_model_get_n_rows(resultsModel); ++i) {
133 for (uint i = 0; i < dee_model_get_n_rows(resultsModel); ++i) {
130 DeeModelIter *iter = dee_model_get_iter_at_row(resultsModel, i);
134 DeeModelIter *iter = dee_model_get_iter_at_row(resultsModel, i);
@@ -144,6 +148,7 @@ void hud_client_query_execute_command(HudClientQuery *cquery, GVariant *command_
144HudClientParam *hud_client_query_execute_param_command(HudClientQuery *cquery, GVariant *command_key, guint timestamp)
148HudClientParam *hud_client_query_execute_param_command(HudClientQuery *cquery, GVariant *command_key, guint timestamp)
146 Q_ASSERT(cquery == HudClientStub::m_query);
150 Q_ASSERT(cquery == HudClientStub::m_query);
147 Q_UNUSED(timestamp);
152 Q_UNUSED(timestamp);
148 for (uint i = 0; i < dee_model_get_n_rows(resultsModel); ++i) {
153 for (uint i = 0; i < dee_model_get_n_rows(resultsModel); ++i) {
149 DeeModelIter *iter = dee_model_get_iter_at_row(resultsModel, i);
154 DeeModelIter *iter = dee_model_get_iter_at_row(resultsModel, i);
@@ -165,12 +170,14 @@ HudClientParam *hud_client_query_execute_param_command(HudClientQuery *cquery, G
165void hud_client_query_voice_query(HudClientQuery *cquery)
170void hud_client_query_voice_query(HudClientQuery *cquery)
167 Q_ASSERT(cquery == HudClientStub::m_query);
172 Q_ASSERT(cquery == HudClientStub::m_query);
168 // TODO We are not testing voice queries yet
174 // TODO We are not testing voice queries yet
171gboolean hud_client_query_toolbar_item_active(HudClientQuery *cquery, HudClientQueryToolbarItems item)
177gboolean hud_client_query_toolbar_item_active(HudClientQuery *cquery, HudClientQueryToolbarItems item)
173 Q_ASSERT(cquery == HudClientStub::m_query);
179 Q_ASSERT(cquery == HudClientStub::m_query);
174 if (item == HUD_CLIENT_QUERY_TOOLBAR_HELP)
181 if (item == HUD_CLIENT_QUERY_TOOLBAR_HELP)
175 return HudClientStub::m_helpToolbarItemEnabled;
182 return HudClientStub::m_helpToolbarItemEnabled;
@@ -218,7 +225,7 @@ GActionGroup *hud_client_param_get_actions(HudClientParam *param)
218 if (!parametrizedActionGroup) {
225 if (!parametrizedActionGroup) {
219 GSimpleActionGroup *actionGroup = g_simple_action_group_new();
226 GSimpleActionGroup *actionGroup = g_simple_action_group_new();
220 GSimpleAction *action = g_simple_action_new("costAction", G_VARIANT_TYPE_DOUBLE);
227 GSimpleAction *action = g_simple_action_new("costAction", G_VARIANT_TYPE_DOUBLE);
221− g_simple_action_group_insert(actionGroup, G_ACTION(action));
228+ g_action_map_add_action(G_ACTION_MAP(actionGroup), G_ACTION(action));
223 g_signal_connect (action, "activate", G_CALLBACK (on_signal_activated), nullptr);
230 g_signal_connect (action, "activate", G_CALLBACK (on_signal_activated), nullptr);