Revision: 311 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=311&view=rev Author: eht16 Date: 2008-11-21 18:44:29 +0000 (Fri, 21 Nov 2008)
Log Message: ----------- Make use of ui_image_menu_item_new().
Modified Paths: -------------- trunk/spellcheck/ChangeLog trunk/spellcheck/src/gui.c trunk/spellcheck/src/scplugin.c
Modified: trunk/spellcheck/ChangeLog =================================================================== --- trunk/spellcheck/ChangeLog 2008-11-21 17:58:05 UTC (rev 310) +++ trunk/spellcheck/ChangeLog 2008-11-21 18:44:29 UTC (rev 311) @@ -1,3 +1,9 @@ +2008-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/scplugin.c, src/gui.c: + Make use of ui_image_menu_item_new(). + + 2008-11-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/speller.c, src/gui.c:
Modified: trunk/spellcheck/src/gui.c =================================================================== --- trunk/spellcheck/src/gui.c 2008-11-21 17:58:05 UTC (rev 310) +++ trunk/spellcheck/src/gui.c 2008-11-21 18:44:29 UTC (rev 311) @@ -255,7 +255,7 @@
if (suggs != NULL) { - GtkWidget *menu_item, *menu, *image; + GtkWidget *menu_item, *menu; gchar *label;
clickinfo.pos = pos; @@ -291,18 +291,13 @@ menu_item = gtk_separator_menu_item_new(); gtk_container_add(GTK_CONTAINER(sc->edit_menu_sub), menu_item);
- image = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU); - label = g_strdup_printf(_("Add "%s" to Dictionary"), word); - menu_item = gtk_image_menu_item_new_with_label(label); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), image); + menu_item = p_ui->image_menu_item_new(GTK_STOCK_ADD, label); gtk_container_add(GTK_CONTAINER(sc->edit_menu_sub), menu_item); g_signal_connect((gpointer) menu_item, "activate", G_CALLBACK(on_menu_addword_item_activate), GINT_TO_POINTER(0));
- image = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU); - menu_item = gtk_image_menu_item_new_with_label(_("Ignore All")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), image); + menu_item = p_ui->image_menu_item_new(GTK_STOCK_REMOVE, _("Ignore All")); gtk_container_add(GTK_CONTAINER(sc->edit_menu_sub), menu_item); g_signal_connect((gpointer) menu_item, "activate", G_CALLBACK(on_menu_addword_item_activate), GINT_TO_POINTER(1)); @@ -409,11 +404,7 @@
void gui_create_edit_menu(void) { - GtkWidget *image; - - image = gtk_image_new_from_stock(GTK_STOCK_SPELL_CHECK, GTK_ICON_SIZE_MENU); - sc->edit_menu = gtk_image_menu_item_new_with_label(_("Spelling Suggestions")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(sc->edit_menu), image); + sc->edit_menu = p_ui->image_menu_item_new(GTK_STOCK_SPELL_CHECK, _("Spelling Suggestions")); gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), sc->edit_menu); gtk_menu_reorder_child(GTK_MENU(geany->main_widgets->editor_menu), sc->edit_menu, 0);
Modified: trunk/spellcheck/src/scplugin.c =================================================================== --- trunk/spellcheck/src/scplugin.c 2008-11-21 17:58:05 UTC (rev 310) +++ trunk/spellcheck/src/scplugin.c 2008-11-21 18:44:29 UTC (rev 311) @@ -54,7 +54,7 @@ GeanyFunctions *geany_functions;
-PLUGIN_VERSION_CHECK(100) +PLUGIN_VERSION_CHECK(110) PLUGIN_SET_INFO(_("Spell Check"), _("Checks the spelling of the current document."), "0.2", _("The Geany developer team"))
@@ -203,7 +203,7 @@
locale_init();
- sc->menu_item = gtk_image_menu_item_new_from_stock("gtk-spell-check", NULL); + sc->menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_SPELL_CHECK, NULL); p_ui->add_document_sensitive(sc->menu_item);
gui_toolbar_update();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org