Index: Makefile.am
===================================================================
--- Makefile.am	(revision 173)
+++ Makefile.am	(revision 184)
@@ -50,6 +50,6 @@
 	file_chooser_extra_widget.h \
 	file_chooser_extra_widget.cc \
-	map_window.h \
-	map_window.cc
+	background_chooser_dialog.h \
+	background_chooser_dialog.cc
 
 glemon_CXXFLAGS = $(GTK_CFLAGS) $(LEMON_CFLAGS)
Index: background_chooser_dialog.cc
===================================================================
--- background_chooser_dialog.cc	(revision 184)
+++ background_chooser_dialog.cc	(revision 184)
@@ -0,0 +1,52 @@
+#include "background_chooser_dialog.h"
+#include <gtkmm/stock.h>
+#include "mapstorage.h"
+
+BackgroundChooserDialog::BackgroundChooserDialog(MapStorage* ms) :
+  mapstorage(ms),
+  btnClear(Gtk::Stock::CLEAR)
+{
+  set_has_separator(false);
+
+  Gtk::VBox* pVBox = get_vbox();
+
+  lblBackground.set_text("<b>Background image file</b>");
+  lblBackground.set_use_markup();
+  lblBackground.set_alignment(Gtk::ALIGN_LEFT);
+  lblScaling.set_text("<b>Scaling factor</b>");
+  lblScaling.set_use_markup();
+  lblScaling.set_alignment(Gtk::ALIGN_LEFT);
+  fcbBackground.set_width_chars(30);
+  fcbBackground.set_action(Gtk::FILE_CHOOSER_ACTION_OPEN);
+  if (mapstorage->isBackgroundSet())
+  {
+    fcbBackground.set_filename(mapstorage->getBackgroundFilename());
+  }
+
+  fcbBackground.signal_selection_changed().connect(
+    sigc::mem_fun(*this, &BackgroundChooserDialog::setBackground));
+
+  btnClear.signal_clicked().connect(
+    sigc::mem_fun(*this, &BackgroundChooserDialog::clearBackground));
+
+  pVBox->pack_start(lblBackground, Gtk::PACK_SHRINK);
+  pVBox->pack_start(box, Gtk::PACK_SHRINK);
+  box.pack_start(fcbBackground, Gtk::PACK_EXPAND_WIDGET);
+  box.pack_start(btnClear, Gtk::PACK_SHRINK);
+  pVBox->pack_start(lblScaling, Gtk::PACK_SHRINK);
+  pVBox->pack_start(sbScaling, Gtk::PACK_SHRINK);
+
+  add_button(Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
+
+  show_all_children();
+}
+
+void BackgroundChooserDialog::clearBackground()
+{
+  fcbBackground.unselect_all();
+}
+
+void BackgroundChooserDialog::setBackground()
+{
+  mapstorage->setBackground(fcbBackground.get_filename());
+}
Index: background_chooser_dialog.h
===================================================================
--- background_chooser_dialog.h	(revision 184)
+++ background_chooser_dialog.h	(revision 184)
@@ -0,0 +1,27 @@
+#ifndef BACKGROUND_CHOOSER_DIALOG
+#define BACKGROUND_CHOOSER_DIALOG
+
+#include <gtkmm/dialog.h>
+#include <gtkmm/label.h>
+#include <gtkmm/filechooserbutton.h>
+#include <gtkmm/spinbutton.h>
+
+class MapStorage;
+
+class BackgroundChooserDialog : public Gtk::Dialog
+{
+  private:
+    MapStorage* mapstorage;
+    Gtk::Label lblBackground;
+    Gtk::Label lblScaling;
+    Gtk::FileChooserButton fcbBackground;
+    Gtk::SpinButton sbScaling;
+    Gtk::HBox box;
+    Gtk::Button btnClear;
+    void clearBackground();
+    void setBackground();
+  public:
+    BackgroundChooserDialog(MapStorage* ms);
+};
+
+#endif
Index: graph_displayer_canvas.cc
===================================================================
--- graph_displayer_canvas.cc	(revision 180)
+++ graph_displayer_canvas.cc	(revision 184)
@@ -26,5 +26,6 @@
   isbutton(0), active_item(NULL), target_item(NULL), nodemap_to_edit(""),
   edgemap_to_edit(""), autoscale(true), zoomtrack(false), radius_size(20), edge_width(10),
-  was_redesigned(false), is_drawn(false), mytab(mainw)
+  was_redesigned(false), is_drawn(false), mytab(mainw),
+  background_set(false)
 {
   //base event handler is move tool
@@ -35,4 +36,30 @@
   active_edge=INVALID;
   forming_edge=INVALID;
+
+  setBackground();
+}
+
+void GraphDisplayerCanvas::setBackground()
+{
+  if (background_set)
+  {
+    delete background;
+  }
+  if (mytab.mapstorage.isBackgroundSet())
+  {
+    background_set = true;
+    refBackground = Gdk::Pixbuf::create_from_file(
+      mytab.mapstorage.getBackgroundFilename());
+    background = new Gnome::Canvas::Pixbuf(
+        *(root()),
+        0.0 - refBackground->get_width() / 2.0,
+        0.0 - refBackground->get_height() / 2.0,
+        refBackground);
+    background->lower_to_bottom();
+  }
+  else
+  {
+    background_set = false;
+  }
 }
 
Index: graph_displayer_canvas.h
===================================================================
--- graph_displayer_canvas.h	(revision 179)
+++ graph_displayer_canvas.h	(revision 184)
@@ -442,4 +442,10 @@
 
   XY calcArrowPos(XY, XY, XY, XY, int);
+
+  bool background_set;
+  Glib::RefPtr<Gdk::Pixbuf> refBackground;
+  Gnome::Canvas::Pixbuf *background;
+public:
+  void setBackground();
 };
 
Index: main_win.cc
===================================================================
--- main_win.cc	(revision 174)
+++ main_win.cc	(revision 184)
@@ -23,4 +23,5 @@
 #include "main_win.h"
 #include "guipixbufs.h"
+#include "background_chooser_dialog.h"
 
 #include "i18n.h"
@@ -114,4 +115,6 @@
   ag->add( Gtk::Action::create("ViewZoom100", Gtk::Stock::ZOOM_100),
       sigc::mem_fun(*this, &MainWin::zoom100));
+  ag->add( Gtk::Action::create("SetBackground", _("Set Background...")),
+	    sigc::mem_fun(*this, &MainWin::createBackgroundChooser));
   
   ag->add( Gtk::Action::create("ShowMenu", _("_Show")) );
@@ -174,4 +177,5 @@
       "      <menuitem action='ViewZoom100' />"
       "      <menuitem action='ViewZoomFit' />"
+      "      <menuitem action='SetBackground' />"
       "    </menu>"
       "    <menu action='ShowMenu'>"
@@ -581,2 +585,8 @@
   tabs[active_tab]->reDesignGraph();
 }
+
+void MainWin::createBackgroundChooser()
+{
+  BackgroundChooserDialog dialog(&(tabs[active_tab]->mapstorage));
+  dialog.run();
+}
Index: main_win.h
===================================================================
--- main_win.h	(revision 174)
+++ main_win.h	(revision 184)
@@ -262,4 +262,6 @@
 
   virtual void reDesignGraph();
+
+  void createBackgroundChooser();
 };
 
Index: p_window.cc
===================================================================
--- map_window.cc	(revision 174)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2006
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include "map_window.h"
-
-MapWindow::MapWindow()
-{
-  refMapStore = Gtk::ListStore::create(mapColumns);
-  //refMapStore->signal_row_changed().connect(sigc::mem_fun(*this, &Phy sicalProperties::onChannelChanged));
-  twMap.set_model(refMapStore);
-  twMap.append_column_editable("Name", mapColumns.colName);
-  //twMap.append_column_editable("Value type", mapColumns.colValue);
-  //twMap.append_column_editable("Map type", mapColumns.colType);
-
-  swMap.set_size_request(-1, 300);
-  swMap.add(twMap);
-  swMap.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
-
-  swMap.add(twMap);
-  add(swMap);
-
-  show_all_children();
-}
-
-MapWindow::~MapWindow()
-{
-}
Index: p_window.h
===================================================================
--- map_window.h	(revision 174)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2006
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef MAP_WINDOW
-#define MAP_WINDOW
-
-#include <gtkmm/window.h>
-#include <gtkmm/liststore.h>
-#include <gtkmm/treeview.h>
-#include <gtkmm/scrolledwindow.h>
-#include "mapstorage.h"
-
-class MapWindow : public Gtk::Window
-{
-  struct MapModelColumns : public Gtk::TreeModel::ColumnRecord
-  {
-    MapModelColumns()
-    {
-      add(colName);
-      add(colValue);
-      add(colType);
-    }
-    Gtk::TreeModelColumn<Glib::ustring> colName;
-    Gtk::TreeModelColumn<MapStorage::value> colValue;
-    Gtk::TreeModelColumn<MapStorage::type> colType;
-  };
-  private:
-    MapModelColumns mapColumns;
-    Glib::RefPtr<Gtk::ListStore> refMapStore;
-    Gtk::TreeView twMap;
-    Gtk::ScrolledWindow swMap;
-  public:
-    MapWindow();
-    ~MapWindow();
-};
-
-#endif
Index: mapstorage.cc
===================================================================
--- mapstorage.cc	(revision 177)
+++ mapstorage.cc	(revision 184)
@@ -18,4 +18,5 @@
 
 #include "mapstorage.h"
+#include "nbtab.h"
 #include "gui_writer.h"
 #include "gui_reader.h"
@@ -28,5 +29,5 @@
 const double p_d=40000;
 
-MapStorage::MapStorage() : modified(false), file_name(""), arrow_pos_read_ok(false), iterations(i_d), attraction(a_d), propulsation(p_d)
+MapStorage::MapStorage(NoteBookTab& tab) : mytab(tab), modified(false), file_name(""), arrow_pos_read_ok(false), iterations(i_d), attraction(a_d), propulsation(p_d), background_set(false)
 {
   nodemap_storage["coordinates_x"] = new Graph::NodeMap<double>(graph);
@@ -553,2 +554,38 @@
   signal_design_win.emit(attraction, propulsation, iterations);
 }
+
+void MapStorage::setBackground(const std::string& file_name)
+{
+  if (file_name == background_file_name) return;
+  if (file_name == "")
+  {
+    background_file_name = "";
+    background_set = false;
+  }
+  else
+  {
+    background_file_name = file_name;
+    background_set = true;
+  }
+  mytab.gd_canvas->setBackground();
+}
+
+const std::string& MapStorage::getBackgroundFilename()
+{
+  return background_file_name;
+}
+
+bool MapStorage::isBackgroundSet()
+{
+  return background_set;
+}
+
+double MapStorage::getBackgroundScaling()
+{
+  return background_scaling;
+}
+
+void MapStorage::setBackgroundScaling(double scaling)
+{
+  background_scaling = scaling;
+}
Index: mapstorage.h
===================================================================
--- mapstorage.h	(revision 177)
+++ mapstorage.h	(revision 184)
@@ -25,4 +25,6 @@
 #include "xymap.h"
 #include <libgnomecanvasmm.h>
+
+class NoteBookTab;
 
 ///class MapStorage handles NodeMaps and EdgeMaps.
@@ -39,8 +41,15 @@
 class MapStorage
 {
+private:
+  std::string background_file_name;
+  bool background_set;
+  double background_scaling;
+  NoteBookTab& mytab;
 public:
-  enum value {DOUBLE, STRING};
-  enum type {NORMAL, GUI};
-
+  void setBackground(const std::string& file_name);
+  const std::string& getBackgroundFilename();
+  bool isBackgroundSet();
+  double getBackgroundScaling();
+  void setBackgroundScaling(double scaling);
   ///The graph for which the datas are stored.
   Graph graph;
@@ -123,5 +132,5 @@
   ///Its all activity is initializing default values
   ///for different visualization attributes.
-  MapStorage();
+  MapStorage(NoteBookTab& tab);
 
   ///Destructor of MapStorage
Index: nbtab.cc
===================================================================
--- nbtab.cc	(revision 177)
+++ nbtab.cc	(revision 184)
@@ -20,5 +20,5 @@
 #include "file_chooser_extra_widget.h"
 
-NoteBookTab::NoteBookTab():mapwinexists(false), designwinexists(false)
+NoteBookTab::NoteBookTab():mapwinexists(false), designwinexists(false), mapstorage(*this)
 {
   Gtk::ScrolledWindow *pScrolledWindow = manage(new Gtk::ScrolledWindow);
