Revision: 66 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=66&view=rev Author: frlan Date: 2008-06-16 10:19:33 -0700 (Mon, 16 Jun 2008)
Log Message: ----------- GeanySendMail: Make plugin woprk with GTK 2.8. Thanks to Nick for providing the patch.
Modified Paths: -------------- trunk/geanysendmail/ChangeLog trunk/geanysendmail/src/geanysendmail.c
Modified: trunk/geanysendmail/ChangeLog =================================================================== --- trunk/geanysendmail/ChangeLog 2008-06-15 18:30:55 UTC (rev 65) +++ trunk/geanysendmail/ChangeLog 2008-06-16 17:19:33 UTC (rev 66) @@ -1,9 +1,15 @@ -2008-06-14 Frank Lanitz frank@frank.uvena.de +2008-06-16 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+ * Make plugin also work together with GTK-2.8. Thanks to Nick for + providing patch. + + +2008-06-14 Frank Lanitz <frank(at)frank(dot)uvena(dot)de> + * Update of plugin API
-2008-05-20 Frank Lanitz frank@frank.uvena.de +2008-05-20 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Ported build system from spellcheck plugin. Thanks for it. * Updated Geany plugin API.
Modified: trunk/geanysendmail/src/geanysendmail.c =================================================================== --- trunk/geanysendmail/src/geanysendmail.c 2008-06-15 18:30:55 UTC (rev 65) +++ trunk/geanysendmail/src/geanysendmail.c 2008-06-16 17:19:33 UTC (rev 66) @@ -150,6 +150,12 @@ send_as_attachment(NULL, NULL); }
+#if GTK_CHECK_VERSION(2, 12, 0) +#define ICON_LOOKUP_MODE GTK_ICON_LOOKUP_GENERIC_FALLBACK +#else +#define ICON_LOOKUP_MODE GTK_ICON_LOOKUP_USE_BUILTIN +#endif + void show_icon() { GdkPixbuf *mailbutton_pb = NULL; @@ -160,14 +166,14 @@ number_of_icons = gtk_toolbar_get_n_items(GTK_TOOLBAR(main_widgets->toolbar));
mailbutton_pb = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), - "mail-message-new", size, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); - + "mail-message-new", size, ICON_LOOKUP_MODE, NULL); + /* Fallback if icon is not part of theme */ if (mailbutton_pb == NULL) { mailbutton_pb = gdk_pixbuf_new_from_inline(-1, mail_pixbuf, FALSE, NULL); } - + icon = gtk_image_new_from_pixbuf(mailbutton_pb); g_object_unref(mailbutton_pb);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.