Bug has been fixed; Now can easly remove and add new dictionaries
authormaritus <lucas.pawlik@gmail.com>
Tue, 31 Oct 2006 09:55:07 +0000 (09:55 +0000)
committermaritus <lucas.pawlik@gmail.com>
Tue, 31 Oct 2006 09:55:07 +0000 (09:55 +0000)
git-svn-id: file:///svnroot/mdictionary/trunk@31 5bde0345-f819-0410-ac75-e5045f9217cc

gui/src/ws_gui.c
gui/src/ws_gui_callbacks.c
gui/src/ws_gui_layout.c

index 7db7387..6eac093 100644 (file)
@@ -21,17 +21,24 @@ Copyright 2006 ComArch S.A.
 #include "../../include/ws_gui_callbacks.h"
 #include "../../include/ws_gui_layout.h"
 
+
 //int ws_gui_init(int argc, char *argv[])
 int main(int argc, char *argv[])
-{           
+{
+        setlocale(LC_ALL, "");
+        //bindtextdomain("pl.po", "/var/lib/install/share/locale");
+       bindtextdomain("whitestork", "/usr/share/locale");
+       bind_textdomain_codeset("whitestork", "UTF-8");
+        textdomain("whitestork");
+
         gtk_init(&argc, &argv);
-           
-           //gconf_init(argc, argv, NULL);
-           
+
+        //gconf_init(argc, argv, NULL);
+
         WSGuiApp *ws_gui_app;
-        ws_gui_app = (WSGuiApp*)g_malloc(sizeof(WSGuiApp));           
+        ws_gui_app = (WSGuiApp*)g_malloc(sizeof(WSGuiApp)); 
 
-           //memory allocation
+        //memory allocation
         ws_gui_app->ws_gui_w_list = 
                 (struct WSGuiList*)g_malloc(sizeof(struct WSGuiList));
         ws_gui_app->ws_gui_menu = 
@@ -39,12 +46,11 @@ int main(int argc, char *argv[])
 
         ws_gui_create_window(ws_gui_app);
         ws_gui_read_adjustment(ws_gui_app);
-           
-           //gonf
+
+        //gonf
         ws_gui_app->client = gconf_client_get_default();
-           
 
-           //dbus wrapper
+        //dbus wrapper
         ws_gui_app->dbus_data = ws_dbus_create ("WhiteStorkGui", "v1.0");
 
         ws_dbus_config (ws_gui_app->dbus_data, 
@@ -86,7 +92,7 @@ int main(int argc, char *argv[])
                         ws_gui_signal_hander,
                         ws_gui_app);
            
-           //setting the clipboard
+        //setting the clipboard
         ws_gui_app->ws_gui_clipboard = 
                 gtk_widget_get_clipboard (GTK_WIDGET(ws_gui_app->ws_gui_html),
                                           GDK_SELECTION_CLIPBOARD);
@@ -114,6 +120,7 @@ int main(int argc, char *argv[])
 
         ws_dbus_notify(ws_gui_app->dbus_data,
                        WS_DBUS_ERROR_UNKNOWN);
+
         gtk_main();
         return 0;
 }
index 0b34065..5fa99ec 100644 (file)
@@ -110,7 +110,7 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                                    GTK_DIALOG_DESTROY_WITH_PARENT,
                                    GTK_MESSAGE_ERROR,
                                    GTK_BUTTONS_OK,
-                                   "An error occured");
+                                   _("An error occured"));
                         gtk_widget_show_all(ws_gui_app->ws_message_dialog);
 
                         g_signal_connect_swapped(
@@ -129,8 +129,8 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                                    GTK_DIALOG_DESTROY_WITH_PARENT,
                                    GTK_MESSAGE_ERROR,
                                    GTK_BUTTONS_OK,
-                                   "There is no dictionary file available");
-                                            
+                                   _("There is no dictionary file available"));
+
                         gtk_widget_show_all(ws_gui_app->ws_message_dialog);
 
                         GArray *tmp;
@@ -140,7 +140,7 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                         ws_gui_app->ws_gui_w_list->ws_gui_model = 
                                 create_and_fill_model(tmp, ws_gui_app);
                         ws_gui_fill_html(" ", ws_gui_app);
-                                             
+
                         gtk_widget_set_sensitive(
                              GTK_WIDGET(ws_gui_app->ws_gui_hildon_find_toolbar),
                              FALSE);
@@ -155,7 +155,7 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                                                  ws_gui_app->ws_message_dialog);
                         }
                         break;
-                }                      
+                }
 
                 case WS_DBUS_INFO_CACHING:
                 {
@@ -163,7 +163,7 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                                 hildon_banner_show_progress(
                                    GTK_WIDGET(ws_gui_app->ws_gui_hildon_window),
                                    NULL,
-                                   "caching ..." );
+                                   _("caching ..."));
                        ws_gui_app->caching_flag = TRUE;
                        hildon_banner_set_fraction(
                                HILDON_BANNER(ws_gui_app->ws_gui_banner_caching),
@@ -174,10 +174,10 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                        gtk_widget_set_sensitive(
                         GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_search),
                         FALSE);
-                       
+
                        break;
                 }
-                
+
                 case WS_DBUS_INFO_CACHING_FINISHED:
                 {
                         gtk_widget_destroy(
@@ -189,10 +189,10 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                         gtk_widget_set_sensitive(
                        GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_search),
                        TRUE);
-                                            
+
                         break;
                 }
-                                            
+
                 case WS_DBUS_ERROR_DICTIONARY_NOT_LOAD:
                 {
                         if (ws_gui_app->ws_gui_history_cur_pos >= 0 &&
@@ -201,20 +201,20 @@ void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data)
                                 g_array_remove_index(ws_gui_app->ws_gui_history,
                                             ws_gui_app->ws_gui_history_cur_pos);
                         }
-                                                                  
+
                         ws_gui_app->ws_message_dialog = gtk_message_dialog_new(
                                    GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
                                    GTK_DIALOG_DESTROY_WITH_PARENT,
                                    GTK_MESSAGE_ERROR,
                                    GTK_BUTTONS_OK,
-                                  "Dictionary unavailable");
+                                  _("Dictionary unavailable"));
                        gtk_widget_show_all(ws_gui_app->ws_message_dialog);
                        if (gtk_dialog_run(
                        GTK_DIALOG(ws_gui_app->ws_message_dialog)) == GTK_RESPONSE_OK)
                        {
                                gtk_widget_destroy(ws_gui_app->ws_message_dialog);
                        }
-                       break;                      
+                       break;
                 }
         }
 }
@@ -236,7 +236,7 @@ void ws_dbus_progress_bar(GError *error, GArray *words, gpointer user_data)
         {
                 hildon_banner_set_fraction(
                                HILDON_BANNER(ws_gui_app->ws_gui_banner_caching),
-                               progress);                      
+                               progress);
         }
 }
 
@@ -253,9 +253,9 @@ void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data)
         timer(TIMER_START, (gchar*)__FUNCTION__);
         guint i;
         osso_rpc_t data;
-        
+
         WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-                     
+
         GArray *tmp;
         tmp = g_array_new(TRUE, TRUE, sizeof(gchar*));
         gchar *tmp_word;
@@ -266,7 +266,7 @@ void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data)
                 tmp_word = g_strconcat(data.value.s,NULL);
                 g_array_append_val(tmp, tmp_word);
         }
-                      
+
         gtk_widget_destroy(GTK_WIDGET(ws_gui_app->ws_gui_banner));
         ws_gui_app->ws_gui_banner_flag = FALSE;
         gtk_widget_set_sensitive(
@@ -279,11 +279,11 @@ void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data)
 
         ws_gui_app->ws_gui_w_list->ws_gui_model = 
                                          create_and_fill_model(tmp, ws_gui_app);
-        
+
         if (tmp->len == 0)
         {
                 gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                              "No words found" );
+                              _("No words found"));
         }
         timer(TIMER_STOP, (gchar*)__FUNCTION__);
 }
@@ -300,15 +300,15 @@ void ws_gui_dbus_return_translation (GError *error,
                                      GArray *words,
                                      gpointer user_data)
 {
-        timer(TIMER_START, (gchar*)__FUNCTION__);                      
+        timer(TIMER_START, (gchar*)__FUNCTION__);
         WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-                      
+
         osso_rpc_t data;
-                      
+
         data = g_array_index (words, osso_rpc_t, 0);
         gtk_html_zoom_reset(GTK_HTML(ws_gui_app->ws_gui_html));
         ws_gui_fill_html(format_html(data.value.s), ws_gui_app);
-                      
+
         timer(TIMER_STOP, (gchar*)__FUNCTION__);
 }
 
@@ -340,7 +340,7 @@ gboolean hildon_key_press_listener (GtkWidget * widget,
                                     gpointer user_data)
 {
         WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-        
+
         switch ((guint)(keyevent->keyval)) {
                 case HILDON_HARDKEY_UP: 
                 {
@@ -361,7 +361,7 @@ gboolean hildon_key_press_listener (GtkWidget * widget,
                       }
                       break;
                 }
-                      
+
                 case HILDON_HARDKEY_DOWN: 
                 {
                       gtk_container_set_focus_vadjustment(
@@ -383,7 +383,7 @@ gboolean hildon_key_press_listener (GtkWidget * widget,
                       }
                       break;
                 }
-                      
+
                 case HILDON_HARDKEY_LEFT:
                 {
                       gtk_container_set_focus_hadjustment(
@@ -392,7 +392,7 @@ gboolean hildon_key_press_listener (GtkWidget * widget,
                        GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left)));
                       ws_gui_app->h_new_value = gtk_adjustment_get_value(
                        GTK_ADJUSTMENT(ws_gui_app->ws_gui_hadj)) - ws_gui_app->h_delta;
-                      
+
                       if (ws_gui_app->h_new_value > ws_gui_app->ws_gui_hadj->lower) 
                       {
                                 gtk_adjustment_set_value(
@@ -401,7 +401,7 @@ gboolean hildon_key_press_listener (GtkWidget * widget,
                       }
                 }
                 break;
-                      
+
                 case HILDON_HARDKEY_RIGHT: 
                 {
                       gtk_container_set_focus_hadjustment(
@@ -420,23 +420,23 @@ gboolean hildon_key_press_listener (GtkWidget * widget,
                       }
                  }
                  break;
-                      
+
                  case HILDON_HARDKEY_SELECT: 
                         ws_gui_search(NULL, ws_gui_app);
                  break;
-                      
+
                  case HILDON_HARDKEY_FULLSCREEN: 
                       ws_gui_full_screen(NULL, ws_gui_app);
                  break;
-                      
+
                  case HILDON_HARDKEY_INCREASE: 
                       ws_gui_html_zoom_in(NULL, ws_gui_app);
                  break;
-                      
+
                  case HILDON_HARDKEY_DECREASE:
                       ws_gui_html_zoom_out(NULL, ws_gui_app);
                  break;
-                      
+
                  case HILDON_HARDKEY_ESC: 
                       ws_gui_search_stop(NULL, ws_gui_app);
                  break;
@@ -491,7 +491,7 @@ the find toolbar
 void ws_gui_words_list_hide(GtkToggleButton *togglebutton, gpointer user_data)
 {
         WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
-        
+
         if (gtk_toggle_tool_button_get_active(
                  GTK_TOGGLE_TOOL_BUTTON(ws_gui_app->ws_gui_toobar_button_hide)))
         {
@@ -526,10 +526,10 @@ void ws_gui_history_add(char *new_word, gpointer user_data)
         guint i;
         WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
         gchar *tmp_word;
-                      
+
         i = ws_gui_app->ws_gui_history_cur_pos + 1;
         gchar *tmp = g_array_index(ws_gui_app->ws_gui_history, gchar*, i);
-              
+
         while (tmp != NULL) 
         {
                 g_array_remove_index(ws_gui_app->ws_gui_history, i);
@@ -538,7 +538,7 @@ void ws_gui_history_add(char *new_word, gpointer user_data)
 
         i = 0;
         ws_gui_app->ws_gui_history_cur_pos ++;
-                      
+
         tmp_word = g_strdup(new_word);
         g_array_append_val(ws_gui_app->ws_gui_history, tmp_word);
         if(ws_gui_app->ws_gui_history->len > HISTORY_LEN)
@@ -546,11 +546,11 @@ void ws_gui_history_add(char *new_word, gpointer user_data)
                 g_array_remove_index(ws_gui_app->ws_gui_history, 0);
                 ws_gui_app->ws_gui_history_cur_pos--;
         }
-                      
+
         i = 0;
         tmp = g_array_index(ws_gui_app->ws_gui_history, gchar*, i);
 
-        ws_gui_check_history(ws_gui_app);                      
+        ws_gui_check_history(ws_gui_app);
 }
 
 /** display previously choosen word (previous from the history array)
@@ -563,7 +563,7 @@ void ws_gui_history_add(char *new_word, gpointer user_data)
 void ws_gui_history_back(GtkButton *button, gpointer user_data) 
 {
         WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
-                      
+
         if (ws_gui_app->ws_gui_history_cur_pos > 0) {
                 ws_gui_app->ws_gui_history_cur_pos = 
                         ws_gui_app->ws_gui_history_cur_pos - 1;
@@ -576,7 +576,7 @@ void ws_gui_history_back(GtkButton *button, gpointer user_data)
         else 
         {
                 gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                              "no words in the history" );
+                              _("no words in the history"));
                 gtk_widget_set_sensitive (
                               GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_back),
                               FALSE);
@@ -586,7 +586,7 @@ void ws_gui_history_back(GtkButton *button, gpointer user_data)
         }
 
         ws_gui_check_history(ws_gui_app);
-                      
+
 }
 
 /** display choosen word, next in the history array (if avaible), 
@@ -599,11 +599,11 @@ sets current position in the history array
 void ws_gui_history_next(GtkButton *button, gpointer user_data) 
 {
         WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
-                      
+
                 gchar *tmp = g_array_index(ws_gui_app->ws_gui_history,
                                    gchar*,
                                    ws_gui_app->ws_gui_history_cur_pos+1);
-                      
+
         if ((ws_gui_app->ws_gui_history_cur_pos < HISTORY_LEN-1) && (tmp != NULL)) 
         {
                 ws_gui_app->ws_gui_history_cur_pos =
@@ -612,12 +612,12 @@ void ws_gui_history_next(GtkButton *button, gpointer user_data)
                                 (g_array_index(ws_gui_app->ws_gui_history,
                                           gchar*,
                                           ws_gui_app->ws_gui_history_cur_pos)));
-                                            
+
         }
         else 
         {
                 gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                              "end of history" );
+                              _("end of history"));
                 gtk_widget_set_sensitive(
                            GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_forward),
                            FALSE);
@@ -638,13 +638,13 @@ void ws_gui_history_next(GtkButton *button, gpointer user_data)
 void ws_gui_check_history(gpointer user_data) 
 {
         WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
-                     
+
         gchar *tmp = g_array_index(ws_gui_app->ws_gui_history,
                                    gchar*,
                                    ws_gui_app->ws_gui_history_cur_pos+1);
-                      
+
         if ((ws_gui_app->ws_gui_history_cur_pos+1 < HISTORY_LEN) && (tmp != NULL))
-        {                      
+        {
                 gtk_widget_set_sensitive(
                            GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_forward),
                            TRUE);
@@ -661,7 +661,7 @@ void ws_gui_check_history(gpointer user_data)
                      GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_find_next),
                      FALSE);
         }
-                      
+
         tmp = g_array_index(ws_gui_app->ws_gui_history,
                             gchar*,
                             ws_gui_app->ws_gui_history_cur_pos-1);
@@ -700,7 +700,7 @@ GtkTreeModel * create_and_fill_model (GArray *words_list, gpointer user_data)
         valid = gtk_tree_model_get_iter_first(
                         GTK_TREE_MODEL(ws_gui_app->ws_gui_w_list->ws_gui_store),
                         &ws_gui_app->ws_gui_w_list->ws_gui_iter);
-                      
+
                        /* Append a row and fill in some data */
         while (tmp != NULL)
         {
@@ -720,7 +720,7 @@ GtkTreeModel * create_and_fill_model (GArray *words_list, gpointer user_data)
                 ws_dbus_client_find_translation(ws_gui_app->dbus_data, tmp);
                 ws_gui_history_add(tmp, ws_gui_app);
         }
-                      
+
         return GTK_TREE_MODEL(ws_gui_app->ws_gui_w_list->ws_gui_store);
 }
 
@@ -734,7 +734,7 @@ GtkTreeModel * create_and_fill_model (GArray *words_list, gpointer user_data)
 GtkWidget * create_view_and_model (GArray *words_list, gpointer user_data)
 {
         WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-           
+
         ws_gui_app->ws_gui_w_list->ws_gui_view = gtk_tree_view_new ();
 
         ws_gui_app->ws_gui_w_list->ws_gui_renderer=gtk_cell_renderer_text_new();
@@ -748,11 +748,11 @@ GtkWidget * create_view_and_model (GArray *words_list, gpointer user_data)
                          NULL);
         ws_gui_app->ws_gui_w_list->ws_gui_model = 
                                 create_and_fill_model(words_list, ws_gui_app);
-                      
+
         gtk_tree_view_set_model(
                          GTK_TREE_VIEW (ws_gui_app->ws_gui_w_list->ws_gui_view),
                          ws_gui_app->ws_gui_w_list->ws_gui_model);
-                      
+
         g_object_unref (ws_gui_app->ws_gui_w_list->ws_gui_model);
         return ws_gui_app->ws_gui_w_list->ws_gui_view;
 }
@@ -779,9 +779,9 @@ void ws_gui_tree_selection_changed(GtkTreeSelection *selection,
                                    COL_WORD,
                                    &string,
                                    -1);
-                      
+
                ws_dbus_client_find_translation(ws_gui_app->dbus_data, string);
-                                    
+
                ws_gui_history_add(string, ws_gui_app);
                g_free (string);
         }
@@ -798,7 +798,7 @@ void ws_gui_full_screen(GtkMenuItem *menuitem, gpointer user_data)
 
         WSGuiApp* ws_gui_app = (WSGuiApp*)user_data;
         if (ws_gui_app->ws_gui_full_screen_flag == FALSE) {
-                      
+
                 gtk_window_fullscreen(
                                   GTK_WINDOW(ws_gui_app->ws_gui_hildon_window));
                 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
@@ -846,7 +846,7 @@ void ws_gui_popup_search(GtkMenuItem *menuitem, gpointer user_data)
                 hildon_banner_show_information(
                                    GTK_WIDGET(ws_gui_app->ws_gui_hildon_window),
                                    NULL,
-                                   "No text selected");
+                                   _("No text selected"));
         }
 }
 
@@ -883,7 +883,7 @@ void ws_gui_html_copy(GtkMenuItem *menuitem, gpointer user_data)
 void ws_gui_html_paste(GtkMenuItem *menuitem, gpointer user_data)
 {
         WSGuiApp* ws_gui_app = (WSGuiApp*)user_data;
-                      
+
         gchar *temp;
         gchar *temp2;
         temp = gtk_clipboard_wait_for_text(ws_gui_app->ws_gui_clipboard);
@@ -933,31 +933,31 @@ void ws_gui_search(GtkWidget * widget, gpointer user_data)
 {
         WSGuiApp* ws_gui_app = (WSGuiApp*)user_data;
         gchar* ws_gui_text = NULL;
-                      
+
         if (ws_gui_app->ws_gui_banner_flag == TRUE) {
                 ws_gui_app->ws_gui_banner_flag = FALSE;
         }
-        
+
         g_object_get(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar),
                      "prefix",
                      &ws_gui_text,
                      NULL);
-                       
+
        if (strlen(ws_gui_text) != 0) 
        {
                 ws_gui_app->ws_gui_banner = 
                         hildon_banner_show_animation(
                                    GTK_WIDGET(ws_gui_app->ws_gui_hildon_window),
                                    NULL,
-                                   "searching ..." );
+                                   _("searching ..."));
 
                 gtk_widget_set_sensitive(
                               GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_stop),
                               TRUE);
                 gtk_widget_set_sensitive(
                           GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_stop),
-                          TRUE);                      
-                                            
+                          TRUE);
+
                 ws_gui_app->ws_gui_banner_flag = TRUE;
                 ws_gui_fill_html(" ", ws_gui_app);
                 ws_dbus_client_find_word (ws_gui_app->dbus_data, ws_gui_text);
@@ -966,7 +966,7 @@ void ws_gui_search(GtkWidget * widget, gpointer user_data)
        {
                 gtk_infoprint(
                               GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                              "No word typed.");
+                              _("No word typed."));
        }
 }
 
@@ -978,7 +978,7 @@ void ws_gui_search(GtkWidget * widget, gpointer user_data)
  */
 void ws_gui_search_stop(GtkButton *button, gpointer user_data) 
 {
-        WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;                      
+        WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
         if (ws_gui_app->ws_gui_banner_flag == TRUE) 
         {
                 gtk_widget_destroy(GTK_WIDGET(ws_gui_app->ws_gui_banner));
@@ -986,8 +986,8 @@ void ws_gui_search_stop(GtkButton *button, gpointer user_data)
                 ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_STOP_SEARCH);
                 gtk_infoprint(
                               GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                              "Search has been aborted" );
-        }           
+                              _("Search has been aborted"));
+        }
 }
 
 /** this function is called just before closing application; 
@@ -1000,7 +1000,7 @@ it sends signal to DBUS and destroys it;
  */
 void ws_gui_on_exit (GtkWidget *widget, GdkEvent *event, gpointer user_data) 
 {
-        WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;                      
+        WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
         ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_TERMINATE);
         ws_dbus_destroy (ws_gui_app->dbus_data);
         ws_gui_free_memory(ws_gui_app);
@@ -1017,7 +1017,7 @@ from application menu; it sends signal to DBUS and destroys it;
  */
 void ws_gui_menu_quit(GtkMenuItem *menuitem, gpointer user_data)
 {
-        WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;                      
+        WSGuiApp* ws_gui_app = (WSGuiApp *)user_data;
         g_timer_destroy(ws_gui_app->timer);
         ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_TERMINATE);
         ws_dbus_destroy (ws_gui_app->dbus_data);
@@ -1036,7 +1036,7 @@ 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_load_from_string(GTK_HTML(ws_gui_app->ws_gui_html),
                                   html_context,
                                   -1);
@@ -1051,13 +1051,13 @@ arrow keys inside words list
 void ws_gui_read_adjustment(gpointer user_data)
 {
         WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-                     
+
         ws_gui_app->ws_gui_hadj = 
                 gtk_scrolled_window_get_hadjustment(
                     GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left));
         ws_gui_app->h_delta = (ws_gui_app->ws_gui_hadj->upper -
                                   ws_gui_app->ws_gui_hadj->lower)/SCROLL_STEP_H;
-                      
+
         ws_gui_app->ws_gui_vadj = gtk_scrolled_window_get_vadjustment(
         GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left));
 
@@ -1066,12 +1066,12 @@ void ws_gui_read_adjustment(gpointer user_data)
         ws_gui_app->v_new_value =
            gtk_adjustment_get_value(GTK_ADJUSTMENT(ws_gui_app->ws_gui_vadj)) +
                                                             ws_gui_app->v_delta;
-                                            
+
         gtk_container_set_focus_vadjustment(
                GTK_CONTAINER(ws_gui_app->ws_gui_scrolledwindow_left), 
                gtk_scrolled_window_get_vadjustment(
                   GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left)));
-                      
+
 }
 
 /** allows to display image in html area
@@ -1130,7 +1130,7 @@ gboolean ws_gui_button_press(GtkWidget *widget,
                         g_timer_reset(ws_gui_app->timer);
                         return FALSE;
                 }
-                                            
+
                 g_signal_stop_emission_by_name(G_OBJECT(ws_gui_app->ws_gui_html),
                                                "button-press-event");
                 g_timer_start(ws_gui_app->timer);
@@ -1144,7 +1144,7 @@ gboolean ws_gui_button_press(GtkWidget *widget,
                 ws_gui_app->ws_gui_sel_flag = FALSE;
                 return FALSE;
         }
-                      
+
 }
 
 /** handles button release event and examines whether 'click' or 'tap and hold' 
@@ -1219,12 +1219,18 @@ void ws_gui_check_clipboard (GtkWidget *widget, gpointer user_data)
         }
 }
 
+/** gets received string (with translation), formats it and sends it to be 
+ * displayed
+ *
+ * @param received_string - content received from Manager
+ * @return 
+ */
 gchar * format_html (gchar * received_string)
 {
         GString *str_final;
         str_final = g_string_new(received_string);
         gchar * tmp;
-                     
+
         while (strstr(str_final->str, "<PATTERN_OPEN>") != NULL)
         {
                 tmp = strstr(str_final->str, "<PATTERN_OPEN>");
@@ -1235,7 +1241,7 @@ gchar * format_html (gchar * received_string)
                  (long)(tmp - str_final->str),
                  "<html><head></head><body><center><table width=\"95%\"><tr><td><table border=1 width=100%><tr><th background=\"file:/usr/share/pixmaps/ws_top.png\"><img align=left src=\"file:/usr/share/pixmaps/engine_xdxf_icon.png\"><font color=\"#eeeeee\">");                      
         }
-        
+
         while (strstr(str_final->str, "<PATTERN_CLOSED>") != NULL)
         {
                 tmp = strstr(str_final->str, "<PATTERN_CLOSED>");
@@ -1273,3 +1279,92 @@ gchar * format_html (gchar * received_string)
                                     "</td></tr></table></body></html>");
         return str_final->str;
 }
+
+/** opens bookmarks database 
+ *
+ * @param menuitem - object which recived the signal
+ * @param user_data - user data set when the signal handler was connected 
+ * @return
+ */
+void ws_gui_dictionary_open_bookmark(GtkMenuItem *menuitem, gpointer user_data)
+{
+        //WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
+        g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "\n.::GUI::. Open bookmarks\n");
+}
+
+/** closes bookmarks database 
+ *
+ * @param menuitem - object which recived the signal
+ * @param user_data - user data set when the signal handler was connected 
+ * @return
+ */
+void ws_gui_dictionary_close_bookmark(GtkMenuItem *menuitem, gpointer user_data)
+{
+       //WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
+        g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "\n.::GUI::. Close bookmarks\n");
+}
+
+/** adds bookmark to bookmarks database 
+ *
+ * @param menuitem - object which recived the signal
+ * @param user_data - user data set when the signal handler was connected 
+ * @return
+ */
+void ws_gui_dictionary_add_bookmark(GtkMenuItem *menuitem, gpointer user_data)
+{
+       //WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
+        g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "\n.::GUI::. Add bookmark\n");
+}
+
+/** removes bookmark from bookmarks database 
+ *
+ * @param menuitem - object which recived the signal
+ * @param user_data - user data set when the signal handler was connected 
+ * @return
+ */
+void ws_gui_dictionary_remove_bookmark(GtkMenuItem *menuitem, gpointer user_data)
+{
+       //WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
+        g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "\n.::GUI::. Remove bookmark\n");
+}
+
+void ws_gui_dict_availablity(GtkMenuItem *menuitem, gpointer user_data)
+{
+       WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
+       if (gconf_client_dir_exists(ws_gui_app->client, GCONF_PATH, NULL) == TRUE)
+       {
+               ws_gui_app->directories = gconf_client_all_dirs(
+                                                       ws_gui_app->client,
+                                                       GCONF_PATH,
+                                                       NULL
+                                                       );
+       
+               if(g_slist_length(ws_gui_app->directories) != 0)
+               {
+                       gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_menu_remove_dict),
+                               TRUE);
+                       gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_menu_select_dict),
+                               TRUE);
+                       gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict),
+                               TRUE);
+               }
+
+       }
+       else 
+       {
+       
+       gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_menu_remove_dict),
+                               FALSE);
+       gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_menu_select_dict),
+                               FALSE);
+       gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict),
+                               FALSE);
+       }
+
+}
index d015425..c91ef79 100644 (file)
@@ -21,6 +21,8 @@ Copyright 2006 ComArch S.A.
 #include "../../include/ws_gui.h"
 #include "../../include/ws_gui_callbacks.h"
 #include "../../include/ws_dbus.h"
+#include <libintl.h>
+
 
 /** this function creates main window and it components; moreover there are 
  * signal connections;
@@ -30,7 +32,7 @@ Copyright 2006 ComArch S.A.
 void ws_gui_create_window(gpointer user_data) 
 {
         WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-        
+
         ws_gui_app->ws_gui_w_list->ws_gui_list_item_data_string = 
                 "<font size=+2><center><br>Welcome to<br><b>WhiteStork</b><br>"
                 "Dictionary.</font><br><IMG SRC=file:/usr/share/pixmaps/whitestork.png>"
@@ -39,7 +41,7 @@ void ws_gui_create_window(gpointer user_data)
         GArray *array_tmp = g_array_new (TRUE, TRUE, sizeof(gchar*));
 
         ws_gui_app->ws_gui_banner_flag = FALSE;
-        ws_gui_app->ws_gui_full_screen_flag = FALSE;                
+        ws_gui_app->ws_gui_full_screen_flag = FALSE;
         ws_gui_app->caching_flag = FALSE;
         ws_gui_app->ws_gui_double_click = FALSE;
         ws_gui_app->ws_gui_sel_flag = FALSE;
@@ -49,36 +51,36 @@ void ws_gui_create_window(gpointer user_data)
 
         ws_gui_app->ws_gui_history = g_array_new(TRUE, TRUE, sizeof(gchar*));
         ws_gui_app->ws_gui_history_cur_pos = -1;
-                
+
         ws_gui_app->ws_gui_hildon_program = 
         HILDON_PROGRAM(hildon_program_get_instance());
-                
+
         g_set_application_name("WhiteStork");
-                
+
         ws_gui_app->ws_gui_hildon_window = HILDON_WINDOW(hildon_window_new());
-                
+
         hildon_program_add_window(ws_gui_app->ws_gui_hildon_program,
                                   ws_gui_app->ws_gui_hildon_window);
-                
+
         ws_gui_create_main_menu(ws_gui_app);
         ws_gui_create_find_toolbar(ws_gui_app);
+
         ws_gui_app->ws_gui_hpane = gtk_hpaned_new();
+
         ws_gui_app->ws_gui_scrolledwindow_left = 
                 gtk_scrolled_window_new (NULL, NULL);
-                
+
         gtk_scrolled_window_set_policy(
                 GTK_SCROLLED_WINDOW (ws_gui_app->ws_gui_scrolledwindow_left), 
                 GTK_POLICY_AUTOMATIC,
                 GTK_POLICY_AUTOMATIC);
-                
+
        gtk_paned_set_position(GTK_PANED(ws_gui_app->ws_gui_hpane), 100);
-                
+
        gtk_scrolled_window_set_placement(GTK_SCROLLED_WINDOW
                                        (ws_gui_app->ws_gui_scrolledwindow_left),
                                        GTK_CORNER_TOP_LEFT);
+
        ws_gui_app->ws_gui_scrolledwindow_right = 
                 gtk_scrolled_window_new (NULL, NULL);
 
@@ -86,40 +88,40 @@ void ws_gui_create_window(gpointer user_data)
                                      (ws_gui_app->ws_gui_scrolledwindow_right), 
                                      GTK_POLICY_NEVER,
                                      GTK_POLICY_AUTOMATIC);
-                
+
        ws_gui_app->ws_gui_w_list->ws_gui_store = 
                 gtk_list_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_UINT);
-                
+
        ws_gui_app->ws_gui_w_list->ws_gui_view = 
-                create_view_and_model(array_tmp, ws_gui_app);                
-                
+                create_view_and_model(array_tmp, ws_gui_app);
+
        gtk_widget_show_all(GTK_WIDGET(ws_gui_app->ws_gui_w_list->ws_gui_view));
-                
+
        gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW
                                        (ws_gui_app->ws_gui_scrolledwindow_left), 
                                         ws_gui_app->ws_gui_w_list->ws_gui_view);
 
        ws_gui_app->ws_gui_html = gtk_html_new();
-                
+
        ws_gui_app->p = pango_font_description_from_string("Tahoma 12");
        gtk_widget_modify_font(GTK_WIDGET(ws_gui_app->ws_gui_html),ws_gui_app->p);
-                
+
        g_signal_connect(GTK_OBJECT (ws_gui_app->ws_gui_html),
                                  "url_requested",
                                  G_CALLBACK(ws_gui_url_requested),
                                  ws_gui_app);
-                
+
        gtk_html_load_from_string(GTK_HTML(ws_gui_app->ws_gui_html),
                         ws_gui_app->ws_gui_w_list->ws_gui_list_item_data_string,
                         -1);
 
        gtk_html_set_editable(GTK_HTML(ws_gui_app->ws_gui_html), FALSE); 
        gtk_html_allow_selection(GTK_HTML(ws_gui_app->ws_gui_html), TRUE);
-                
+
        gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW
                                       (ws_gui_app->ws_gui_scrolledwindow_right),
                                        ws_gui_app->ws_gui_html);
-                
+
        gtk_paned_pack1(GTK_PANED(ws_gui_app->ws_gui_hpane),
                        ws_gui_app->ws_gui_scrolledwindow_left,
                        TRUE,
@@ -133,11 +135,11 @@ void ws_gui_create_window(gpointer user_data)
                         ws_gui_app->ws_gui_hpane);
 
        gtk_widget_show_all(GTK_WIDGET(ws_gui_app->ws_gui_hildon_window));
-                
+
        ws_gui_app->ws_gui_w_list->ws_gui_selection = 
                 gtk_tree_view_get_selection (GTK_TREE_VIEW
                 (ws_gui_app->ws_gui_w_list->ws_gui_view));
-                
+
        gtk_tree_selection_set_mode(
                                    ws_gui_app->ws_gui_w_list->ws_gui_selection,
                                    GTK_SELECTION_BROWSE);
@@ -151,11 +153,11 @@ void ws_gui_create_window(gpointer user_data)
  */
 void ws_gui_create_find_toolbar(gpointer user_data)
 {
-       WSGuiApp* ws_gui_app = (WSGuiApp*)user_data;                
+       WSGuiApp* ws_gui_app = (WSGuiApp*)user_data;
 
        GtkToolItem *space;
        ws_gui_app->ws_gui_hildon_find_toolbar = 
-       HILDON_FIND_TOOLBAR(hildon_find_toolbar_new("Find: "));
+       HILDON_FIND_TOOLBAR(hildon_find_toolbar_new(_("Find: ")));
 
        ws_gui_app->ws_gui_toobar_button_hide =
        gtk_toggle_tool_button_new_from_stock(GTK_STOCK_GOTO_FIRST);
@@ -171,11 +173,11 @@ void ws_gui_create_find_toolbar(gpointer user_data)
                 gtk_toolbar_get_nth_item(GTK_TOOLBAR(
                                         ws_gui_app->ws_gui_hildon_find_toolbar),
                                         4);
-                
+
        gtk_tool_item_set_visible_horizontal(
                                          ws_gui_app->ws_gui_toobar_button_close,
                                          FALSE);
-                
+
        gtk_toolbar_insert(GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar),
                           ws_gui_app->ws_gui_toobar_button_hide,
                           0);
@@ -196,12 +198,12 @@ void ws_gui_create_find_toolbar(gpointer user_data)
                         "search",
                         G_CALLBACK(ws_gui_search),
                         ws_gui_app);
-                
+
        g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_toobar_button_hide), 
                        "toggled",
                        G_CALLBACK(ws_gui_words_list_hide),
                        ws_gui_app);
-                
+
        g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_toobar_button_back), 
                         "clicked",
                         G_CALLBACK(ws_gui_history_back),
@@ -224,7 +226,7 @@ void ws_gui_create_find_toolbar(gpointer user_data)
        gtk_widget_set_sensitive(
                               GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_stop),
                               FALSE);
-                
+
        hildon_window_add_toolbar(ws_gui_app->ws_gui_hildon_window,
                            GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar));
 }
@@ -242,53 +244,70 @@ void ws_gui_create_main_menu (gpointer user_data)
         ws_gui_app->ws_gui_menu->ws_gui_submenu_1 = gtk_menu_new();
         ws_gui_app->ws_gui_menu->ws_gui_submenu_2 = gtk_menu_new();
         ws_gui_app->ws_gui_menu->ws_gui_submenu_3 = gtk_menu_new();
+       ws_gui_app->ws_gui_menu->ws_gui_submenu_4 = gtk_menu_new();
         ws_gui_app->ws_gui_menu->ws_gui_main_menu = gtk_menu_new();
-        
+
         ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries =
-                gtk_menu_item_new_with_label("Dictionaries");
-        ws_gui_app->ws_gui_menu->ws_gui_menu_edit = 
-                gtk_menu_item_new_with_label("Edit");
+                gtk_menu_item_new_with_label(_("Dictionaries"));
+        ws_gui_app->ws_gui_menu->ws_gui_menu_bookmarks =
+                gtk_menu_item_new_with_label(_("Bookmarks"));
+       ws_gui_app->ws_gui_menu->ws_gui_menu_edit = 
+                gtk_menu_item_new_with_label(_("Edit"));
         ws_gui_app->ws_gui_menu->ws_gui_menu_view = 
-                gtk_menu_item_new_with_label("View");
+                gtk_menu_item_new_with_label(_("View"));
         ws_gui_app->ws_gui_menu->ws_gui_menu_search = 
-                gtk_menu_item_new_with_label("Search");
+                gtk_menu_item_new_with_label(_("Search"));
         ws_gui_app->ws_gui_menu->ws_gui_menu_about = 
-                gtk_menu_item_new_with_label("About...");
+                gtk_menu_item_new_with_label(_("About..."));
         ws_gui_app->ws_gui_menu->ws_gui_menu_close = 
-                gtk_menu_item_new_with_label("Close");
+                gtk_menu_item_new_with_label(_("Close"));
         ws_gui_app->ws_gui_menu->ws_gui_separator = 
                 gtk_separator_menu_item_new();
         ws_gui_app->ws_gui_menu->ws_gui_separator1 = 
                 gtk_separator_menu_item_new();
 
         ws_gui_app->ws_gui_menu->ws_gui_menu_load_dict = 
-                gtk_menu_item_new_with_label("Load dictionary");
+                gtk_menu_item_new_with_label(_("Load dictionary"));
         ws_gui_app->ws_gui_menu->ws_gui_menu_select_dict = 
-                gtk_menu_item_new_with_label("Select dictionaries ...");
+                gtk_menu_item_new_with_label(_("Select dictionaries ..."));
         ws_gui_app->ws_gui_menu->ws_gui_menu_remove_dict = 
-                gtk_menu_item_new_with_label("Remove dictionaries ...");
+                gtk_menu_item_new_with_label(_("Remove dictionaries ..."));
         ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict = 
-                gtk_menu_item_new_with_label("Optimize dictionaries ...");
-                
+                gtk_menu_item_new_with_label(_("Optimize dictionaries ..."));
+
         gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0,
                         ws_gui_app->ws_gui_menu->ws_gui_menu_load_dict);
         gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0,
                         ws_gui_app->ws_gui_menu->ws_gui_menu_select_dict);
         gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0,
                         ws_gui_app->ws_gui_menu->ws_gui_menu_remove_dict);
-                
         gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0,
                         ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict);
-        gtk_widget_set_sensitive(GTK_WIDGET(
-                             ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries),
-                             TRUE);
+
+       ws_gui_app->ws_gui_menu->ws_gui_menu_open_bookmark = 
+                gtk_menu_item_new_with_label(_("Open bookmarks"));
+        ws_gui_app->ws_gui_menu->ws_gui_menu_close_bookmark = 
+                gtk_menu_item_new_with_label(_("Close bookmarks"));
+       ws_gui_app->ws_gui_menu->ws_gui_menu_add_bookmark = 
+                gtk_menu_item_new_with_label(_("Add bookmark"));
+       ws_gui_app->ws_gui_menu->ws_gui_menu_remove_bookmark = 
+                gtk_menu_item_new_with_label(_("Remove bookmark"));
+
+       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_4,
+                        ws_gui_app->ws_gui_menu->ws_gui_menu_open_bookmark);
+       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_4,
+                        ws_gui_app->ws_gui_menu->ws_gui_menu_close_bookmark);
+       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_4,
+                        ws_gui_app->ws_gui_menu->ws_gui_menu_add_bookmark);
+       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_4,
+                        ws_gui_app->ws_gui_menu->ws_gui_menu_remove_bookmark);
 
        ws_gui_app->ws_gui_menu->ws_gui_menu_copy = 
-                gtk_menu_item_new_with_label("Copy");
+                gtk_menu_item_new_with_label(_("Copy"));
        ws_gui_app->ws_gui_menu->ws_gui_menu_paste = 
-                gtk_menu_item_new_with_label("Paste");
+                gtk_menu_item_new_with_label(_("Paste"));
        ws_gui_app->ws_gui_menu->ws_gui_menu_select_all = 
-                gtk_menu_item_new_with_label("Select All");
+                gtk_menu_item_new_with_label(_("Select All"));
        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_1,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_copy);
        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_1,
@@ -297,13 +316,13 @@ void ws_gui_create_main_menu (gpointer user_data)
                        ws_gui_app->ws_gui_menu->ws_gui_menu_select_all);
 
        ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list = 
-                gtk_check_menu_item_new_with_label("Hide words list");
+                gtk_check_menu_item_new_with_label(_("Hide words list"));
        ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_in = 
-                gtk_menu_item_new_with_label("Zoom in");
+                gtk_menu_item_new_with_label(_("Zoom in"));
        ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_out = 
-                gtk_menu_item_new_with_label("Zoom out");
+                gtk_menu_item_new_with_label(_("Zoom out"));
        ws_gui_app->ws_gui_menu->ws_gui_menu_full_screen = 
-                gtk_check_menu_item_new_with_label("Full screen");
+                gtk_check_menu_item_new_with_label(_("Full screen"));
        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_2,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list);
        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_2,
@@ -314,33 +333,41 @@ void ws_gui_create_main_menu (gpointer user_data)
                        ws_gui_app->ws_gui_menu->ws_gui_menu_full_screen);
 
        ws_gui_app->ws_gui_menu->ws_gui_menu_find_word = 
-                gtk_menu_item_new_with_label("Find");
+                gtk_menu_item_new_with_label(_("Find"));
        ws_gui_app->ws_gui_menu->ws_gui_menu_find_next = 
-               gtk_menu_item_new_with_label("Find next");
-       ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev = 
-               gtk_menu_item_new_with_label("Find previous");
-       ws_gui_app->ws_gui_menu->ws_gui_menu_stop = 
-               gtk_menu_item_new_with_label("Stop");
-       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
+               gtk_menu_item_new_with_label(_("Find next"));
+        ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev = 
+               gtk_menu_item_new_with_label(_("Find previous"));
+        ws_gui_app->ws_gui_menu->ws_gui_menu_stop = 
+               gtk_menu_item_new_with_label(_("Stop"));
+        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_find_word);
-       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
+        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_find_next);
-       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
+        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev);
-       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
+        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_stop);
-       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
+
+
+       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries);
-        
-       gtk_menu_item_set_submenu(GTK_MENU_ITEM
+        gtk_menu_item_set_submenu(GTK_MENU_ITEM
                             (ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries),
                              ws_gui_app->ws_gui_menu->ws_gui_submenu_0);
-       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
+
+        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
+                       ws_gui_app->ws_gui_menu->ws_gui_menu_bookmarks);
+        gtk_menu_item_set_submenu(GTK_MENU_ITEM
+                            (ws_gui_app->ws_gui_menu->ws_gui_menu_bookmarks),
+                             ws_gui_app->ws_gui_menu->ws_gui_submenu_4);
+
+       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
                        ws_gui_app->ws_gui_menu->ws_gui_separator1);
 
-       gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
+        gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
                        ws_gui_app->ws_gui_menu->ws_gui_menu_edit);
-       gtk_menu_item_set_submenu(GTK_MENU_ITEM
+        gtk_menu_item_set_submenu(GTK_MENU_ITEM
                                  (ws_gui_app->ws_gui_menu->ws_gui_menu_edit), 
                                  ws_gui_app->ws_gui_menu->ws_gui_submenu_1);
 
@@ -355,14 +382,14 @@ void ws_gui_create_main_menu (gpointer user_data)
         gtk_menu_item_set_submenu(GTK_MENU_ITEM
                                   (ws_gui_app->ws_gui_menu->ws_gui_menu_search), 
                                   ws_gui_app->ws_gui_menu->ws_gui_submenu_3);
-                
+
         gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
                         ws_gui_app->ws_gui_menu->ws_gui_separator);
         gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
                         ws_gui_app->ws_gui_menu->ws_gui_menu_about);
         gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu,
                         ws_gui_app->ws_gui_menu->ws_gui_menu_close);
-        
+
         g_signal_connect(G_OBJECT
                          (ws_gui_app->ws_gui_menu->ws_gui_menu_load_dict),
                          "activate",
@@ -378,12 +405,31 @@ void ws_gui_create_main_menu (gpointer user_data)
                          "activate",
                          G_CALLBACK(ws_gui_dictionary_remover),
                          ws_gui_app);
-                
         g_signal_connect(G_OBJECT
                          (ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict),
                          "activate",
                          G_CALLBACK(ws_gui_dictionary_optimizer), ws_gui_app);
         g_signal_connect(G_OBJECT
+                         (ws_gui_app->ws_gui_menu->ws_gui_menu_open_bookmark),
+                         "activate",
+                         G_CALLBACK(ws_gui_dictionary_open_bookmark), 
+                         ws_gui_app);
+        g_signal_connect(G_OBJECT
+                         (ws_gui_app->ws_gui_menu->ws_gui_menu_close_bookmark),
+                         "activate",
+                         G_CALLBACK(ws_gui_dictionary_close_bookmark), 
+                         ws_gui_app);
+        g_signal_connect(G_OBJECT
+                         (ws_gui_app->ws_gui_menu->ws_gui_menu_add_bookmark),
+                         "activate",
+                         G_CALLBACK(ws_gui_dictionary_add_bookmark), 
+                         ws_gui_app);
+        g_signal_connect(G_OBJECT
+                         (ws_gui_app->ws_gui_menu->ws_gui_menu_remove_bookmark),
+                         "activate",
+                         G_CALLBACK(ws_gui_dictionary_remove_bookmark), 
+                         ws_gui_app);
+        g_signal_connect(G_OBJECT
                          (ws_gui_app->ws_gui_menu->ws_gui_menu_copy),
                          "activate", 
                          GTK_SIGNAL_FUNC(ws_gui_html_copy),
@@ -439,7 +485,8 @@ void ws_gui_create_main_menu (gpointer user_data)
                          GTK_SIGNAL_FUNC(ws_gui_search_stop),
                          ws_gui_app);
         g_signal_connect(G_OBJECT
-                         (ws_gui_app->ws_gui_menu->ws_gui_menu_about), "activate",
+                         (ws_gui_app->ws_gui_menu->ws_gui_menu_about), 
+                         "activate",
                          G_CALLBACK(ws_gui_about_application),
                          ws_gui_app);
         g_signal_connect(G_OBJECT
@@ -453,11 +500,17 @@ void ws_gui_create_main_menu (gpointer user_data)
                          "activate",
                          GTK_SIGNAL_FUNC(ws_gui_check_clipboard),
                          ws_gui_app);
+
+       g_signal_connect(G_OBJECT
+                         (ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries),
+                         "activate",
+                         GTK_SIGNAL_FUNC(ws_gui_dict_availablity),
+                         ws_gui_app);
  
         hildon_window_set_menu(HILDON_WINDOW(ws_gui_app->ws_gui_hildon_window),
                                GTK_MENU(
                                     ws_gui_app->ws_gui_menu->ws_gui_main_menu));
-                
+
         gtk_widget_set_sensitive(GTK_WIDGET
                                  (ws_gui_app->ws_gui_menu->ws_gui_menu_stop),
                                  FALSE);
@@ -480,20 +533,20 @@ void ws_gui_create_main_menu (gpointer user_data)
 void ws_gui_create_popup_menu (gpointer user_data)
 {
        WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-           
+
        ws_gui_app->ws_gui_menu->ws_gui_popup_menu = gtk_menu_new();
        ws_gui_app->ws_gui_menu->ws_gui_popup_submenu = gtk_menu_new();
        ws_gui_app->ws_gui_menu->ws_gui_separator = gtk_separator_menu_item_new();
-              
+
        struct _GtkHTML *tmp = (struct _GtkHTML *)(ws_gui_app->ws_gui_html);
-                
+
        ws_gui_app->ws_gui_menu->ws_gui_popup_search = 
-                gtk_menu_item_new_with_label("Search");
+                gtk_menu_item_new_with_label(_("Search"));
        gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_menu),
                        ws_gui_app->ws_gui_menu->ws_gui_popup_search);
        gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu),
                         gtk_separator_menu_item_new());
-                
+
        if (html_engine_is_selection_active(tmp->engine) == TRUE)
        {
                gtk_widget_set_sensitive(GTK_WIDGET
@@ -508,37 +561,37 @@ void ws_gui_create_popup_menu (gpointer user_data)
        }
 
        ws_gui_app->ws_gui_menu->ws_gui_popup_copy = 
-                gtk_menu_item_new_with_label("Copy");
+                gtk_menu_item_new_with_label(_("Copy"));
        gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_submenu),
                        ws_gui_app->ws_gui_menu->ws_gui_popup_copy);
 
        ws_gui_app->ws_gui_menu->ws_gui_popup_paste = 
-                gtk_menu_item_new_with_label("Paste");
+                gtk_menu_item_new_with_label(_("Paste"));
        gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_submenu),
                        ws_gui_app->ws_gui_menu->ws_gui_popup_paste);
 
        ws_gui_app->ws_gui_menu->ws_gui_popup_select_all = 
-                gtk_menu_item_new_with_label("Select All");
+                gtk_menu_item_new_with_label(_("Select All"));
        gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_submenu),
                        ws_gui_app->ws_gui_menu->ws_gui_popup_select_all);
 
        gtk_widget_show_all(ws_gui_app->ws_gui_menu->ws_gui_popup_submenu);
-                
+
                 ws_gui_app->ws_gui_menu->ws_gui_popup_edit = 
-                gtk_menu_item_new_with_label ("Edit");
+                gtk_menu_item_new_with_label (_("Edit"));
        gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu),
                         ws_gui_app->ws_gui_menu->ws_gui_popup_edit);
 
        gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu),
                         ws_gui_app->ws_gui_menu->ws_gui_separator);
-                
+
        ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_in = 
-                gtk_menu_item_new_with_label ("Zoom in");
+                gtk_menu_item_new_with_label (_("Zoom in"));
        gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu),
                         ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_in);
 
        ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_out =
-                gtk_menu_item_new_with_label ("Zoom out");
+                gtk_menu_item_new_with_label (_("Zoom out"));
        gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu),
                         ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_out);
 
@@ -576,7 +629,7 @@ void ws_gui_create_popup_menu (gpointer user_data)
                        "activate",
                        G_CALLBACK(ws_gui_html_zoom_out),
                        ws_gui_app);
-                
+
       if (gtk_clipboard_wait_for_text(ws_gui_app->ws_gui_clipboard) != NULL)
       {
                gtk_widget_set_sensitive(GTK_WIDGET
@@ -613,7 +666,7 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
         GtkWidget *scrolledwindow1;
         GtkWidget *viewport1;
         GtkWidget *vbox1;
-        
+
         GtkWidget *checkbutton;
         GtkWidget *cancel_button;
         GtkWidget *ok_button;
@@ -622,7 +675,7 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
         gchar* path;
         const gchar* name;
         GArray *checkboxes;
-                
+
         checkboxes = g_array_new (TRUE, TRUE, sizeof(GtkWidget*));
 
         if (gconf_client_dir_exists(ws_gui_app->client, GCONF_PATH, NULL) == TRUE)
@@ -639,14 +692,14 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
         }
 
         dialog1 = gtk_dialog_new ();
-        gtk_window_set_title (GTK_WINDOW (dialog1), ("Choose dictionaries"));
+        gtk_window_set_title (GTK_WINDOW (dialog1), (_("Choose dictionaries")));
         gtk_window_set_type_hint (GTK_WINDOW (dialog1),
                                   GDK_WINDOW_TYPE_HINT_DIALOG);
         gtk_window_set_default_size(GTK_WINDOW (dialog1), 300, 200);
-                
+
         dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
         gtk_widget_show (dialog_vbox1);
-                
+
         scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
         gtk_widget_show (scrolledwindow1);
         gtk_box_pack_start (GTK_BOX (dialog_vbox1),
@@ -654,22 +707,22 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
                             TRUE,
                             TRUE,
                             0);
-                
+
         viewport1 = gtk_viewport_new (NULL, NULL);
         gtk_widget_show (viewport1);
         gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1);
-                
+
         vbox1 = gtk_vbox_new (FALSE, 0);
         gtk_widget_show (vbox1);
         gtk_container_add (GTK_CONTAINER (viewport1), vbox1);
-              
+
         for (i=0; i< g_slist_length(ws_gui_app->directories);i++)
         {
                string = (gchar*)g_slist_nth_data(ws_gui_app->directories, i); 
                name = g_path_get_basename(string);
                checkbutton = gtk_check_button_new_with_label(name);
                path = g_strconcat(string, "/active", NULL);
-                                
+
                if (gconf_client_get_bool(ws_gui_app->client, path, NULL) == TRUE)
                {
                        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
@@ -682,24 +735,24 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
                                                     checkbutton),
                                                     FALSE);
                }
-                                
+
                g_array_append_val(checkboxes, checkbutton);
                gtk_box_pack_start (GTK_BOX (vbox1), checkbutton, FALSE, FALSE, 0);
                gtk_widget_show (checkbutton);
        }
-                
-       cancel_button = gtk_button_new_from_stock ("cancel");
+
+       cancel_button = gtk_button_new_from_stock (_("cancel"));
        gtk_widget_show (cancel_button);
        gtk_dialog_add_action_widget (GTK_DIALOG (dialog1),
                                      cancel_button,
                                      GTK_RESPONSE_CANCEL);
-                
-       ok_button = gtk_button_new_from_stock ("ok");
+
+       ok_button = gtk_button_new_from_stock (_("ok"));
        gtk_widget_show (ok_button);
        gtk_dialog_add_action_widget(GTK_DIALOG (dialog1),
                                     ok_button,
                                     GTK_RESPONSE_OK);
-                
+
        i = gtk_dialog_run(GTK_DIALOG(dialog1));
 
        if (i == GTK_RESPONSE_OK) 
@@ -740,7 +793,7 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
                                                      NULL);
                        }
                }
-                
+
                ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_CONFIG_CHANGED);
                gtk_widget_destroy (dialog1);
        }
@@ -748,7 +801,7 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
        {
                gtk_widget_destroy (dialog1);
        }
-                
+
        g_slist_free(ws_gui_app->directories);
 }
 
@@ -775,7 +828,7 @@ void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data)
         gchar* path;
         const gchar* name;
         GArray *checkboxes;
-                
+
         checkboxes = g_array_new (TRUE, TRUE, sizeof(GtkWidget*));
 
         if (gconf_client_dir_exists(ws_gui_app->client, GCONF_PATH, NULL) == TRUE)
@@ -793,7 +846,7 @@ void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data)
         {
                 string = (gchar*)g_slist_nth_data(ws_gui_app->directories, i); 
                 name = g_path_get_basename(string);
-                                
+
                 path = g_strconcat(string, "/optimized", NULL);
                 if (gconf_client_get_bool (ws_gui_app->client, path, NULL) == FALSE)
                 {
@@ -808,26 +861,26 @@ void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data)
                                    GTK_DIALOG_DESTROY_WITH_PARENT,
                                    GTK_MESSAGE_ERROR,
                                    GTK_BUTTONS_OK,
-                                   "There are no dictionaries to optimize");
+                                   _("There are no dictionaries to optimize"));
                gtk_widget_show_all(ws_gui_app->ws_message_dialog);
                if (gtk_dialog_run (GTK_DIALOG (
                         ws_gui_app->ws_message_dialog)) == GTK_RESPONSE_OK)
                {
                         gtk_widget_destroy(ws_gui_app->ws_message_dialog);
-               }                
-       }            
+               }
+       }
        else
        {
                 dialog1 = gtk_dialog_new ();
                 gtk_window_set_title(GTK_WINDOW (dialog1),
-                                     ("Choose dictionaries"));
+                                     (_("Choose dictionaries")));
                 gtk_window_set_type_hint(GTK_WINDOW (dialog1),
                                          GDK_WINDOW_TYPE_HINT_DIALOG);
                 gtk_window_set_default_size(GTK_WINDOW (dialog1), 300, 200);
-                
+
                 dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
                 gtk_widget_show (dialog_vbox1);
-                
+
                 scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
                 gtk_widget_show (scrolledwindow1);
                 gtk_box_pack_start(GTK_BOX (dialog_vbox1),
@@ -835,11 +888,11 @@ void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data)
                                    TRUE,
                                    TRUE,
                                    0);
-                
+
                 viewport1 = gtk_viewport_new (NULL, NULL);
                 gtk_widget_show (viewport1);
                 gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1);
-                
+
                 vbox1 = gtk_vbox_new (FALSE, 0);
                 gtk_widget_show (vbox1);
                 gtk_container_add (GTK_CONTAINER (viewport1), vbox1);
@@ -855,12 +908,12 @@ void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data)
                                        0);
                         gtk_widget_show(g_array_index(checkboxes, GtkWidget*, i));
                 }
-                cancel_button = gtk_button_new_from_stock ("cancel");
+                cancel_button = gtk_button_new_from_stock (_("cancel"));
                 gtk_widget_show (cancel_button);
                 gtk_dialog_add_action_widget(GTK_DIALOG (dialog1),
                                              cancel_button,
                                              GTK_RESPONSE_CANCEL);
-                ok_button = gtk_button_new_from_stock ("ok");
+                ok_button = gtk_button_new_from_stock (_("ok"));
                 gtk_widget_show (ok_button);
                 gtk_dialog_add_action_widget(GTK_DIALOG (dialog1),
                                              ok_button,
@@ -930,11 +983,11 @@ void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data)
 void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data)
 {
         WSGuiApp* ws_gui_app=(WSGuiApp*)user_data;
-                               
+
         GtkWidget *dialog;
         GtkWidget *dialog2;
 
-        dialog = gtk_file_chooser_dialog_new("Load dictionary",
+        dialog = gtk_file_chooser_dialog_new(_("Load dictionary"),
                                    GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
                                    GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_OK,
                                    GTK_RESPONSE_ACCEPT,
@@ -943,10 +996,9 @@ void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data)
                                    NULL);
         gtk_window_set_default_size(GTK_WINDOW (dialog), 300, 300);
         gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(dialog), TRUE);
-                
+
         gtk_widget_show_all(GTK_WIDGET(dialog));
-                
-                
+
         if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
         { 
                 gchar *filename;
@@ -956,14 +1008,14 @@ void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data)
                 gchar *filepath;
 
                 gchar* tmp;
-                
+
                 filename = gtk_file_chooser_get_filename(
                                                      GTK_FILE_CHOOSER (dialog));
                 name = g_path_get_basename(filename);
                 len = strlen(filename) - strlen(name) -1;
                 tmp = g_strndup (filename, len);
                 tmp = g_path_get_basename(tmp);
-                                
+
                 if (g_str_has_suffix(name, ".xdxf"))
                 {
                         len = strlen(filename) - strlen(name) -1;
@@ -973,22 +1025,23 @@ void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data)
                                                 path,
                                                 filepath,
                                                 NULL);
-                        g_free(path); path = NULL;
+                        g_free(path); 
+                       path = NULL;
                         path = g_strconcat(GCONF_PATH,
                                            "/",
                                            tmp,
                                            "/active",
                                            NULL);
                         gtk_widget_destroy (dialog);
-                                                
+
                         dialog2 = gtk_message_dialog_new(GTK_WINDOW(
                                               ws_gui_app->ws_gui_hildon_window),
                                               GTK_DIALOG_DESTROY_WITH_PARENT,
                                               GTK_MESSAGE_QUESTION,
                                               GTK_BUTTONS_YES_NO,
-                "Would you like to activate this dictionary for use from now?");
+                _("Would you like to activate this dictionary for use from now?"));
                         gtk_widget_show_all(GTK_WIDGET(dialog2));
-                
+
                         if (gtk_dialog_run (GTK_DIALOG (dialog2)) ==
                                  GTK_RESPONSE_YES)
                         {
@@ -1005,19 +1058,20 @@ void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data)
                                                       NULL);
                         }
                         gtk_widget_destroy (dialog2);
-                        g_free(path); path = NULL;               
-                        
+                        g_free(path); 
+                       path = NULL;
                         path = g_strconcat(GCONF_PATH,
                                            "/",
                                            tmp,
                                            "/optimized",
-                                            NULL);                                
+                                            NULL);
                         dialog2 = gtk_message_dialog_new(
                                    GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
                                    GTK_DIALOG_DESTROY_WITH_PARENT,
                                    GTK_MESSAGE_QUESTION,
                                    GTK_BUTTONS_YES_NO,
-                                   "Would you like to optimize this dictionary to make it faster to search within?");
+                                   _("Would you like to optimize this dictionary to make it faster to search within?"));
                         gtk_widget_show_all(GTK_WIDGET(dialog2));
 
                         if (gtk_dialog_run (GTK_DIALOG (dialog2)) 
@@ -1036,22 +1090,21 @@ void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data)
                                                       NULL);
                         }
                         gtk_widget_destroy (dialog2);
-                        
+
                         ws_dbus_notify(ws_gui_app->dbus_data,
                                        WS_DBUS_INFO_CONFIG_CHANGED);
                         gtk_infoprint(GTK_WINDOW(
                                       ws_gui_app->ws_gui_hildon_window),
-                                      "New dictionary has been added");
+                                      _("New dictionary has been added"));
                 }
                 else
                 {
                         gtk_widget_destroy (dialog);
                         gtk_infoprint(GTK_WINDOW(
                                       ws_gui_app->ws_gui_hildon_window),
-                                      "Wrong dictionary file");
+                                      _("Wrong dictionary file"));
                 }
-                                
-                                
+
        }
        else 
        {
@@ -1083,7 +1136,7 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
         gchar* path;
         const gchar* name;
         GArray *checkboxes;
-                
+
         checkboxes = g_array_new (TRUE, TRUE, sizeof(GtkWidget*));
 
         if (gconf_client_dir_exists(ws_gui_app->client, GCONF_PATH, NULL) == TRUE)
@@ -1100,14 +1153,14 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
         }
 
         dialog1 = gtk_dialog_new ();
-        gtk_window_set_title (GTK_WINDOW (dialog1), ("Remove dictionaries"));
+        gtk_window_set_title (GTK_WINDOW (dialog1), (_("Remove dictionaries")));
         gtk_window_set_type_hint (GTK_WINDOW (dialog1),
                                   GDK_WINDOW_TYPE_HINT_DIALOG);
         gtk_window_set_default_size(GTK_WINDOW (dialog1), 300, 200);
-                
+
         dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
         gtk_widget_show (dialog_vbox1);
-                
+
         scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
         gtk_widget_show (scrolledwindow1);
         gtk_box_pack_start (GTK_BOX (dialog_vbox1),
@@ -1115,21 +1168,21 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
                             TRUE,
                             TRUE,
                             0);
-                
+
         viewport1 = gtk_viewport_new (NULL, NULL);
         gtk_widget_show (viewport1);
         gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1);
-                
+
         vbox1 = gtk_vbox_new (FALSE, 0);
         gtk_widget_show (vbox1);
         gtk_container_add (GTK_CONTAINER (viewport1), vbox1);
-              
+
         for (i=0; i< g_slist_length(ws_gui_app->directories);i++)
         {
                 string = (gchar*)g_slist_nth_data(ws_gui_app->directories, i); 
                 name = g_path_get_basename(string);
                 checkbutton = gtk_check_button_new_with_label(name);
-                 
+
                 g_array_append_val(checkboxes, checkbutton);
                 gtk_box_pack_start (GTK_BOX (vbox1),
                                     checkbutton,
@@ -1138,19 +1191,19 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
                                     0);
                 gtk_widget_show (checkbutton);
         }
-                
-        cancel_button = gtk_button_new_from_stock ("cancel");
+
+        cancel_button = gtk_button_new_from_stock (_("cancel"));
         gtk_widget_show (cancel_button);
         gtk_dialog_add_action_widget (GTK_DIALOG (dialog1),
                                       cancel_button,
                                       GTK_RESPONSE_CANCEL);
-                
-        ok_button = gtk_button_new_from_stock ("remove selected");
+
+        ok_button = gtk_button_new_from_stock (_("remove selected"));
         gtk_widget_show (ok_button);
         gtk_dialog_add_action_widget(GTK_DIALOG (dialog1),
                                      ok_button,
                                      GTK_RESPONSE_OK);
-                
+
         i = gtk_dialog_run(GTK_DIALOG(dialog1));
 
         if (i == GTK_RESPONSE_OK) 
@@ -1160,7 +1213,7 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
                         if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
                             g_array_index(checkboxes, GtkWidget *, i))) == TRUE)
                         {
-                
+
                                 name = gtk_button_get_label(GTK_BUTTON(
                                     g_array_index(checkboxes, GtkWidget *, i)));
                                 path=g_strconcat(GCONF_PATH, "/", name, NULL);
@@ -1170,7 +1223,7 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
                                              NULL);
                         } 
                  }
-                
+
                 ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_CONFIG_CHANGED);
                 gtk_widget_destroy (dialog1);
         }
@@ -1178,7 +1231,7 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
         {
                 gtk_widget_destroy (dialog1);
         }
-                
+
         g_slist_free(ws_gui_app->directories);
 }
 
@@ -1208,7 +1261,7 @@ void ws_gui_about_application(GtkMenuItem *menuitem, gpointer user_data)
         GtkWidget *button1;
 
         about_dialog = gtk_dialog_new ();
-        gtk_window_set_title (GTK_WINDOW (about_dialog), "About");
+        gtk_window_set_title (GTK_WINDOW (about_dialog), _("About"));
         gtk_window_set_default_size(GTK_WINDOW (about_dialog), 350, 200);
                 
         dialog_vbox1 = GTK_DIALOG (about_dialog)->vbox;
@@ -1299,7 +1352,7 @@ GtkWidget* licence_dialog(gpointer user_data)
         GtkWidget *button2;
 
         license_dialog = gtk_dialog_new ();
-        gtk_window_set_title (GTK_WINDOW (license_dialog), "Licence");
+        gtk_window_set_title (GTK_WINDOW (license_dialog), _("Licence"));
         gtk_window_set_default_size(GTK_WINDOW (license_dialog), 500, 300);
                 
         license_vbox1 = GTK_DIALOG (license_dialog)->vbox;
@@ -1320,13 +1373,13 @@ GtkWidget* licence_dialog(gpointer user_data)
         gtk_widget_modify_font(GTK_WIDGET(textview1), ws_gui_app->p);
         gtk_container_add (GTK_CONTAINER (scrolledwindow1), textview1);
         gtk_text_buffer_set_text (gtk_text_view_get_buffer(GTK_TEXT_VIEW (textview1)), "Terms of use\n\nREAD THE TERMS OF USE CAREFULLY BEFORE INSTALALTION OF THIS SOFTWARE. BY\nINSTALALTION OF THIS SOFTWARE, YOU AGREE TO THE FOLLOWING TERMS OF USE.\n\n1. LICENSE TO USE. ComArch grants you a non-exclusive and non-transferable\nlicense for the internal use only of the accompanying software and\ndocumentation and any error corrections provided by ComArch (collectively \"Software\"), by the one user.\n\n2. RESTRICTIONS. Software is confidential and copyrighted. Title to Software\nand all associated intellectual property rights is retained by ComArch\nand/or its licensors. Unless enforcement is prohibited by applicable law,\nyou may not modify, decompile, or reverse engineer Software. You acknowledge\nthat Software is not designed, licensed or intended for use in the design,\nconstruction, operation or maintenance of any nuclear facility. Sun ComArch\ndisclaims any express or implied warranty of fitness for such uses. No\nright, title or interest in or to any trademark, service mark, logo or trade\nname of ComArch or its licensors is granted under this terms of use.\n\n3. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS AGREEMENT TERMS OF USE,\nALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING\nANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR\nNON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS\nARE HELD TO BE LEGALLY INVALID.\n\n4. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT\nWILL COMARCH OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR\nDATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE\nDAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT\nOF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF COMARCH\nHAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will\nComArch's liability to you, whether in contract, tort (including\nnegligence), or otherwise, exceed []. The foregoing limitations will apply\neven if the above stated warranty fails of its essential purpose.\n\n5. Termination. This license is effective until terminated. You may\nterminate this license at any time by destroying all\ncopies of Software.\nThis license will terminate immediately without notice from ComArch if you\nfail to comply with any provision of this license. Upon Termination, you\nmust destroy all copies of Software.\n\n6. Export Regulations. All Software and technical data delivered under this\nterms of use are subject to Polish export control laws and may be subject to\nexport or import regulations in other countries. You agree to comply\nstrictly with all such laws and regulations and acknowledge that you have\nthe responsibility to obtain such licenses to export, re-export, or import\nas may be required after delivery to you.\n\n7. Governing Law. Any action related to this license will be governed by\nPolish Law.\n\n8. Severability. If any provision of this terms of use is held to be\nunenforceable, this terms of use will remain in effect with the provision\nomitted, unless omission would frustrate the intent of the parties, in which\ncase this terms of use will immediately terminate.\n\n9. Integration. This document is the entire  agreement between you and\nComArch relating to its subject matter. It supersedes all prior or\ncontemporaneous oral or written communications, proposals, representations\nand warranties and prevails over any conflicting or additional\nterms of any\nquote, order, acknowledgment, or other communication between the parties\nrelating to its subject matter during the term of these terms of use. No\nmodification of this Agreement will be binding, unless in writing and signed\nby an authorized representative of each party.", -1);
-                
-        button1 = gtk_button_new_with_label("Agree");
+
+        button1 = gtk_button_new_with_label(_("Agree"));
         gtk_dialog_add_action_widget(GTK_DIALOG (license_dialog),
                                      button1,
                                      GTK_RESPONSE_OK);
-               
-        button2 = gtk_button_new_with_label("Disagree");
+
+        button2 = gtk_button_new_with_label(_("Disagree"));
         gtk_dialog_add_action_widget(GTK_DIALOG (license_dialog),
                                      button2,
                                      GTK_RESPONSE_CLOSE);