#include <gtk/gtk.h>
#include <hildon/hildon.h>
+#include <libosso.h>
+
#include <getopt.h>
#include <string>
#include <vector>
results_view = NULL;
results_view_scroll = NULL;
+ osso_context = osso_initialize("org.maemo.mstardict", VERSION, TRUE, NULL);
+
/* create list of ressults */
results_list = gtk_list_store_new(N_COLUMNS,
G_TYPE_STRING); /* DEF_COLUMN */
/* deinitialize configuration */
delete oConf;
+
+ /* deinitialize osso context */
+ osso_deinitialize(osso_context);
}
gboolean
}
gboolean
+MStarDict::onDownloadDictionariesMenuItemClicked(GtkButton *button,
+ MStarDict *mStarDict)
+{
+ osso_rpc_run(mStarDict->osso_context,
+ "com.nokia.osso_browser",
+ "/com/nokia/osso_browser",
+ "com.nokia.osso_browser",
+ "open_new_window",
+ NULL,
+ DBUS_TYPE_STRING, "http://stardict.sourceforge.net/Dictionaries.php",
+ DBUS_TYPE_INVALID);
+ return true;
+}
+
+gboolean
MStarDict::onPreferencesMenuItemClicked(GtkButton *button,
MStarDict *mStarDict)
{
hildon_app_menu_append(menu, GTK_BUTTON(item));
g_signal_connect(item, "clicked", G_CALLBACK(onDictionariesMenuItemClicked), this);
+ /* download dictionaries menu item */
+ item = hildon_gtk_button_new(HILDON_SIZE_AUTO);
+ gtk_button_set_label(GTK_BUTTON(item), _("Download dictionaries"));
+ hildon_app_menu_append(menu, GTK_BUTTON(item));
+ g_signal_connect(item, "clicked", G_CALLBACK(onDownloadDictionariesMenuItemClicked), this);
+
/* preferences menu item */
item = hildon_gtk_button_new(HILDON_SIZE_AUTO);
gtk_button_set_label(GTK_BUTTON(item), _("Preferences"));