Fixed bug with dictionary menu list and removed unnecessary code in suggestion menu...
authorMelvin Hadasht <melvin.hadasht@free.fr>
Mon, 14 Oct 2002 14:48:31 +0000 (14:48 +0000)
committerMelvin Hadasht <melvin.hadasht@free.fr>
Mon, 14 Oct 2002 14:48:31 +0000 (14:48 +0000)
ChangeLog.claws
configure.in
src/gtkaspell.c

index 1438f907ccab73501fc76ec559ba6cda4f0f8e1b..747439d15d1d80309d13127da74e651bfbb2abfe 100644 (file)
@@ -1,3 +1,11 @@
+2002-10-14 [melvin]    0.8.5claws34
+
+       * src/gtkaspell.c
+               Fixed bug in dictionary list context menu where
+               "More..." pointed to an emtpy submenu if the
+               number of dictionaries is a multiple of 15
+               Removed unneeded code in suggestions list creation
+
 2002-10-14 [paul]      0.8.5claws33
 
        * po/bg.po
index d9ab7d05d38ff4dce6cc45211bf4863fc9503136..55ce3b1ac7476ab18345fe25191081f41e927ca8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws33
+EXTRA_VERSION=claws34
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index b9276c12a440dfe3acbc8010387c01f5b08fc76d..2bc6d2a8fc6fed43267bf41d823d71a892af1373 100644 (file)
@@ -1749,17 +1749,7 @@ static GtkMenu *make_sug_menu(GtkAspell *gtkaspell)
                gint count = 0;
                
                do {
-                       if (l->data == NULL && l->next != NULL) {
-                               count = 0;
-                               curmenu = gtk_menu_new();
-                               item = gtk_menu_item_new_with_label(_("Others..."));
-                               gtk_widget_show(item);
-                               gtk_menu_append(GTK_MENU(curmenu), item);
-                               gtk_menu_item_set_submenu(GTK_MENU_ITEM(item),
-                                                         curmenu);
-
-                               l = l->next;
-                       } else if (count > MENUCOUNT) {
+                       if (count == MENUCOUNT) {
                                count -= MENUCOUNT;
 
                                item = gtk_menu_item_new_with_label(_("More..."));
@@ -1911,6 +1901,19 @@ static void populate_submenu(GtkAspell *gtkaspell, GtkWidget *menu)
                
                for (tmp = gtkaspellcheckers->dictionary_list; tmp != NULL; 
                                tmp = g_slist_next(tmp)) {
+                       if (count == MENUCOUNT) {
+                               GtkWidget *newmenu;
+                               
+                               newmenu = gtk_menu_new();
+                               item = gtk_menu_item_new_with_label(_("More..."));
+                               gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), 
+                                                         newmenu);
+                               
+                               gtk_menu_append(GTK_MENU(curmenu), item);
+                               gtk_widget_show(item);
+                               curmenu = newmenu;
+                               count = 0;
+                       }
                        dict = (Dictionary *) tmp->data;
                        item = gtk_check_menu_item_new_with_label(dict->dictname);
                        gtk_object_set_data(GTK_OBJECT(item), "dict_name",
@@ -1930,20 +1933,6 @@ static void populate_submenu(GtkAspell *gtkaspell, GtkWidget *menu)
                        gtk_menu_append(GTK_MENU(curmenu), item);
                        
                        count++;
-                       
-                       if (count == MENUCOUNT) {
-                               GtkWidget *newmenu;
-                               
-                               newmenu = gtk_menu_new();
-                               item = gtk_menu_item_new_with_label(_("More..."));
-                               gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), 
-                                                         newmenu);
-                               
-                               gtk_menu_append(GTK_MENU(curmenu), item);
-                               gtk_widget_show(item);
-                               curmenu = newmenu;
-                               count = 0;
-                       }
                }
         }  
 }