- plugin for home applet 'Internet Search' - search in mDictionary - change Copyright...
[mdictionary] / src / gui / src / ws_gui_callbacks.c
index 6067568..8828432 100644 (file)
@@ -334,6 +334,30 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
 
         }
 }
+
+
+/* added by Dariusz Wiechecki - HISA */
+void ws_gui_search_home_handler(GError *error, GArray *word, gpointer user_data)
+{
+        g_debug("->%s", __FUNCTION__);
+        WSGuiApp *data = (WSGuiApp*) user_data;
+        osso_rpc_t* osso_data = NULL;
+
+        
+        //get the word passed by dbus 
+        osso_data = &g_array_index (word, osso_rpc_t, 0); 
+
+        //free memory used by last searched word
+        gchar* tmp = NULL;
+        tmp = g_strdup(osso_data->value.s + 11);
+       
+       g_object_set(G_OBJECT(data->ws_gui_hildon_find_toolbar),
+                    "prefix",
+                    tmp,
+                    NULL);
+       ws_gui_search(NULL, data);
+}
+
 /**  this function handles signals from dbus; it is called when progress bar
  status has been changed
  *
@@ -508,7 +532,7 @@ void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data)
                 gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
                               _("ws_ni_no_words_found"));
                
-               ws_gui_fill_html(" ", ws_gui_app);
+               //ws_gui_fill_html(" ", ws_gui_app);
                ws_gui_app->html_flag = FALSE;
                g_free(ws_gui_app->last_word);
                ws_gui_app->last_word = NULL;