Changeset 104:623ae8ed0877 in glemon-0.x
- Timestamp:
- 01/04/06 12:41:58 (18 years ago)
- Branch:
- gui
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2447
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main_win.cc
r103 r104 211 211 void MainWin::set_tabtitle(std::string name) 212 212 { 213 tabnames[active_tab]=name; 213 if(strinst.find(name)==strinst.end()) 214 { 215 tabnames[active_tab]=name; 216 strinst[name]=1; 217 } 218 else 219 { 220 strinst[name]++; 221 std::ostringstream o; 222 o << strinst[name]; 223 tabnames[active_tab]=name+" - "+o.str(); 224 } 214 225 set_title(tabnames[active_tab] + " - " + prog_name); 215 226 notebook.set_tab_label_text((Widget&)*(tabs[active_tab]), tabnames[active_tab]); … … 230 241 active_tab=size; 231 242 tabs[active_tab]=new NoteBookTab(); 232 tabnames[active_tab]="unsaved file";233 243 tabs[active_tab]->signal_title_ch().connect(sigc::mem_fun(*this, &MainWin::set_tabtitle)); 234 244 tabs[active_tab]->signal_newmap_needed().connect(sigc::mem_fun(*this, &MainWin::createNewMapWinAfterSignal)); … … 236 246 notebook.append_page((Gtk::Widget&)(*(tabs[active_tab]))); 237 247 notebook.set_current_page(size); 238 set_tabtitle( tabnames[active_tab]);248 set_tabtitle("unsaved file"); 239 249 updateAlgoWins(); 240 250 } … … 290 300 } 291 301 292 std::cout << "NAAAA" << std::endl;293 294 302 //if this was the last page in notebook, there is 295 303 //no active_tab now -
main_win.h
r103 r104 27 27 std::vector<NoteBookTab *> tabs; 28 28 std::vector<std::string> tabnames; 29 30 std::map<std::string, int> strinst; 29 31 30 32 std::set< AlgoWin* > aws;
Note: See TracChangeset
for help on using the changeset viewer.