if [ "$1" != "upgrade" ]
then
# End automatically added section
-echo -e "Selecting menu location"
-maemo-select-menu-location whitestork.desktop
+# echo -e "Selecting menu location"
+# maemo-select-menu-location whitestork.desktop
+
+echo -en "\n\nZawartosc pliku uri-action-defaults.list: \n"
+cat /usr/share/applications/uri-action-defaults.list
+
+echo -en "\n\nZawartosc pliku schemeinfo.cache: \n"
+cat /usr/share/applications/schemeinfo.cache
+
if [ -f /usr/share/applications/uri-action-defaults.list ]
then
- if [ -z `grep 'mdict=hildon-whitestork.desktop' /usr/share/applications/uri-action-defaults.list` ]
+ if [ -z $(grep mdict=hildon-whitestork.desktop /usr/share/applications/uri-action-defaults.list) ]
then
echo -e "Adding mdict URI action - uri-action-defaults.list"
echo -en "\nmdict=hildon-whitestork.desktop\n" >> /usr/share/applications/uri-action-defaults.list
+ else
+ echo -en "\n\nznaczy sie ze wpis o whitestorku w uri-action juz jest\n\n"
fi
if [ -z `grep 'mdict=hildon-whitestork.desktop' /usr/share/applications/schemeinfo.cache` ]
then
echo -e "Adding mdict URI action - schemeinfo.cache"
echo -en "\nmdict=hildon-whitestork.desktop\n" >> /usr/share/applications/schemeinfo.cache
+ else
+ echo -en "\n\nznaczy sie ze wpis o whitestorku w schemeinfo juz jest\n\n"
fi
fi
+echo -en "\n\nZawartosc pliku uri-action-defaults.list: \n"
+cat /usr/share/applications/uri-action-defaults.list
+
+echo -en "\n\nZawartosc pliku schemeinfo.cache: \n"
+cat /usr/share/applications/schemeinfo.cache
+
+
+
fi
{
GtkTreeIter iter;
gboolean tmp;
-
+
+ g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "\n\nws_gui_clear_list\n\n");
tmp = gtk_tree_model_get_iter_first(
GTK_TREE_MODEL(list),
&iter);
+
+
while (tmp == TRUE)
{
+ g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "\n\nws_gui_clear_list2\n\n");
tmp = gtk_list_store_remove(list, &iter);
}
pango_font_description_free(ws_gui_app->p);
+ g_free(ws_gui_app->welcome_note);
+ ws_gui_app->welcome_note = NULL;
+
g_string_free(ws_gui_app->raw_translation, TRUE);
g_free(ws_gui_app->last_word);
g_free(ws_gui_app->ws_gui_w_list);
if (ws_gui_app->bookmark_mode == FALSE)
{
+ if (ws_gui_app->first_run == TRUE)
+ {
+ ws_gui_app->first_run = FALSE;
+ }
+
g_free(ws_gui_app->last_searched);
ws_gui_app->last_searched = NULL;
ws_gui_app->last_searched = g_strdup(ws_gui_text);
ws_gui_app->loading = TRUE;
ws_gui_set_toolbar_avail(ws_gui_app);
- // ws_gui_app->ws_gui_banner_flag = TRUE;
+ //ws_gui_app->ws_gui_banner_flag = TRUE;
//ws_gui_fill_html(" ", ws_gui_app);
//ws_gui_app->html_flag = FALSE;
ws_dbus_client_find_word (ws_gui_app->dbus_data, ws_gui_text);
void ws_gui_fill_html(char *html_context, gpointer user_data)
{
WSGuiApp* ws_gui_app = (WSGuiApp*)user_data;
- gtk_html_set_editable (GTK_HTML(ws_gui_app->ws_gui_html), FALSE);
-
+
+ gtk_html_set_editable (GTK_HTML(ws_gui_app->ws_gui_html), FALSE);
+ if (ws_gui_app->first_run == TRUE && ws_gui_app->bookmark_mode==FALSE)
+ {
+ gtk_html_load_from_string(GTK_HTML(ws_gui_app->ws_gui_html),
+ ws_gui_app->welcome_note,
+ -1);
+ g_object_set(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar),
+ "prefix",
+ "",
+ NULL);
+ }
+ else
+ {
gtk_html_load_from_string(GTK_HTML(ws_gui_app->ws_gui_html),
html_context,
-1);
+ }
}
/** read adjustment of left scrollwindow, which is necessary to navigate with
ws_gui_app->ws_gui_history_cur_pos = -1;
}
ws_gui_check_history(ws_gui_app);
-
ws_gui_fill_html(" ", ws_gui_app);
ws_gui_app->html_flag = FALSE;
ws_dbus_client_find_word(ws_gui_app->dbus_data, "*");
gtk_widget_hide(ws_gui_app->ws_gui_list_hbox);
ws_gui_search(NULL, ws_gui_app);
-
}
/** closes bookmarks database
ws_gui_check_history(ws_gui_app);
ws_gui_fill_html(" ", ws_gui_app);
- ws_gui_app->html_flag = FALSE;
- g_strstrip(ws_gui_app->last_searched);
- if (ws_gui_app->last_searched != NULL)
+ ws_gui_app->html_flag = TRUE;
+ //g_strstrip(ws_gui_app->last_searched);
+ if (ws_gui_app->last_searched != NULL && ws_gui_app->first_run == FALSE)
{
g_object_set(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar),
"prefix",
//ws_dbus_client_find_word(ws_gui_app->dbus_data, ws_gui_app->last_searched);
ws_gui_search(NULL, ws_gui_app);
}
- else
+ else if (ws_gui_app->first_run == FALSE)
{
g_object_set(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar),
"prefix",
TRUE);
}
}
+
+void ws_refresh_search_results(gpointer user_data) {
+
+ WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
+
+ //refreshing the words list and translation pane
+ gchar *temp;
+ g_object_get(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar),
+ "prefix",
+ &temp,
+ NULL);
+ ws_dbus_client_find_word (ws_gui_app->dbus_data, temp);
+ gtk_widget_hide(ws_gui_app->ws_gui_list_hbox);
+ //-----------------------------------------------
+}
ws_gui_app->html_flag = TRUE;
ws_gui_app->loading = FALSE;
ws_gui_app->stop_clicked = FALSE;
+ ws_gui_app->first_run = TRUE; //if dictionary is just run
ws_gui_app->zoom = ZOOM_DEFAULT;
ws_gui_app->welcome_note,
-1);
- g_free(ws_gui_app->welcome_note);
- ws_gui_app->welcome_note = NULL;
-
gtk_html_set_magnification(GTK_HTML(ws_gui_app->ws_gui_html),
ws_gui_app->zoom);
ws_gui_check_history(ws_gui_app);
gtk_widget_destroy (dialog1);
+ ws_refresh_search_results(ws_gui_app); //refreshing words list
}
else if (i == GTK_RESPONSE_CANCEL)
{
if (ws_gui_load_dict(filename, ws_gui_app) == TRUE)
{
gtk_widget_destroy(dialog);
+ ws_refresh_search_results(ws_gui_app);
gtk_infoprint(GTK_WINDOW(
ws_gui_app->ws_gui_hildon_window),
_("ws_ni_dictionary_added"));
}
}
else if (g_str_has_suffix(name, ".bz2"))
- {
- gtk_widget_destroy(dialog);
+ {
ws_dbus_client_extract_dictionary(ws_gui_app->dbus_data, filename);
+ gtk_widget_destroy(dialog);
+ ws_refresh_search_results(ws_gui_app);
}
else
{
ws_gui_app->ws_gui_hildon_window),
_("ws_ib_dictionary_removed"));
gtk_widget_destroy (dialog1);
+ ws_refresh_search_results(ws_gui_app);
}
else if (i == GTK_RESPONSE_CANCEL)
{