Revision: 792 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=792&view=rev Author: eht16 Date: 2009-06-28 11:03:06 +0000 (Sun, 28 Jun 2009)
Log Message: ----------- Fix compilation with GTK < 2.16.
Modified Paths: -------------- trunk/geany-plugins/spellcheck/ChangeLog trunk/geany-plugins/spellcheck/src/gui.c
Modified: trunk/geany-plugins/spellcheck/ChangeLog =================================================================== --- trunk/geany-plugins/spellcheck/ChangeLog 2009-06-27 10:05:04 UTC (rev 791) +++ trunk/geany-plugins/spellcheck/ChangeLog 2009-06-28 11:03:06 UTC (rev 792) @@ -1,3 +1,9 @@ +2009-06-28 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/gui.c: + Fix compilation with GTK < 2.16. + + 2009-05-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* configure.in, po/geanyspellcheck.pot:
Modified: trunk/geany-plugins/spellcheck/src/gui.c =================================================================== --- trunk/geany-plugins/spellcheck/src/gui.c 2009-06-27 10:05:04 UTC (rev 791) +++ trunk/geany-plugins/spellcheck/src/gui.c 2009-06-28 11:03:06 UTC (rev 792) @@ -401,6 +401,20 @@ }
+#if ! GTK_CHECK_VERSION(2, 16, 0) +static void gtk_menu_item_set_label(GtkMenuItem *menu_item, const gchar *label) +{ + if (GTK_BIN(menu_item)->child != NULL) + { + GtkWidget *child = GTK_BIN(menu_item)->child; + + if (GTK_IS_LABEL(child)) + gtk_label_set_text(GTK_LABEL(child), label); + } +} +#endif + + static void update_labels(void) { gchar *label; @@ -524,7 +538,7 @@ menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(sp_item), menu);
- sc_info->submenu_item_default = gtk_menu_item_new(); + sc_info->submenu_item_default = gtk_menu_item_new_with_label(NULL); gtk_container_add(GTK_CONTAINER(menu), sc_info->submenu_item_default); g_signal_connect(sc_info->submenu_item_default, "activate", G_CALLBACK(menu_item_toggled_cb), NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org