COIN-OR::LEMON - Graph Library

Changeset 1650:422906271d22 in lemon-0.x for gui/main_win.cc


Ignore:
Timestamp:
08/26/05 13:03:59 (15 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2163
Message:

display file name in window title

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/main_win.cc

    r1645 r1650  
    22#include "guipixbufs.h"
    33
    4 MainWin::MainWin(const std::string& title) :
     4MainWin::MainWin() :
    55  mapwin("Map Setup", mapstorage, gd_canvas),
    66  newmapwin("Creating new map", gd_canvas), gd_canvas(mapstorage, mapwin, (Gtk::Window *)this)
    77{
    8   set_title (title);
     8  set_title ("unsaved file - " + prog_name);
    99  set_default_size(WIN_WIDTH,WIN_HEIGHT);
    1010  add(vbox);
     
    210210  gd_canvas.drawGraph();
    211211  mapwin.update();
     212  set_title(Glib::filename_display_basename(file) + " - " + prog_name);
    212213}
    213214
     
    235236  mapstorage.clear();
    236237  mapwin.update();
     238  set_title("unsaved file - " + prog_name);
    237239}
    238240
     
    257259    }
    258260  }
    259   gd_canvas.clear();
    260   mapstorage.clear();
    261261  Gtk::FileChooserDialog fcdialog("Open File");
    262262  fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     
    264264  if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
    265265  {
     266    gd_canvas.clear();
     267    mapstorage.clear();
    266268    Glib::ustring filename = fcdialog.get_filename();
    267269    if (!mapstorage.readFromFile(filename))
     
    271273      gd_canvas.drawGraph();
    272274      mapwin.update();
     275      set_title(Glib::filename_display_basename(filename) + " - " + prog_name);
    273276    }
    274277  }
     
    284287    mapstorage.writeToFile(mapstorage.file_name);
    285288    mapstorage.modified = false;
     289    set_title(Glib::filename_display_basename(mapstorage.file_name) + " - " +
     290        prog_name);
    286291  }
    287292}
     
    298303    mapstorage.writeToFile(filename);
    299304    mapstorage.modified = false;
     305    set_title(Glib::filename_display_basename(filename) + " - " + prog_name);
    300306  }
    301307}
     
    324330  mapstorage.clear();
    325331  mapwin.update();
    326 }
     332  set_title("unsaved file - " + prog_name);
     333}
Note: See TracChangeset for help on using the changeset viewer.