OSDN Git Service

Set window title.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 28 Jun 2009 20:15:32 +0000 (05:15 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 28 Jun 2009 20:15:32 +0000 (05:15 +0900)
src/board_window.cxx
src/thread_window.cxx

index 32b31ad..acd4095 100644 (file)
@@ -112,6 +112,8 @@ BoardWindow::BoardWindow(std::auto_ptr<bbs_detail::Base> bbs) :
   std::cout <<
   to_simple_string(microsec_clock::local_time() - start) << std::endl;
 
+  set_title(get_uri());
+
   show_all();
 }
 
index 48f447c..999fae3 100644 (file)
@@ -71,6 +71,7 @@ bool ThreadWindow::load() {
     to_simple_string(microsec_clock::local_time() - start) << std::endl;
 
     idx_ = ThreadIdx::from_xml(bbs_->get_thread_idx_path());
+    set_title(idx_.title_);
   }
 
   return false;
@@ -158,8 +159,10 @@ void ThreadWindow::save_content(const http::Response& response) {
   ofs << response.get_content();
   ofs.close();
 
-  if (code == 200)
+  if (code == 200) {
     idx_.title_ = bbs_->get_title_from_string(response.get_content());
+    set_title(idx_.title_);
+  }
 
   idx_.last_modified_ = response.get_header().get_last_modified();
   idx_.etag_ = response.get_header().get_etag();