Changeset 68:1a27576aa199 in glemon-0.x
- Timestamp:
- 08/26/05 13:03:59 (19 years ago)
- Branch:
- gui
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2163
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
all_include.h
r62 r68 45 45 typedef Graph::NodeIt NodeIt; 46 46 47 const std::string prog_name = "LEMON Graph Editor"; 48 47 49 #endif // ALL_INCLUDE_H -
graph-displayer.cc
r57 r68 43 43 Gtk::Main app(argc, argv); 44 44 45 MainWin mainwin ("Displayed Graph");45 MainWin mainwin; 46 46 47 47 if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR))) -
main_win.cc
r63 r68 2 2 #include "guipixbufs.h" 3 3 4 MainWin::MainWin( const std::string& title) :4 MainWin::MainWin() : 5 5 mapwin("Map Setup", mapstorage, gd_canvas), 6 6 newmapwin("Creating new map", gd_canvas), gd_canvas(mapstorage, mapwin, (Gtk::Window *)this) 7 7 { 8 set_title ( title);8 set_title ("unsaved file - " + prog_name); 9 9 set_default_size(WIN_WIDTH,WIN_HEIGHT); 10 10 add(vbox); … … 210 210 gd_canvas.drawGraph(); 211 211 mapwin.update(); 212 set_title(Glib::filename_display_basename(file) + " - " + prog_name); 212 213 } 213 214 … … 235 236 mapstorage.clear(); 236 237 mapwin.update(); 238 set_title("unsaved file - " + prog_name); 237 239 } 238 240 … … 257 259 } 258 260 } 259 gd_canvas.clear();260 mapstorage.clear();261 261 Gtk::FileChooserDialog fcdialog("Open File"); 262 262 fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); … … 264 264 if (fcdialog.run() == Gtk::RESPONSE_ACCEPT) 265 265 { 266 gd_canvas.clear(); 267 mapstorage.clear(); 266 268 Glib::ustring filename = fcdialog.get_filename(); 267 269 if (!mapstorage.readFromFile(filename)) … … 271 273 gd_canvas.drawGraph(); 272 274 mapwin.update(); 275 set_title(Glib::filename_display_basename(filename) + " - " + prog_name); 273 276 } 274 277 } … … 284 287 mapstorage.writeToFile(mapstorage.file_name); 285 288 mapstorage.modified = false; 289 set_title(Glib::filename_display_basename(mapstorage.file_name) + " - " + 290 prog_name); 286 291 } 287 292 } … … 298 303 mapstorage.writeToFile(filename); 299 304 mapstorage.modified = false; 305 set_title(Glib::filename_display_basename(filename) + " - " + prog_name); 300 306 } 301 307 } … … 324 330 mapstorage.clear(); 325 331 mapwin.update(); 326 } 332 set_title("unsaved file - " + prog_name); 333 } -
main_win.h
r57 r68 19 19 ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. 20 20 ///\param title is the title of the window 21 MainWin( const std::string& title);21 MainWin(); 22 22 23 23 MapStorage mapstorage;
Note: See TracChangeset
for help on using the changeset viewer.