bug 92 has been fixed.
authorgadomska_anna <gadomska.anna@gmail.com>
Thu, 17 Jan 2008 09:12:48 +0000 (09:12 +0000)
committergadomska_anna <gadomska.anna@gmail.com>
Thu, 17 Jan 2008 09:12:48 +0000 (09:12 +0000)
git-svn-id: file:///svnroot/mdictionary/trunk@237 5bde0345-f819-0410-ac75-e5045f9217cc

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

index 998c84c..3736201 100644 (file)
@@ -295,6 +295,7 @@ struct WSGuiAppData {
        gboolean no_words_found;
        
        gboolean first_run;
+       gboolean dictionary_selection_changed;
 
 };
 
index 1d08bdb..60ca83d 100644 (file)
@@ -604,6 +604,13 @@ void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data)
                
                //ws_gui_fill_html(" ", ws_gui_app);
                //ws_gui_app->html_flag = FALSE;
+               if (ws_gui_app->dictionary_selection_changed == TRUE)
+               {
+                       ws_gui_clear_list(ws_gui_app->ws_gui_w_list->ws_gui_store, ws_gui_app);
+                       ws_gui_fill_html("", ws_gui_app);
+                       ws_gui_app->dictionary_selection_changed = FALSE;
+               }
+               
                g_free(ws_gui_app->last_word);
                ws_gui_app->last_word = NULL;
                ws_gui_app->no_words_found = TRUE;
@@ -620,6 +627,8 @@ void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data)
        }
        g_array_free(tmp, TRUE);
 
+       
+       ws_gui_app->dictionary_selection_changed = FALSE;
        timer(TIMER_STOP, (gchar*)__FUNCTION__);
 }
 
index 8eb667c..1a06b83 100644 (file)
@@ -82,6 +82,8 @@ void ws_gui_create_window(gpointer user_data)
        ws_gui_app->first_run = TRUE; 
        /*indicates that no words match a given search pattern*/
        ws_gui_app->no_words_found = TRUE;
+       /*indicates that no words match a given search pattern*/
+       ws_gui_app->dictionary_selection_changed = FALSE;
        
        ws_gui_app->zoom = ZOOM_DEFAULT;
 
@@ -1017,6 +1019,8 @@ void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data)
                ws_dbus_notify(ws_gui_app->dbus_data, 
                                WS_DBUS_INFO_CONFIG_CHANGED);
 
+               ws_gui_app->dictionary_selection_changed = TRUE;
+
                if(ws_gui_app->ws_gui_history->len >= 0)
                {
                ws_gui_clear_array(ws_gui_app->ws_gui_history);
@@ -1533,6 +1537,8 @@ void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data)
 
                ws_dbus_notify(ws_gui_app->dbus_data, 
                        WS_DBUS_INFO_CONFIG_CHANGED);
+       
+               ws_gui_app->dictionary_selection_changed = TRUE;
 
                if (tmp)
                        {