Revision: 484 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=484&view=rev Author: eht16 Date: 2009-02-17 14:10:47 +0000 (Tue, 17 Feb 2009)
Log Message: ----------- Display accelerator on the 'Default' menu item.
Modified Paths: -------------- trunk/spellcheck/ChangeLog trunk/spellcheck/src/gui.c trunk/spellcheck/src/scplugin.c trunk/spellcheck/src/scplugin.h
Modified: trunk/spellcheck/ChangeLog =================================================================== --- trunk/spellcheck/ChangeLog 2009-02-17 13:58:58 UTC (rev 483) +++ trunk/spellcheck/ChangeLog 2009-02-17 14:10:47 UTC (rev 484) @@ -9,6 +9,8 @@ typing. These changes should increase the usability and accuracy of the 'check while typing' feature while not being much slower (if ever). + * src/gui.c, src/scplugin.c, src/scplugin.h: + Display accelerator on the 'Default' menu item.
2009-02-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/spellcheck/src/gui.c =================================================================== --- trunk/spellcheck/src/gui.c 2009-02-17 13:58:58 UTC (rev 483) +++ trunk/spellcheck/src/gui.c 2009-02-17 14:10:47 UTC (rev 484) @@ -427,7 +427,7 @@
GtkWidget *gui_create_menu(GtkWidget *sp_item) { - GtkWidget *menu, *subitem; + GtkWidget *menu, *menu_item; guint i;
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), sp_item); @@ -435,17 +435,15 @@ menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(sp_item), menu);
- subitem = gtk_menu_item_new_with_mnemonic(_("Default")); - gtk_container_add(GTK_CONTAINER(menu), subitem); - g_signal_connect(subitem, "activate", G_CALLBACK(menu_item_activate_cb), NULL); + sc->submenu_item_default = gtk_menu_item_new_with_mnemonic(_("Default")); + gtk_container_add(GTK_CONTAINER(menu), sc->submenu_item_default); + g_signal_connect(sc->submenu_item_default, "activate", G_CALLBACK(menu_item_activate_cb), NULL);
- subitem = gtk_separator_menu_item_new(); - gtk_container_add(GTK_CONTAINER(menu), subitem); + menu_item = gtk_separator_menu_item_new(); + gtk_container_add(GTK_CONTAINER(menu), menu_item);
for (i = 0; i < sc->dicts->len; i++) { - GtkWidget *menu_item; - menu_item = gtk_menu_item_new_with_label(g_ptr_array_index(sc->dicts, i)); gtk_container_add(GTK_CONTAINER(menu), menu_item); g_signal_connect(menu_item, "activate",
Modified: trunk/spellcheck/src/scplugin.c =================================================================== --- trunk/spellcheck/src/scplugin.c 2009-02-17 13:58:58 UTC (rev 483) +++ trunk/spellcheck/src/scplugin.c 2009-02-17 14:10:47 UTC (rev 484) @@ -194,7 +194,7 @@
/* setup keybindings */ keybindings_set_item(plugin_key_group, KB_SPELL_CHECK, gui_kb_run_activate_cb, - 0, 0, "spell_check", _("Run Spell Check"), NULL); + 0, 0, "spell_check", _("Run Spell Check"), sc->submenu_item_default); keybindings_set_item(plugin_key_group, KB_SPELL_TOOGLE_TYPING, gui_kb_toggle_typing_activate_cb, 0, 0, "spell_toggle_typing", _("Toggle Check While Typing"), NULL);
Modified: trunk/spellcheck/src/scplugin.h =================================================================== --- trunk/spellcheck/src/scplugin.h 2009-02-17 13:58:58 UTC (rev 483) +++ trunk/spellcheck/src/scplugin.h 2009-02-17 14:10:47 UTC (rev 484) @@ -37,6 +37,7 @@ gboolean show_toolbar_item; GPtrArray *dicts; GtkWidget *menu_item; + GtkWidget *submenu_item_default; GtkWidget *edit_menu; GtkWidget *edit_menu_sep; GtkWidget *edit_menu_sub;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org