Index: gui/Makefile.am
===================================================================
--- gui/Makefile.am	(revision 1634)
+++ gui/Makefile.am	(revision 1635)
@@ -1,4 +1,8 @@
 AM_CPPFLAGS = -I$(top_srcdir)
 LDADD = $(top_builddir)/lemon/libemon.la
+
+
+noinst_DATA = guipixbufs.h
+CLEANFILES = $(noinst_DATA)
 
 bin_PROGRAMS = gd
@@ -27,14 +31,22 @@
 gd_CXXFLAGS = $(GTK_CFLAGS)
 gd_LDFLAGS = $(GTK_LIBS)
-gd_CPPFLAGS = -DDATADIR=\"$(datadir)\"
 
-pixmapdir = $(datadir)/pixmaps/gd
+IMAGES = addlink.png addnode.png delete.png \
+	editlink.png editnode.png move.png newmap.png
 
-pixmap_DATA =
-	addlink.png \
-	addnode.png \
-	delete.png \
-	editlink.png \
-	editnode.png \
-	move.png \
-	newmap.png
+VARIABLES = \
+	gui_icons_addlink $(srcdir)/addlink.png \
+	gui_icons_addnode $(srcdir)/addnode.png \
+	gui_icons_delete $(srcdir)/delete.png \
+	gui_icons_editlink $(srcdir)/editlink.png \
+	gui_icons_editnode $(srcdir)/editnode.png \
+	gui_icons_move $(srcdir)/move.png \
+	gui_icons_newmap $(srcdir)/newmap.png
+
+
+guipixbufs.h: $(IMAGES)
+	gdk-pixbuf-csource \
+	--raw --build-list $(VARIABLES) > guipixbufs.h ||  \
+	( rm -f guipixbufs.h && false )
+
+EXTRA_DIST = $(IMAGES) guipixbufs.h
Index: gui/main_win.cc
===================================================================
--- gui/main_win.cc	(revision 1634)
+++ gui/main_win.cc	(revision 1635)
@@ -1,3 +1,4 @@
 #include "main_win.h"
+#include "guipixbufs.h"
 
 MainWin::MainWin(const std::string& title) :
@@ -14,61 +15,57 @@
   Glib::RefPtr<Gtk::IconFactory> p_icon_factory = Gtk::IconFactory::create();
  
-  std::vector<std::string> icon_path;
-  icon_path.push_back(DATADIR);
-  icon_path.push_back("pixmaps");
-  icon_path.push_back("gd");
-
-  std::vector<std::string> move_icon_path(icon_path);
-  move_icon_path.push_back("move.png");
+  Glib::RefPtr<Gdk::Pixbuf> p_move_pixbuf = Gdk::Pixbuf::create_from_inline(
+      2328, gui_icons_move);
+  Glib::RefPtr<Gdk::Pixbuf> p_addnode_pixbuf = Gdk::Pixbuf::create_from_inline(
+      2328, gui_icons_addnode);
+  Glib::RefPtr<Gdk::Pixbuf> p_addlink_pixbuf = Gdk::Pixbuf::create_from_inline(
+      2328, gui_icons_addlink);
+  Glib::RefPtr<Gdk::Pixbuf> p_delete_pixbuf = Gdk::Pixbuf::create_from_inline(
+      2328, gui_icons_delete);
+  Glib::RefPtr<Gdk::Pixbuf> p_editlink_pixbuf = Gdk::Pixbuf::create_from_inline(
+      2328, gui_icons_editlink);
+  Glib::RefPtr<Gdk::Pixbuf> p_editnode_pixbuf = Gdk::Pixbuf::create_from_inline(
+      2328, gui_icons_editnode);
+  Glib::RefPtr<Gdk::Pixbuf> p_newmap_pixbuf = Gdk::Pixbuf::create_from_inline(
+      2328, gui_icons_newmap);
+
   Gtk::IconSource move_icon_source;
-  move_icon_source.set_filename(Glib::build_filename(move_icon_path));
+  move_icon_source.set_pixbuf(p_move_pixbuf);
   Gtk::IconSet move_icon_set;
   move_icon_set.add_source(move_icon_source);
   p_icon_factory->add(Gtk::StockID("gd-move"), move_icon_set);
 
-  std::vector<std::string> addnode_icon_path(icon_path);
-  addnode_icon_path.push_back("addnode.png");
   Gtk::IconSource addnode_icon_source;
-  addnode_icon_source.set_filename(Glib::build_filename(addnode_icon_path));
+  addnode_icon_source.set_pixbuf(p_addnode_pixbuf);
   Gtk::IconSet addnode_icon_set;
   addnode_icon_set.add_source(addnode_icon_source);
   p_icon_factory->add(Gtk::StockID("gd-addnode"), addnode_icon_set);
 
-  std::vector<std::string> addlink_icon_path(icon_path);
-  addlink_icon_path.push_back("addlink.png");
   Gtk::IconSource addlink_icon_source;
-  addlink_icon_source.set_filename(Glib::build_filename(addlink_icon_path));
+  addlink_icon_source.set_pixbuf(p_addlink_pixbuf);
   Gtk::IconSet addlink_icon_set;
   addlink_icon_set.add_source(addlink_icon_source);
   p_icon_factory->add(Gtk::StockID("gd-addlink"), addlink_icon_set);
 
-  std::vector<std::string> delete_icon_path(icon_path);
-  delete_icon_path.push_back("delete.png");
   Gtk::IconSource delete_icon_source;
-  delete_icon_source.set_filename(Glib::build_filename(delete_icon_path));
+  delete_icon_source.set_pixbuf(p_delete_pixbuf);
   Gtk::IconSet delete_icon_set;
   delete_icon_set.add_source(delete_icon_source);
   p_icon_factory->add(Gtk::StockID("gd-delete"), delete_icon_set);
 
-  std::vector<std::string> editlink_icon_path(icon_path);
-  editlink_icon_path.push_back("editlink.png");
   Gtk::IconSource editlink_icon_source;
-  editlink_icon_source.set_filename(Glib::build_filename(editlink_icon_path));
+  editlink_icon_source.set_pixbuf(p_editlink_pixbuf);
   Gtk::IconSet editlink_icon_set;
   editlink_icon_set.add_source(editlink_icon_source);
   p_icon_factory->add(Gtk::StockID("gd-editlink"), editlink_icon_set);
 
-  std::vector<std::string> editnode_icon_path(icon_path);
-  editnode_icon_path.push_back("editnode.png");
   Gtk::IconSource editnode_icon_source;
-  editnode_icon_source.set_filename(Glib::build_filename(editnode_icon_path));
+  editnode_icon_source.set_pixbuf(p_editnode_pixbuf);
   Gtk::IconSet editnode_icon_set;
   editnode_icon_set.add_source(editnode_icon_source);
   p_icon_factory->add(Gtk::StockID("gd-editnode"), editnode_icon_set);
 
-  std::vector<std::string> newmap_icon_path(icon_path);
-  newmap_icon_path.push_back("newmap.png");
   Gtk::IconSource newmap_icon_source;
-  newmap_icon_source.set_filename(Glib::build_filename(newmap_icon_path));
+  newmap_icon_source.set_pixbuf(p_newmap_pixbuf);
   Gtk::IconSet newmap_icon_set;
   newmap_icon_set.add_source(newmap_icon_source);
