CVS: sylpheed-claws/src compose.c,1.382.2.265,1.382.2.266 compose.h,1.50.2.23,1.50.2.24
Colin Leroy <[email protected]>
| Newsgroups | gmane.mail.sylpheed.claws.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/sylpheed-claws/sylpheed-claws/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12988/src
Modified Files:
Tag: gtk2
compose.c compose.h
Log Message:
2006-04-19 [colin] 2.1.1cvs15
* src/compose.c
* src/compose.h
* src/gtk/gtkaspell.c
* src/gtk/gtkaspell.h
Put back Options menu in Spelling/
* src/gtk/quicksearch.c
Don't search, and show error, if the
advanced search has a syntax error
Index: compose.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/compose.c,v
retrieving revision 1.382.2.265
retrieving revision 1.382.2.266
diff -u -r1.382.2.265 -r1.382.2.266
--- compose.c 18 Apr 2006 16:21:10 -0000 1.382.2.265
+++ compose.c 19 Apr 2006 17:28:39 -0000 1.382.2.266
@@ -646,6 +646,9 @@
NULL, compose_check_backwards , 0, NULL},
{N_("/_Spelling/_Forward to next misspelled word"),
NULL, compose_check_forwards_go, 0, NULL},
+ {N_("/_Spelling/---"), NULL, NULL, 0, "<Separator>"},
+ {N_("/_Spelling/Options"),
+ NULL, NULL, 0, "<Branch>"},
#endif
{N_("/_Options"), NULL, NULL, 0, "<Branch>"},
{N_("/_Options/Privacy System"), NULL, NULL, 0, "<Branch>"},
@@ -5561,6 +5564,45 @@
return FALSE;
}
+#if USE_ASPELL
+static void compose_spell_menu_changed(void *data)
+{
+ Compose *compose = (Compose *)data;
+ GSList *items;
+ GtkWidget *menuitem;
+ GtkWidget *parent_item;
+ GtkMenu *menu = gtk_menu_new();
+ GtkItemFactory *ifactory = gtk_item_factory_from_widget(compose->menubar);
+ GSList *spell_menu;
+
+ parent_item = gtk_item_factory_get_item(ifactory,
+ "/Spelling/Options");
+
+ /* setting the submenu removes /Spelling/Options from the factory
+ * so we need to save it */
+
+ if (parent_item == NULL) {
+ parent_item = compose->aspell_options_menu;
+ gtk_menu_item_remove_submenu(GTK_MENU_ITEM(parent_item));
+ } else
+ compose->aspell_options_menu = parent_item;
+
+ spell_menu = gtkaspell_make_config_menu(compose->gtkaspell);
+
+ spell_menu = g_slist_reverse(spell_menu);
+ for (items = spell_menu;
+ items; items = items->next) {
+ menuitem = GTK_MENU_ITEM(items->data);
+ gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), GTK_WIDGET(menuitem));
+ gtk_widget_show(GTK_WIDGET(menuitem));
+ }
+ g_slist_free(spell_menu);
+
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(parent_item), GTK_WIDGET(menu));
+
+}
+#endif
+
static Compose *compose_create(PrefsAccount *account, ComposeMode mode,
gboolean batch)
{
@@ -5886,7 +5928,9 @@
prefs_common.recheck_when_changing_dict,
prefs_common.use_alternate,
GTK_TEXT_VIEW(text),
- GTK_WINDOW(compose->window));
+ GTK_WINDOW(compose->window),
+ compose_spell_menu_changed,
+ compose);
if (!gtkaspell) {
alertpanel_error(_("Spell checker could not "
"be started.\n%s"),
@@ -5906,6 +5950,7 @@
}
}
compose->gtkaspell = gtkaspell;
+ compose_spell_menu_changed(compose);
#endif
compose_select_account(compose, account, TRUE);
Index: compose.h
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/compose.h,v
retrieving revision 1.50.2.23
retrieving revision 1.50.2.24
diff -u -r1.50.2.23 -r1.50.2.24
--- compose.h 16 Mar 2006 19:39:34 -0000 1.50.2.23
+++ compose.h 19 Apr 2006 17:28:39 -0000 1.50.2.24
@@ -208,6 +208,7 @@
#if USE_ASPELL
/* GNU/aspell spell checker */
GtkAspell *gtkaspell;
+ GtkWidget *aspell_options_menu;
#endif
/* Priority */
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642