Browse Source

Moved info and status right to below notebook.

merge-requests/365/head
eidheim 10 years ago
parent
commit
cc257e0fd0
  1. 4
      src/notebook.cc
  2. 14
      src/window.cc
  3. 2
      src/window.h

4
src/notebook.cc

@ -86,11 +86,11 @@ void Notebook::open(const boost::filesystem::path &file_path) {
source_views.back()->on_update_status=[this](Source::View* view, const std::string &status) { source_views.back()->on_update_status=[this](Source::View* view, const std::string &status) {
if(get_current_page()!=-1 && get_current_view()==view) if(get_current_page()!=-1 && get_current_view()==view)
Singleton::status()->set_text(status+" "); Singleton::status()->set_text(status);
}; };
source_views.back()->on_update_info=[this](Source::View* view, const std::string &info) { source_views.back()->on_update_info=[this](Source::View* view, const std::string &info) {
if(get_current_page()!=-1 && get_current_view()==view) if(get_current_page()!=-1 && get_current_view()==view)
Singleton::info()->set_text(" "+info); Singleton::info()->set_text(info);
}; };
scrolled_windows.emplace_back(new Gtk::ScrolledWindow()); scrolled_windows.emplace_back(new Gtk::ScrolledWindow());

14
src/window.cc

@ -44,18 +44,20 @@ Window::Window() : box(Gtk::ORIENTATION_VERTICAL), notebook(directories), compil
directory_and_notebook_panes.pack1(directories, Gtk::SHRINK); directory_and_notebook_panes.pack1(directories, Gtk::SHRINK);
notebook_vbox.pack_start(notebook); notebook_vbox.pack_start(notebook);
notebook_vbox.pack_end(entry_box, Gtk::PACK_SHRINK);
entry_and_info_status_vbox.pack_start(entry_box, Gtk::PACK_SHRINK);
info_and_status_hbox.pack_start(*Singleton::info(), Gtk::PACK_SHRINK);
info_and_status_hbox.pack_end(*Singleton::status(), Gtk::PACK_SHRINK);
entry_and_info_status_vbox.pack_end(info_and_status_hbox, Gtk::PACK_SHRINK);
notebook_vbox.pack_end(entry_and_info_status_vbox, Gtk::PACK_SHRINK);
directory_and_notebook_panes.pack2(notebook_vbox, Gtk::SHRINK); directory_and_notebook_panes.pack2(notebook_vbox, Gtk::SHRINK);
directory_and_notebook_panes.set_position(120); directory_and_notebook_panes.set_position(120);
vpaned.set_position(300); vpaned.set_position(300);
vpaned.pack1(directory_and_notebook_panes, true, false); vpaned.pack1(directory_and_notebook_panes, true, false);
terminal_scrolled_window.add(*Singleton::terminal()); terminal_scrolled_window.add(*Singleton::terminal());
terminal_vbox.pack_start(terminal_scrolled_window); vpaned.pack2(terminal_scrolled_window, true, true);
info_and_status_hbox.pack_start(*Singleton::info(), Gtk::PACK_SHRINK);
info_and_status_hbox.pack_end(*Singleton::status(), Gtk::PACK_SHRINK);
terminal_vbox.pack_end(info_and_status_hbox, Gtk::PACK_SHRINK);
vpaned.pack2(terminal_vbox, true, true);
box.pack_end(vpaned); box.pack_end(vpaned);
show_all_children(); show_all_children();

2
src/window.h

@ -31,7 +31,7 @@ private:
Gtk::VPaned vpaned; Gtk::VPaned vpaned;
Gtk::Paned directory_and_notebook_panes; Gtk::Paned directory_and_notebook_panes;
Gtk::VBox notebook_vbox; Gtk::VBox notebook_vbox;
Gtk::VBox terminal_vbox; Gtk::VBox entry_and_info_status_vbox;
Gtk::ScrolledWindow terminal_scrolled_window; Gtk::ScrolledWindow terminal_scrolled_window;
Gtk::HBox info_and_status_hbox; Gtk::HBox info_and_status_hbox;
Gtk::AboutDialog about; Gtk::AboutDialog about;

Loading…
Cancel
Save