Skip to content

Commit

Permalink
geanysendmail: Drop use of deprecated GdkPixbuf inline data
Browse files Browse the repository at this point in the history
Use XPM data instead, which is simpler and totally good enough here.

Closes geany#256.
  • Loading branch information
frlan committed Jun 27, 2015
1 parent fd82573 commit 2322d66
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 53 deletions.
2 changes: 1 addition & 1 deletion geanysendmail/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include $(top_srcdir)/build/vars.build.mk

geanyplugins_LTLIBRARIES = geanysendmail.la

geanysendmail_la_SOURCES = geanysendmail.c icon.h
geanysendmail_la_SOURCES = geanysendmail.c mail-icon.xpm
geanysendmail_la_LIBADD = $(COMMONLIBS)

include $(top_srcdir)/build/cppcheck.mk
4 changes: 2 additions & 2 deletions geanysendmail/src/geanysendmail.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#endif

#include <geanyplugin.h>
#include "icon.h"
#include "mail-icon.xpm"

GeanyPlugin *geany_plugin;
GeanyData *geany_data;
Expand Down Expand Up @@ -199,7 +199,7 @@ static void add_stock_item(void)
}
else
{
GdkPixbuf *pb = gdk_pixbuf_new_from_inline(-1, mail_pixbuf, FALSE, NULL);
GdkPixbuf *pb = gdk_pixbuf_new_from_xpm_data(mail_icon);
icon_set = gtk_icon_set_new_from_pixbuf(pb);
g_object_unref(pb);
}
Expand Down
50 changes: 0 additions & 50 deletions geanysendmail/src/icon.h

This file was deleted.

44 changes: 44 additions & 0 deletions geanysendmail/src/mail-icon.xpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* XPM */
static const char *mail_icon[] = {
/* columns rows colors chars-per-pixel */
"13 10 28 1 ",
" c black",
". c #282828",
"X c #323232",
"o c gray24",
"O c #3F3F3F",
"+ c #464646",
"@ c gray28",
"# c gray55",
"$ c #A0A0A0",
"% c #A7A7A7",
"& c #AAAAAA",
"* c gray73",
"= c gray74",
"- c gray75",
"; c #C1C1C1",
": c #CDCDCD",
"> c LightGray",
", c gray84",
"< c #DADADA",
"1 c #E9E9E9",
"2 c #EAEAEA",
"3 c gray92",
"4 c #EFEFEF",
"5 c gray95",
"6 c #F3F3F3",
"7 c #F4F4F4",
"8 c gray96",
"9 c None",
/* pixels */
"9 9",
" @888888888X ",
" 8@8888868@- ",
" 82@88688@2& ",
" 888@888O422 ",
" 684@O8@@86- ",
" 88@88@86@,$ ",
" 8@688666*X2 ",
" @$$#-*<:%>. ",
"9 9"
};

0 comments on commit 2322d66

Please sign in to comment.