[gnote] Fix crash on first run
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix crash on first run
- Date: Mon, 11 Mar 2013 21:07:00 +0000 (UTC)
commit e7487ffd82eb593db3de9114e46db60f58650957
Author: Aurimas Černius <aurisc4 gmail com>
Date: Mon Mar 11 23:05:32 2013 +0200
Fix crash on first run
Also do not open Start Here note on first start.
src/gnote.cpp | 9 +--------
src/gnote.hpp | 1 -
src/notemanager.cpp | 6 +-----
src/notemanager.hpp | 4 +---
4 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index ba0f9d3..95223de 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -149,7 +149,7 @@ namespace gnote {
//create singleton objects
new TagManager;
new Preferences;
- m_manager = new NoteManager(note_path, sigc::mem_fun(*this, &Gnote::start_note_created));
+ m_manager = new NoteManager(note_path);
new notebooks::NotebookManager(default_note_manager());
m_keybinder = new XKeybinder();
(new ActionManager)->load_interface();
@@ -212,13 +212,6 @@ namespace gnote {
}
}
-
- void Gnote::start_note_created(const Note::Ptr & start_note)
- {
- DBG_OUT("we will show the start note");
- open_note(start_note);
- }
-
std::string Gnote::get_note_path(const std::string & override_path)
{
std::string note_path;
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 5751590..8a16da8 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -156,7 +156,6 @@ protected:
virtual void on_window_removed(Gtk::Window *window);
private:
Gnote();
- void start_note_created(const Note::Ptr & start_note);
std::string get_note_path(const std::string & override_path);
void on_setting_changed(const Glib::ustring & key);
void common_init();
diff --git a/src/notemanager.cpp b/src/notemanager.cpp
index e4fed6d..0b96bf8 100644
--- a/src/notemanager.cpp
+++ b/src/notemanager.cpp
@@ -78,9 +78,7 @@ namespace gnote {
return (a->change_date() > b->change_date());
}
- NoteManager::NoteManager(const std::string & directory,
- const NoteChangedSlot & start_created)
- : m_signal_start_note_created(start_created)
+ NoteManager::NoteManager(const std::string & directory)
{
std::string backup = directory + "/Backup";
@@ -280,8 +278,6 @@ namespace gnote {
Note::Ptr links_note = create (_("Using Links in Gnote"),
links_note_content);
links_note->queue_save (CONTENT_CHANGED);
-
- m_signal_start_note_created(start_note);
}
catch (const std::exception & e) {
ERR_OUT("Error creating start notes: %s",
diff --git a/src/notemanager.hpp b/src/notemanager.hpp
index bf590ce..16e61af 100644
--- a/src/notemanager.hpp
+++ b/src/notemanager.hpp
@@ -45,8 +45,7 @@ namespace gnote {
typedef sigc::signal<void, const Note::Ptr &> ChangedHandler;
typedef sigc::slot<void, const Note::Ptr &> NoteChangedSlot;
- NoteManager(const std::string & ,
- const NoteChangedSlot & start_created = NoteChangedSlot() );
+ NoteManager(const std::string &);
~NoteManager();
void on_setting_changed(const Glib::ustring & key);
@@ -140,7 +139,6 @@ namespace gnote {
TrieController *m_trie_controller;
std::string m_default_note_template_title;
std::string m_start_note_uri;
- NoteChangedSlot m_signal_start_note_created;
bool m_read_only;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]