[gnote] Update noteoftheday prefs
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Update noteoftheday prefs
- Date: Sun, 27 Oct 2019 15:46:34 +0000 (UTC)
commit 5411713d4c64e3795d9f3aeb949dd24772fd4246
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Oct 27 17:21:21 2019 +0200
Update noteoftheday prefs
src/addins/noteoftheday/noteofthedaypreferences.cpp | 5 +++--
src/addins/noteoftheday/noteofthedaypreferences.hpp | 10 ++++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/addins/noteoftheday/noteofthedaypreferences.cpp
b/src/addins/noteoftheday/noteofthedaypreferences.cpp
index 792c9340..9c3be4a0 100644
--- a/src/addins/noteoftheday/noteofthedaypreferences.cpp
+++ b/src/addins/noteoftheday/noteofthedaypreferences.cpp
@@ -30,10 +30,11 @@
namespace noteoftheday {
-NoteOfTheDayPreferences::NoteOfTheDayPreferences(gnote::NoteManager & manager)
+NoteOfTheDayPreferences::NoteOfTheDayPreferences(gnote::IGnote & ignote, gnote::Preferences &,
gnote::NoteManager & manager)
: m_open_template_button(_("_Open Today: Template"), true)
, m_label(_("Change the <span weight=\"bold\">Today: Template</span> "
"note to customize the text that new Today notes have."))
+ , m_gnote(ignote)
, m_note_manager(manager)
{
set_row_spacing(12);
@@ -76,7 +77,7 @@ void NoteOfTheDayPreferences::open_template_button_clicked() const
}
if(0 != template_note) {
- gnote::IGnote::obj().open_note(std::static_pointer_cast<gnote::Note>(template_note));
+ m_gnote.open_note(std::static_pointer_cast<gnote::Note>(template_note));
}
}
diff --git a/src/addins/noteoftheday/noteofthedaypreferences.hpp
b/src/addins/noteoftheday/noteofthedaypreferences.hpp
index 68e269ee..c8ee57a2 100644
--- a/src/addins/noteoftheday/noteofthedaypreferences.hpp
+++ b/src/addins/noteoftheday/noteofthedaypreferences.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013 Aurimas Cernius
+ * Copyright (C) 2013,2019 Aurimas Cernius
* Copyright (C) 2009 Debarshi Ray
*
* This program is free software: you can redistribute it and/or modify
@@ -23,6 +23,11 @@
#include "notemanager.hpp"
+namespace gnote {
+ class Preferences;
+}
+
+
namespace noteoftheday {
class NoteOfTheDayPreferences
@@ -30,7 +35,7 @@ class NoteOfTheDayPreferences
{
public:
- NoteOfTheDayPreferences(gnote::NoteManager &);
+ NoteOfTheDayPreferences(gnote::IGnote &, gnote::Preferences &, gnote::NoteManager &);
~NoteOfTheDayPreferences();
private:
@@ -39,6 +44,7 @@ private:
Gtk::Button m_open_template_button;
Gtk::Label m_label;
+ gnote::IGnote & m_gnote;
gnote::NoteManager & m_note_manager;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]