[gnote] Pass IGnote and Preferences when creating addin preference widget
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Pass IGnote and Preferences when creating addin preference widget
- Date: Sun, 27 Oct 2019 15:45:54 +0000 (UTC)
commit 17af1b00b7c3d34eac2034251192e3513d445c96
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Oct 27 17:15:03 2019 +0200
Pass IGnote and Preferences when creating addin preference widget
src/addinmanager.cpp | 2 +-
src/addinpreferencefactory.hpp | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/addinmanager.cpp b/src/addinmanager.cpp
index f8a7b6ce..698faac9 100644
--- a/src/addinmanager.cpp
+++ b/src/addinmanager.cpp
@@ -563,7 +563,7 @@ namespace {
{
IdAddinPrefsMap::const_iterator iter = m_addin_prefs.find(id);
if(iter != m_addin_prefs.end()) {
- return iter->second->create_preference_widget(m_note_manager);
+ return iter->second->create_preference_widget(IGnote::obj(), IGnote::obj().preferences(),
m_note_manager);
}
return NULL;
}
diff --git a/src/addinpreferencefactory.hpp b/src/addinpreferencefactory.hpp
index 07970cd9..9aecbb01 100644
--- a/src/addinpreferencefactory.hpp
+++ b/src/addinpreferencefactory.hpp
@@ -32,6 +32,8 @@
namespace gnote {
+class IGnote;
+
/** the base class for the preference dialog factory */
class AddinPreferenceFactoryBase
@@ -39,7 +41,7 @@ class AddinPreferenceFactoryBase
{
public:
static const char * IFACE_NAME;
- virtual Gtk::Widget * create_preference_widget(NoteManager & m) = 0;
+ virtual Gtk::Widget *create_preference_widget(IGnote & g, Preferences & p, NoteManager & m) = 0;
};
@@ -53,9 +55,9 @@ public:
{
return new AddinPreferenceFactory<_AddinType>();
}
- virtual Gtk::Widget * create_preference_widget(NoteManager & m) override
+ virtual Gtk::Widget *create_preference_widget(IGnote & g, Preferences & p, NoteManager & m) override
{
- return Gtk::manage(new _AddinType(m));
+ return Gtk::manage(new _AddinType(g, p, m));
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]