diff -r 3a263e57e1d9 -r 623ae8ed0877 main_win.cc --- a/main_win.cc Tue Jan 03 17:30:22 2006 +0000 +++ b/main_win.cc Wed Jan 04 11:41:58 2006 +0000 @@ -210,7 +210,18 @@ void MainWin::set_tabtitle(std::string name) { - tabnames[active_tab]=name; + if(strinst.find(name)==strinst.end()) + { + tabnames[active_tab]=name; + strinst[name]=1; + } + else + { + strinst[name]++; + std::ostringstream o; + o << strinst[name]; + tabnames[active_tab]=name+" - "+o.str(); + } set_title(tabnames[active_tab] + " - " + prog_name); notebook.set_tab_label_text((Widget&)*(tabs[active_tab]), tabnames[active_tab]); updateAlgoWins(); @@ -229,13 +240,12 @@ tabnames.resize(size+1); active_tab=size; tabs[active_tab]=new NoteBookTab(); - tabnames[active_tab]="unsaved file"; tabs[active_tab]->signal_title_ch().connect(sigc::mem_fun(*this, &MainWin::set_tabtitle)); tabs[active_tab]->signal_newmap_needed().connect(sigc::mem_fun(*this, &MainWin::createNewMapWinAfterSignal)); tabs[active_tab]->gd_canvas->changeEditorialTool(active_tool); notebook.append_page((Gtk::Widget&)(*(tabs[active_tab]))); notebook.set_current_page(size); - set_tabtitle(tabnames[active_tab]); + set_tabtitle("unsaved file"); updateAlgoWins(); } @@ -289,8 +299,6 @@ onChangeTab(NULL,0); } - std::cout << "NAAAA" << std::endl; - //if this was the last page in notebook, there is //no active_tab now if(size==1)