OSDN Git Service

Inform to ThreadWindow that ResNum increases.
[fukui-no-namari/dialektos.git] / src / thread_window.cxx
index 13e6660..d7ea12d 100644 (file)
@@ -264,6 +264,17 @@ void ThreadWindow::save_state() const {
   state.to_xml(boost::filesystem::path(bbs_->get_thread_state_path()));
 }
 
+void ThreadWindow::on_informed_from_board(const int res_num) {
+  if (res_num == 0) {
+    statusbar_.push("Dropped.");
+  } else if (res_num > idx_.line_count_) {
+    std::stringstream ss;
+    ss << boost::format("Update. %1% -> %2%") % idx_.line_count_ % res_num;
+    statusbar_.push(ss.str());
+  }
+}
+
+
 void ThreadWindow::inform_to_board(const ThreadIdx& idx) const {
   BOOST_FOREACH(ApplicationWindow& window, windows) {
     if (BoardWindow* board_window = dynamic_cast<BoardWindow*>(&window)) {