Commit dc6d00fe authored by Maurits Rijk's avatar Maurits Rijk Committed by Maurits Rijk

plug-ins/imagemap/imap_stock.[ch] plug-ins/imagemap/Makefile.am get rid of

2004-09-25  Maurits Rijk  <m.rijk@chello.nl>

	* plug-ins/imagemap/imap_stock.[ch]
	* plug-ins/imagemap/Makefile.am
	* plug-ins/imagemap/*.xpm: get rid of all .xpm images

	* configure.in
	* plug-ins/imagemap/images/*: and add them as .png here

	* plug-ins/imagemap/imap_browse.c: remove unused include.
parent 5bf8abfa
......@@ -1643,6 +1643,7 @@ plug-ins/help/Makefile
plug-ins/helpbrowser/Makefile
plug-ins/ifscompose/Makefile
plug-ins/imagemap/Makefile
plug-ins/imagemap/images/Makefile
plug-ins/maze/Makefile
plug-ins/pagecurl/Makefile
plug-ins/print/Makefile
......
......@@ -12,22 +12,13 @@ endif
AM_LDFLAGS = $(mwindows)
SUBDIRS = images
libexecdir = $(gimpplugindir)/plug-ins
libexec_PROGRAMS = imagemap
EXTRA_DIST = \
arrow.xpm \
circle.xpm \
coord.xpm \
dimension.xpm \
java.xpm \
link.xpm \
map_info.xpm \
polygon.xpm \
rectangle.xpm \
to_back.xpm \
to_front.xpm \
AUTHORS \
NEWS \
README \
......@@ -139,7 +130,8 @@ imagemap_SOURCES = \
imap_toolbar.c \
imap_toolbar.h \
imap_tools.c \
imap_tools.h
imap_tools.h \
pix-data.h
INCLUDES = \
-I$(top_srcdir) \
......
/* XPM */
static char * arrow_xpm[] = {
"16 16 3 1",
" c None",
". c #000000",
"+ c #808080",
" ",
" . ",
" .. ",
" ... ",
" .... ",
" ..... ",
" ...... ",
" ....... ",
" ........ ",
" ..... ",
" .. ..+ ",
" . +.. ",
" ..+ ",
" +.. ",
" .. ",
" "};
/* XPM */
static char * circle_xpm[] = {
"16 16 14 1",
" c None",
". c #000000",
"+ c #7A99D5",
"@ c #7BA2DC",
"# c #729EDB",
"$ c #72A0DC",
"% c #7DB0E7",
"& c #7DB2E8",
"* c #7BA0DB",
"= c #7EB7EC",
"- c #7EB9EE",
"; c #7EB6EB",
"> c #7EBAEE",
", c #7FBAEF",
" ",
" .... ",
" ..++++.. ",
" .@@@@@@@@. ",
" .@##$$$$##@. ",
" .@#%&&&&%#*. ",
" .+@$&===-;%#@. ",
" .+@$&=>,-;%#@. ",
" .+@$&=,,-;%#@. ",
" .+@$&----;%#@. ",
" .@#%;;;;%#@. ",
" .@#$%%%%#$@. ",
" .@@####@@. ",
" ..@@@@.. ",
" .... ",
" "};
/* XPM */
static char * coord_xpm[] = {
"16 16 3 1",
" c None",
". c red",
"X c black",
" ",
" . ",
" . ",
" . ",
"... ... X X X X ",
" . ",
" . X ",
" . ",
" X ",
" X ",
" X ",
" X ",
" X ",
" X ",
" X ",
" X X X X X X "};
/* XPM */
static char * dimension_xpm[] = {
"16 16 3 1",
" c None",
". c red",
"X c black",
" . . ",
" X ",
" . XXXXX . ",
" X ",
" . . ",
" . . .XXXXXXXXX ",
" X X ",
" X X X ",
" X X X ",
" X X X ",
" X X X ",
" XXX X X ",
" X X X ",
" X X ",
" . . .XXXXXXXXX ",
" "};
## Process this file with automake to produce Makefile.in
STOCK_IMAGES = \
stock-arrow.png \
stock-circle.png \
stock-coord.png \
stock-dimension.png \
stock-java.png \
stock-link.png \
stock-map-info.png \
stock-polygon.png \
stock-rectangle.png \
stock-to-back.png \
stock-to-front.png
EXTRA_DIST = $(STOCK_IMAGES)
noinst_DATA = imap-stock-pixbufs.h
CLEANFILES = $(noinst_DATA) stock-icons.list
stock-icons.list: $(STOCK_IMAGES) Makefile.am
( rm -f $@; \
for image in $(STOCK_IMAGES); do \
echo $$image | \
sed -e 's|.*/||' -e 's|-|_|g' -e 's|\.png$$||' >> $@; \
echo " $(srcdir)/$$image" >> $@; \
done )
$(srcdir)/imap-stock-pixbufs.h: stock-icons.list
gdk-pixbuf-csource --raw --build-list `cat stock-icons.list` > $(@F)
......@@ -24,7 +24,6 @@
#include <gtk/gtk.h>
#include "imap_browse.h"
#include "imap_stock.h"
static GtkTargetEntry target_table[] = {
{"STRING", 0, 1 },
......
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2004 Maurits Rijk m.rijk@chello.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -27,70 +27,74 @@
#include "imap_stock.h"
#include "arrow.xpm"
#include "circle.xpm"
#include "coord.xpm"
#include "dimension.xpm"
#include "java.xpm"
#include "link.xpm"
#include "map_info.xpm"
#include "polygon.xpm"
#include "rectangle.xpm"
#include "to_back.xpm"
#include "to_front.xpm"
#include "images/imap-stock-pixbufs.h"
#include "libgimp/stdplugins-intl.h"
static GtkIconFactory *imap_icon_factory = NULL;
static GtkStockItem imap_stock_items[] =
{
{ IMAP_STOCK_ARROW, NULL, 0, 0, NULL },
{ IMAP_STOCK_CIRCLE, NULL, 0, 0, NULL },
{ IMAP_STOCK_COORD, NULL, 0, 0, NULL },
{ IMAP_STOCK_DIMENSION, NULL, 0, 0, NULL },
{ IMAP_STOCK_JAVA, NULL, 0, 0, NULL },
{ IMAP_STOCK_LINK, NULL, 0, 0, NULL },
{ IMAP_STOCK_MAP_INFO,
N_("Edit Map Info..."), 0, 0, GETTEXT_PACKAGE "-std-plug-ins" },
};
{ IMAP_STOCK_POLYGON, NULL, 0, 0, NULL },
{ IMAP_STOCK_RECTANGLE, NULL, 0, 0, NULL },
{ IMAP_STOCK_TO_BACK, NULL, 0, 0, NULL },
{ IMAP_STOCK_TO_FRONT, NULL, 0, 0, NULL }
};
static void
add_stock_icon (GtkIconFactory *factory,
const gchar *stock_id,
const gchar **xpm_data)
add_stock_icon (const gchar *stock_id,
const guint8 *inline_data)
{
GtkIconSet *icon_set;
GdkPixbuf *pixbuf;
pixbuf = gdk_pixbuf_new_from_xpm_data (xpm_data);
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
gtk_icon_factory_add (factory, stock_id, icon_set);
g_object_unref (pixbuf);
gtk_icon_set_unref (icon_set);
GtkIconSource *source;
GtkIconSet *set;
GdkPixbuf *pixbuf;
source = gtk_icon_source_new ();
// gtk_icon_source_set_size (source, GTK_ICON_SIZE_BUTTON);
gtk_icon_source_set_size (source, GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_icon_source_set_size_wildcarded (source, TRUE);
pixbuf = gdk_pixbuf_new_from_inline (-1, inline_data, FALSE, NULL);
gtk_icon_source_set_pixbuf (source, pixbuf);
g_object_unref (pixbuf);
set = gtk_icon_set_new ();
gtk_icon_set_add_source (set, source);
gtk_icon_source_free (source);
gtk_icon_factory_add (imap_icon_factory, stock_id, set);
gtk_icon_set_unref (set);
}
void
init_stock_icons (void)
{
GtkIconFactory *factory = gtk_icon_factory_new ();
add_stock_icon (factory,
IMAP_STOCK_ARROW, (const gchar**) arrow_xpm);
add_stock_icon (factory,
IMAP_STOCK_CIRCLE, (const gchar**) circle_xpm);
add_stock_icon (factory,
IMAP_STOCK_COORD, (const gchar**) coord_xpm);
add_stock_icon (factory,
IMAP_STOCK_DIMENSION, (const gchar**) dimension_xpm);
add_stock_icon (factory,
IMAP_STOCK_JAVA, (const gchar**) java_xpm);
add_stock_icon (factory,
IMAP_STOCK_LINK, (const gchar**) link_xpm);
add_stock_icon (factory,
IMAP_STOCK_MAP_INFO, (const gchar**) map_info_xpm);
add_stock_icon (factory,
IMAP_STOCK_POLYGON, (const gchar**) polygon_xpm);
add_stock_icon (factory,
IMAP_STOCK_RECTANGLE, (const gchar**) rectangle_xpm);
add_stock_icon (factory,
IMAP_STOCK_TO_BACK, (const gchar**) to_back_xpm);
add_stock_icon (factory,
IMAP_STOCK_TO_FRONT, (const gchar**) to_front_xpm);
gtk_icon_factory_add_default(factory);
imap_icon_factory = gtk_icon_factory_new ();
add_stock_icon (IMAP_STOCK_ARROW, stock_arrow);
add_stock_icon (IMAP_STOCK_CIRCLE, stock_circle);
add_stock_icon (IMAP_STOCK_COORD, stock_coord);
add_stock_icon (IMAP_STOCK_DIMENSION, stock_dimension);
add_stock_icon (IMAP_STOCK_JAVA, stock_java);
add_stock_icon (IMAP_STOCK_LINK, stock_link);
add_stock_icon (IMAP_STOCK_MAP_INFO, stock_map_info);
add_stock_icon (IMAP_STOCK_POLYGON, stock_polygon);
add_stock_icon (IMAP_STOCK_RECTANGLE, stock_rectangle);
add_stock_icon (IMAP_STOCK_TO_BACK, stock_to_back);
add_stock_icon (IMAP_STOCK_TO_FRONT, stock_to_front);
gtk_icon_factory_add_default (imap_icon_factory);
gtk_stock_add_static (imap_stock_items, G_N_ELEMENTS (imap_stock_items));
}
......@@ -3,7 +3,7 @@
*
* Generates clickable image maps.
*
* Copyright (C) 1998-2003 Maurits Rijk lpeek.mrijk@consunet.nl
* Copyright (C) 1998-2004 Maurits Rijk m.rijk@chello.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -24,15 +24,15 @@
#ifndef _IMAP_STOCK_H
#define _IMAP_STOCK_H
#define IMAP_STOCK_ARROW "imap_arrow"
#define IMAP_STOCK_CIRCLE "imap_circle"
#define IMAP_STOCK_COORD "imap_coord"
#define IMAP_STOCK_DIMENSION "imap_dimension"
#define IMAP_STOCK_JAVA "imap_java"
#define IMAP_STOCK_LINK "imap_link"
#define IMAP_STOCK_ARROW "imap-arrow"
#define IMAP_STOCK_CIRCLE "imap-circle"
#define IMAP_STOCK_COORD "imap-coord"
#define IMAP_STOCK_DIMENSION "imap-dimension"
#define IMAP_STOCK_JAVA "imap-java"
#define IMAP_STOCK_LINK "imap-link"
#define IMAP_STOCK_MAP_INFO "imap-map-info"
#define IMAP_STOCK_POLYGON "imap_polygon"
#define IMAP_STOCK_RECTANGLE "imap_rectangle"
#define IMAP_STOCK_POLYGON "imap-polygon"
#define IMAP_STOCK_RECTANGLE "imap-rectangle"
#define IMAP_STOCK_TO_BACK "imap-to-back"
#define IMAP_STOCK_TO_FRONT "imap-to-front"
......
/* XPM */
static char *java_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 125 2",
" c black",
". c #010000",
"X c #010101",
"o c #020101",
"O c #060606",
"+ c #0E0000",
"@ c #0A0A0A",
"# c #0C0C0C",
"$ c #130404",
"% c #160F0F",
"& c #111111",
"* c #181717",
"= c #1A1A1A",
"- c #271C1C",
"; c #2F1D1D",
": c #202020",
"> c #242525",
", c #3B3A3A",
"< c #3C3C3C",
"1 c #492020",
"2 c #5E2E2E",
"3 c #424242",
"4 c #434343",
"5 c #464646",
"6 c #474747",
"7 c #4A4A4A",
"8 c #4D4D4D",
"9 c #4E4E4E",
"0 c #515151",
"q c #555555",
"w c #585858",
"e c #5C5C5C",
"r c #626262",
"t c #636363",
"y c #646464",
"u c #6D6161",
"i c #696A6A",
"p c #6C6C6C",
"a c #6D6D6D",
"s c #707070",
"d c #717171",
"f c #727272",
"g c #747474",
"h c #767676",
"j c #777777",
"k c #787878",
"l c #797979",
"z c #7B7B7B",
"x c #7C7C7C",
"c c #7D7D7D",
"v c #7E7E7E",
"b c #7F7F7F",
"n c #841414",
"m c #A81515",
"M c #AA1515",
"N c #A52D2D",
"B c #8F6363",
"V c #AA7575",
"C c #C50000",
"Z c #F50101",
"A c #F42525",
"S c #FF2626",
"D c #C57777",
"F c #ED4545",
"G c #F67A7A",
"H c #808080",
"J c #818181",
"K c #828282",
"L c #848484",
"P c #868686",
"I c #878787",
"U c #898989",
"Y c #8D8D8D",
"T c #8F8F8F",
"R c #909090",
"E c #919191",
"W c #949494",
"Q c #959595",
"! c #979797",
"~ c #989898",
"^ c #9A9A9A",
"/ c #9B9B9B",
"( c #9C9C9C",
") c #9D9D9D",
"_ c #9E9E9E",
"` c #A0A0A0",
"' c #A3A3A3",
"] c #A5A5A5",
"[ c #A9A9A9",
"{ c #ABABAB",
"} c #ACACAC",
"| c #ADADAD",
" . c #AEAEAE",
".. c #AFAFAF",
"X. c #B0B0B0",
"o. c #B3B3B3",
"O. c #B4B4B4",
"+. c #B5B6B6",
"@. c #B7B7B7",
"#. c #B9B9B9",
"$. c #BABABA",
"%. c #BBBBBB",
"&. c #BCBCBC",
"*. c #BDBDBD",
"=. c #BEBEBE",
"-. c #BFBFBF",
";. c #C8B9B9",
":. c #CCBDBD",
">. c #C0C0C0",
",. c #C3C3C3",
"<. c #D6CECE",
"1. c #D5D5D5",
"2. c #E1E1E1",
"3. c #E7E7E7",
"4. c #E9E7E7",
"5. c #E8E8E8",
"6. c #EEEBEB",
"7. c #EDEDED",
"8. c #EFEFEF",
"9. c #F8F8F8",
"0. c #FAFAFA",
"q. c #FEFEFE",
"w. c #FEFFFF",
"e. c gray100",
"r. c None",
/* pixels */
"r.r.r.r.r.r.*.@.y P *.r.r.r.r.r.",
"r.r.r.r.r.r.*.P = 5 O.r.r.r.r.r.",
"r.r.r.r.r.r.} < X = ` r.*.} O.r.",
"r.r.r.r.r.*.U # X @ g *.$.l l -.",
"r.r.r.r.r.O.7 X X X 9 O.*.p 5 } ",
"r.r.r.r.r.! * - 1 $ > ) *.r O d ",
"r.r.r.r.*.d ; D F n % x $.e = x ",
"r.r.*.} J , 2 G S C + q ! d U [ ",
"r.r.} p q i B A Z m u 9 t [ r.r.",
"%.O.x 5 R @.;.N m V 4.x l *.r.r.",
"} y : 3 L ,.9.<.:.6.e.) ~ *.r.r.",
"*.p # & 0 2.e.e.e.e.e.' ) *.r.r.",
"$.P 3 w x 8.e.6.4.9.e.' ~ *.r.r.",
"r.%.! J R 4.} b l Y 1.' ) *.r.r.",
"r.r.@.) b R l R ! J J U ' *.r.r.",
"r.r.r.X.p g } *.r.$.U f X.r.r.r."
};
/* XPM */
static char *link_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 10 1",
" c black",
". c navy",
"X c blue",
"o c #008000",
"O c #008080",
"+ c #808080",
"@ c #C0C0C0",
"# c #D4D0C8",
"$ c gray100",
"% c None",
/* pixels */
"%%%@+@@+@%%%%%%%",
"%%+@O@##o %%%%%%",
"%@#@$#oooo %%%%%",
"+@X$@XXXXoo@%%%%",
"@X@##.ooXoo %%%%",
"@X#oooo.O.o %%%%",
"+XX#oooooXX %%%%",
"@XXXXooooOX %%%%",
"@.XXXooooX.@%%%%",
"% XXX . %%",
"%% . @$@$ $#$# %",
"%%% @ # ",
"%%% $ + @@@ + $ ",
"%%% # # ",
"%%%% @$@# #@$# %",
"%%%%% % %%"
};
/* XPM */
static char * map_info_xpm[] = {
"16 16 12 1",
" c None",
". c black",
"X c #38488D",
"o c #BCC2D9",
"O c white",
"+ c #4D5C99",
"@ c #6370A6",
"# c #7A85B3",
"$ c #E8EAF2",
"% c #D2D6E5",
"& c #A6ADCC",
"* c #9099BF",
" ",
" ......... ",
" .XXXXXXXX.. ",
" .XXXXXoO+.O. ",
" .XXXXXoOXX... ",
" .XXXXX@#XXXX. ",
" .XXX@o$%XXXX. ",
" .XXXX#O&XXXX. ",
" .XXXXOO#XXXX. ",
" .XXX+O%+XXXX. ",
" .XXX#O*@XXXX. ",
" .XXXoOo&XXXX. ",
" .XXX&O*XXXXX. ",
" .XXXXXXXXXXX. ",
" ........... ",
" "};
/* XPM */
static char * polygon_xpm[] = {
"16 16 11 1",
" c None",
". c #000000",
"+ c #7A96D3",
"@ c #7A9DD8",
"# c #7B9DD9",
"$ c #7BA4DE",
"% c #7CA5DE",
"& c #7CACE3",
"* c #7DACE4",
"= c #7DB3E9",
"- c #7FBAEF",
" ",
" ....... ",
" .+++++@. ",
" .@####@. ",
" .@$%%%$@. ",
" .@$&*&$@. ",
" .@$&==&$@. ",
" .+#%*=&$@. ",
" .+#%*=&$@. ",
" .+#%*-=&$@. ",
" .+#%===&$@. ",
" .+#&&&&&&$@. ",
" .+$$$$$$$$@. ",
" .@@@@@@@@@@@. ",
" ............. ",
" "};
/* XPM */
static char * rectangle_xpm[] = {
"16 16 11 1",
" c None",
". c #000000",
"+ c #7A96D3",
"@ c #7A9DD8",
"# c #7B9DD9",
"$ c #7BA4DE",
"% c #7CA5DE",
"& c #7CACE3",
"* c #7DACE4",
"= c #7DB3E9",
"- c #7FBAEF",
" ",
" ",
" ",
" ............. ",
" .++++++++++@. ",
" .+########$@. ",
" .+#%%%%%%&$@. ",
" .+#%****=&$@. ",
" .+#%*---=&$@. ",
" .+#%=====&$@. ",
" .+#&&&&&&&$@. ",
" .+$$$$$$$$$@. ",
" .@@@@@@@@@@@. ",
" ............. ",
" ",
" "};
/* XPM */
static char * to_back_xpm[] = {
"16 16 5 1",
" c None",
". c #F7A559",
"+ c #FFFF00",
"@ c #2F4AAA",
"# c #798FCE",
" ... ",
" .+++. ",
".+++++. ",
".+++++.@@@@@@ ",
".+++++.#####@ ",
" .+++.######@ ",
" ...#######@ ",
" @########@ ",
" @########@ ",
" @#######... ",
" @######.+++. ",
" @#####.+++++.",
" @@@@@@.+++++.",
" .+++++.",
" .+++. ",
" ... "};
/* XPM */
static char * to_front_xpm[] = {
"16 16 5 1",
" c None",
". c #F7A559",
"+ c #FFFF00",
"@ c #2F4AAA",
"# c #798FCE",
" ... ",
" .+++. ",
".+++++. ",
".++@@@@@@@@@@ ",
".++@########@ ",
" .+@########@ ",
" .@########@ ",
" @########@ ",
" @########@ ",
" @########@. ",
" @########@+. ",
" @########@++.",
" @@@@@@@@@@++.",
" .+++++.",
" .+++. ",
" ... "};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment