Esempio n. 1
0
void on_refresh_threads_clicked(Glib::RefPtr<Gtk::ListStore> m_threads_tree_model) {
	///To be executed when the refresh button is clicked while viewing the thread list
	
	m_threads_tree_model->clear();
	getThreadData(m_threads_tree_model);
	webkit_web_view_load_uri(pWebKitView, "about:blank");
	
	Gtk::ScrolledWindow *scroll = 0;
	builder->get_widget("scrolledwindow2", scroll);
	scroll->get_vadjustment()->set_value(0);
}
Esempio n. 2
0
void threadView() {
	///Hide or show widgets for viewing a thread
	
	Gtk::ScrolledWindow *boardlist = 0;
	builder->get_widget("scrolledwindow1", boardlist);
	boardlist->set_visible(false);
	boardlist->hide();
	
	Gtk::Paned *threadview = 0;
	builder->get_widget("paned1", threadview);
	threadview->set_visible(true);
	threadview->show();
	
	Gtk::ToolItem *boardback = 0;
	builder->get_widget("toolbutton4", boardback);
	boardback->set_visible(true);
	boardback->show();
	
	Gtk::ToolItem *listback = 0;
	builder->get_widget("toolbutton3", listback);
	listback->set_visible(false);
	listback->hide();
	
	Gtk::Button* button;
	builder->get_widget("button2", button);
	button->signal_clicked().connect(sigc::ptr_fun(&on_thread_back_clicked));
	button->set_visible(true);
	button->show();
	
	Gtk::ScrolledWindow *threadlist = 0;
	builder->get_widget("scrolledwindow2", threadlist);
	threadlist->set_visible(false);
	threadlist->hide();
	
	Gtk::ScrolledWindow *postlist = 0;
	builder->get_widget("scrolledwindow4", postlist);
	postlist->set_visible(true);
	postlist->show();
	postlist->get_vadjustment()->set_value(0);
	
	Gtk::Label *title = 0;
	builder->get_widget("label2", title);
	title->set_text("#"+THREAD+" - "+BOARD+" - "+LONGBOARD);
	
	Gtk::ToolItem *refresh1 = 0;
	builder->get_widget("toolbutton5", refresh1);
	refresh1->set_visible(false);
	refresh1->hide();
	
	Gtk::ToolItem *refresh2 = 0;
	builder->get_widget("toolbutton6", refresh2);
	refresh2->set_visible(true);
	refresh2->show();
	
	Gtk::MenuItem *item3 = 0;
	builder->get_widget("menuitem3", item3);
	item3->set_sensitive(true);
	
	Gtk::ToolButton *post_but;
	builder->get_widget("toolbutton8", post_but);
	post_but->set_visible(true);
	post_but->show();
}