-rw-r--r-- | src/napkin.cc | 2 | ||||
-rw-r--r-- | src/widgets.cc | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/napkin.cc b/src/napkin.cc index d9ba0c9..78f44f8 100644 --- a/src/napkin.cc +++ b/src/napkin.cc @@ -28,49 +28,49 @@ using std::string; #include <napkin/util.h> #include <napkin/st/decode.h> #include <napkin/st/download.h> #include "db.h" #include "sleep_timeline.h" #include "dialogs.h" #include "sleep_history.h" #include "config.h" class napkin_ui : public Gtk::Window { public: Gtk::VBox w_outer_box; Gtk::Statusbar w_status_bar; napkin::gtk::sleep_history_t w_history; Glib::RefPtr<Gtk::UIManager> uiman; Glib::RefPtr<Gtk::ActionGroup> agroup; napkin::db_t db; Glib::RefPtr<Gtk::Action> a_remove; napkin_ui() : w_history(db) { - static char *ui_info = + static const char *ui_info = "<ui>" "<menubar name='menu_bar'>" "<menu action='menu_sleep'>" #ifndef NDEBUG "<menu action='menu_sleep_add'>" #endif "<menuitem action='sleep_add_from_sleeptracker'/>" #ifndef NDEBUG "<menuitem action='sleep_add_from_datafile'/>" "</menu>" #endif "<menuitem action='sleep_remove'/>" "<menuitem action='exit'/>" "</menu>" "<menu action='menu_help'>" "<menuitem action='help_about'/>" "</menu>" "</menubar>" "<toolbar action='tool_bar'>" "<toolitem action='sleep_add_from_sleeptracker'/>" "<toolitem action='sleep_remove'/>" "<separator expand='true'/>" #ifndef NDEBUG "<toolitem action='debug'/>" diff --git a/src/widgets.cc b/src/widgets.cc index ea85bc8..61c7da9 100644 --- a/src/widgets.cc +++ b/src/widgets.cc @@ -1,36 +1,36 @@ #include <napkin/util.h> #include "widgets.h" namespace napkin { namespace gtk { hypnoinfo_t::hypnoinfo_t() : w_upper(4,3,false/*homogeneous*/), - lc_tobed("To bed:",0.5,0.5), - lc_timeline("Sleep timeline:",0.5,0.5), - lc_alarm("Alarm:",0.5,0.5), lc_window("Window:",0.5,0.5), - l_data_a("",0.9,0.5) + lc_tobed("To bed:",0.5f,0.5f), + lc_timeline("Sleep timeline:",0.5f,0.5f), + lc_alarm("Alarm:",0.5f,0.5f), lc_window("Window:",0.5f,0.5f), + l_data_a("",0.9f,0.5f) { add(l_date); add(l_hseparator); w_upper.set_col_spacings(5); w_upper.attach(lc_tobed,0,1,0,1, Gtk::SHRINK); w_upper.attach(lc_timeline,1,2,0,1, Gtk::SHRINK); w_upper.attach(lc_alarm,2,3,0,1, Gtk::SHRINK); w_upper.attach(lf_tobed,0,1,1,4, Gtk::SHRINK); w_upper.attach(st_timeline,1,2,1,4, Gtk::FILL|Gtk::EXPAND,Gtk::FILL|Gtk::EXPAND,0,0); w_upper.attach(lf_alarm,2,3,1,2, Gtk::SHRINK); w_upper.attach(lc_window,2,3,2,3, Gtk::SHRINK); w_upper.attach(lf_window,2,3,3,4, Gtk::SHRINK); add(w_upper); add(lc_almost_awakes); add(lf_almost_awakes); add(l_data_a); show_all(); } void hypnoinfo_t::update_data(const hypnodata_ptr_t& hd) { l_date.set_use_markup(true); l_date.set_markup("<b>"+hd->str_date()+"</b>"); lf_tobed.set_use_markup(true); |