select all option is dimmed if there is nothing to select in translation area (change...
[mdictionary] / src / gui / src / ws_gui_layout.c
index 481e1dd..06ffb4b 100644 (file)
@@ -51,7 +51,8 @@ void ws_gui_create_window(gpointer user_data)
         ws_gui_app->ws_gui_sel_flag = FALSE;
        ws_gui_app->bookmark_mode = FALSE;
        ws_gui_app->bookmark_avail = TRUE;
-       
+       ws_gui_app->html_flag = TRUE;
+
        ws_gui_app->zoom = ZOOM_DEFAULT;
 
         ws_gui_app->timer = g_timer_new();
@@ -650,7 +651,18 @@ void ws_gui_create_popup_menu (gpointer user_data)
                                FALSE);
        }
        
-       
+       if (ws_gui_app->html_flag == FALSE)
+       {
+               gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_popup_select_all),
+                               FALSE);
+       }
+       else
+       {
+               gtk_widget_set_sensitive(GTK_WIDGET
+                               (ws_gui_app->ws_gui_menu->ws_gui_popup_select_all),
+                               TRUE);
+       }       
        
        gtk_widget_show_all(ws_gui_app->ws_gui_menu->ws_gui_popup_menu);