From 38458a428b7e12e8151f453fb66d055a9cb95eff Mon Sep 17 00:00:00 2001 From: Aiwota Programmer Date: Mon, 29 Jun 2009 05:15:32 +0900 Subject: [PATCH] Set window title. --- src/board_window.cxx | 2 ++ src/thread_window.cxx | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/board_window.cxx b/src/board_window.cxx index 32b31ad..acd4095 100644 --- a/src/board_window.cxx +++ b/src/board_window.cxx @@ -112,6 +112,8 @@ BoardWindow::BoardWindow(std::auto_ptr bbs) : std::cout << to_simple_string(microsec_clock::local_time() - start) << std::endl; + set_title(get_uri()); + show_all(); } diff --git a/src/thread_window.cxx b/src/thread_window.cxx index 48f447c..999fae3 100644 --- a/src/thread_window.cxx +++ b/src/thread_window.cxx @@ -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(); -- 2.11.0