Index: gui/graph-displayer.cc
===================================================================
--- gui/graph-displayer.cc	(revision 1849)
+++ gui/graph-displayer.cc	(revision 1869)
@@ -64,7 +64,21 @@
   MainWin mytab;
 
-  if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR)))
+//   if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR)))
+//     {
+//       mytab.readFile(argv[1]);
+//     }
+  if(argc>=2)
     {
-      mytab.readFile(argv[1]);
+      for(int i=1;i<argc;i++)
+	{
+	  if(Glib::file_test(argv[i], Glib::FILE_TEST_IS_REGULAR))
+	    {
+	      mytab.readFile(argv[i]);
+	    }
+	}
+    }
+  else
+    {
+      mytab.newTab();
     }
   
Index: gui/main_win.cc
===================================================================
--- gui/main_win.cc	(revision 1862)
+++ gui/main_win.cc	(revision 1869)
@@ -73,12 +73,10 @@
 
   ag->add( Gtk::Action::create("FileMenu", "_File") );
-  ag->add( Gtk::Action::create("FileNewTab", "New _Tab"),
+  ag->add( Gtk::Action::create("FileNew", Gtk::Stock::NEW),
       sigc::mem_fun(*this, &MainWin::newTab));
-  ag->add( Gtk::Action::create("FileCloseTab", "_Close Tab"),
-      sigc::mem_fun(*this, &MainWin::closeTab));
-  ag->add( Gtk::Action::create("FileNew", Gtk::Stock::NEW),
-      sigc::mem_fun(*this, &MainWin::newFile));
   ag->add( Gtk::Action::create("FileOpen", Gtk::Stock::OPEN),
       sigc::mem_fun(*this, &MainWin::openFile));
+  ag->add( Gtk::Action::create("FileClearTab", "Clear Tab"),
+      sigc::mem_fun(*this, &MainWin::newFile));
   ag->add( Gtk::Action::create("FileSave", Gtk::Stock::SAVE),
       sigc::mem_fun(*this, &MainWin::saveFile));
@@ -86,5 +84,5 @@
       sigc::mem_fun(*this, &MainWin::saveFileAs));
   ag->add( Gtk::Action::create("Close", Gtk::Stock::CLOSE),
-      sigc::mem_fun(*this, &MainWin::close));
+      sigc::mem_fun(*this, &MainWin::closeTab));
   ag->add( Gtk::Action::create("Quit", Gtk::Stock::QUIT),
       sigc::mem_fun(*this, &MainWin::hide));
@@ -133,8 +131,7 @@
       "  <menubar name='MenuBar'>"
       "    <menu action='FileMenu'>"
-      "      <menuitem action='FileNewTab'/>"
-      "      <menuitem action='FileCloseTab'/>"
       "      <menuitem action='FileNew'/>"
       "      <menuitem action='FileOpen'/>"
+      "      <menuitem action='FileClearTab'/>"
       "      <menuitem action='FileSave'/>"
       "      <menuitem action='FileSaveAs'/>"
@@ -238,4 +235,22 @@
   if(active_tab!=-1)
     {
+      if (tabs[active_tab]->mapstorage.modified)
+	{
+	  Gtk::MessageDialog mdialog("<b>Save changes before closing?</b>", true, 
+				     Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
+	  mdialog.add_button("Close file _without Saving", Gtk::RESPONSE_REJECT);
+	  mdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
+	  mdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
+	  switch (mdialog.run())
+	    {
+	    case Gtk::RESPONSE_CANCEL:
+	      return;
+	    case Gtk::RESPONSE_REJECT:
+	      break;
+	    case Gtk::RESPONSE_ACCEPT:
+	      tabs[active_tab]->saveFile();
+	      break;
+	    }
+	}
       //tabs vector will be decreased with the deleted value
       int size=tabs.size();
Index: gui/nbtab.cc
===================================================================
--- gui/nbtab.cc	(revision 1849)
+++ gui/nbtab.cc	(revision 1869)
@@ -31,5 +31,5 @@
     Gtk::MessageDialog mdialog("<b>Save changes before closing?</b>", true,
         Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
-    mdialog.add_button("Close _without Saving", Gtk::RESPONSE_REJECT);
+    mdialog.add_button("Close file _without Saving", Gtk::RESPONSE_REJECT);
     mdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     mdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
@@ -60,5 +60,5 @@
     Gtk::MessageDialog mdialog("<b>Save changes before closing?</b>", true, 
         Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
-    mdialog.add_button("Close _without Saving", Gtk::RESPONSE_REJECT);
+    mdialog.add_button("Close file _without Saving", Gtk::RESPONSE_REJECT);
     mdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     mdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
