From cb8f8e72663cf62ca668c59ef386ea14a2637451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Wed, 29 Jul 2015 17:48:03 +0200 Subject: [PATCH] Add some logging --- src/menu.cc | 2 ++ src/menu.h | 1 + src/singletons.cc | 2 +- src/window.cc | 4 +++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/menu.cc b/src/menu.cc index 71703ba..6a08595 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -2,6 +2,7 @@ #include Menu::Menu() : box(Gtk::ORIENTATION_VERTICAL) { + INFO("Creating menu"); action_group = Gtk::ActionGroup::create(); ui_manager = Gtk::UIManager::create(); @@ -16,6 +17,7 @@ Menu::Menu() : box(Gtk::ORIENTATION_VERTICAL) { action_group->add(Gtk::Action::create("HelpMenu", "Help")); action_group->add(Gtk::Action::create("HelpAbout", "About"), [this]() { }); + INFO("Menu created"); } Gtk::Widget& Menu::get_widget() { diff --git a/src/menu.h b/src/menu.h index 40e3cb3..af5aa92 100644 --- a/src/menu.h +++ b/src/menu.h @@ -4,6 +4,7 @@ #include #include #include +#include "logging.h" class Menu { public: diff --git a/src/singletons.cc b/src/singletons.cc index b9c19bd..d517cd6 100644 --- a/src/singletons.cc +++ b/src/singletons.cc @@ -15,4 +15,4 @@ Menu *Singleton::menu() { if(!menu_) menu_=std::unique_ptr(new Menu()); return menu_.get(); -} \ No newline at end of file +} diff --git a/src/window.cc b/src/window.cc index 72194c1..3065fcb 100644 --- a/src/window.cc +++ b/src/window.cc @@ -15,6 +15,7 @@ Window::Window() : notebook(), plugin_api(¬ebook), box(Gtk::ORIENTATION_VERTI //TODO: see TODO Window::on_directory_navigation directories.m_TreeView.signal_row_activated().connect(sigc::mem_fun(*this, &Window::on_directory_navigation)); auto menu=Singleton::menu(); + INFO("Adding actions to menu"); menu->action_group->add(Gtk::Action::create("FileQuit", "Quit juCi++"), Gtk::AccelKey(menu->key_map["quit"]), [this]() { hide(); }); @@ -145,9 +146,10 @@ Window::Window() : notebook(), plugin_api(¬ebook), box(Gtk::ORIENTATION_VERTI execute.detach(); } }); - + INFO("Done adding actions to menu, building menu:") add_accel_group(menu->ui_manager->get_accel_group()); menu->build(); + INFO("Menu build") box.pack_start(menu->get_widget(), Gtk::PACK_SHRINK); box.pack_start(entry_box, Gtk::PACK_SHRINK);