[gnote] Remove unnecessairy argument from note_conflict_detected
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove unnecessairy argument from note_conflict_detected
- Date: Sun, 25 May 2014 17:59:57 +0000 (UTC)
commit e6dce85437721bf1579ef34c46421e4ec94f09b6
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun May 25 19:59:06 2014 +0300
Remove unnecessairy argument from note_conflict_detected
src/synchronization/silentui.cpp | 5 ++---
src/synchronization/silentui.hpp | 3 +--
src/synchronization/syncdialog.cpp | 8 +++-----
src/synchronization/syncdialog.hpp | 6 ++----
src/synchronization/syncmanager.cpp | 4 ++--
src/synchronization/syncui.hpp | 3 +--
6 files changed, 11 insertions(+), 18 deletions(-)
---
diff --git a/src/synchronization/silentui.cpp b/src/synchronization/silentui.cpp
index f7cfd41..7b09e8e 100644
--- a/src/synchronization/silentui.cpp
+++ b/src/synchronization/silentui.cpp
@@ -73,8 +73,7 @@ namespace sync {
}
- void SilentUI::note_conflict_detected(NoteManager & manager,
- const Note::Ptr & localConflictNote,
+ void SilentUI::note_conflict_detected(const Note::Ptr & localConflictNote,
NoteUpdate remoteNote,
const std::list<std::string> &)
{
@@ -82,7 +81,7 @@ namespace sync {
// TODO: At least respect conflict prefs
// TODO: Implement more useful conflict handling
if(localConflictNote->id() != remoteNote.m_uuid) {
- manager.delete_note(localConflictNote);
+ m_manager.delete_note(localConflictNote);
}
ISyncManager::obj().resolve_conflict(OVERWRITE_EXISTING);
}
diff --git a/src/synchronization/silentui.hpp b/src/synchronization/silentui.hpp
index 7a52fe0..306791e 100644
--- a/src/synchronization/silentui.hpp
+++ b/src/synchronization/silentui.hpp
@@ -40,8 +40,7 @@ namespace sync {
explicit SilentUI(NoteManagerBase &);
virtual void sync_state_changed(SyncState state) override;
virtual void note_synchronized(const std::string & noteTitle, NoteSyncType type) override;
- virtual void note_conflict_detected(NoteManager & manager,
- const Note::Ptr & localConflictNote,
+ virtual void note_conflict_detected(const Note::Ptr & localConflictNote,
NoteUpdate remoteNote,
const std::list<std::string> & noteUpdateTitles) override;
virtual void present_ui() override;
diff --git a/src/synchronization/syncdialog.cpp b/src/synchronization/syncdialog.cpp
index db19906..9378ae0 100644
--- a/src/synchronization/syncdialog.cpp
+++ b/src/synchronization/syncdialog.cpp
@@ -593,8 +593,7 @@ void SyncDialog::note_synchronized(const std::string & noteTitle, NoteSyncType t
}
-void SyncDialog::note_conflict_detected(NoteManager & manager,
- const Note::Ptr & localConflictNote,
+void SyncDialog::note_conflict_detected(const Note::Ptr & localConflictNote,
NoteUpdate remoteNote,
const std::list<std::string> & noteUpdateTitles)
{
@@ -608,7 +607,6 @@ void SyncDialog::note_conflict_detected(NoteManager & manager,
// and then rethrown in the synchronization thread.
utils::main_context_call(boost::bind(
sigc::mem_fun(*this, &SyncDialog::note_conflict_detected_),
- manager,
localConflictNote,
remoteNote,
noteUpdateTitles,
@@ -625,7 +623,7 @@ void SyncDialog::note_conflict_detected(NoteManager & manager,
}
-void SyncDialog::note_conflict_detected_(NoteManager & manager,
+void SyncDialog::note_conflict_detected_(
const Note::Ptr & localConflictNote,
NoteUpdate remoteNote,
const std::list<std::string> & noteUpdateTitles,
@@ -668,7 +666,7 @@ void SyncDialog::note_conflict_detected_(NoteManager & manager,
}
// No need to delete if sync will overwrite
if(localConflictNote->id() != remoteNote.m_uuid) {
- manager.delete_note(localConflictNote);
+ m_manager.delete_note(localConflictNote);
}
break;
case RENAME_EXISTING_AND_UPDATE:
diff --git a/src/synchronization/syncdialog.hpp b/src/synchronization/syncdialog.hpp
index 1a2baa1..0c6f05e 100644
--- a/src/synchronization/syncdialog.hpp
+++ b/src/synchronization/syncdialog.hpp
@@ -46,8 +46,7 @@ namespace sync {
virtual void sync_state_changed(SyncState state) override;
virtual void note_synchronized(const std::string & noteTitle, NoteSyncType type) override;
- virtual void note_conflict_detected(NoteManager & manager,
- const Note::Ptr & localConflictNote,
+ virtual void note_conflict_detected(const Note::Ptr & localConflictNote,
NoteUpdate remoteNote,
const std::list<std::string> & noteUpdateTitles) override;
virtual void present_ui() override;
@@ -60,8 +59,7 @@ namespace sync {
virtual void on_realize() override;
private:
static void on_expander_activated(GtkExpander*, gpointer);
- void note_conflict_detected_(NoteManager & manager,
- const Note::Ptr & localConflictNote,
+ void note_conflict_detected_(const Note::Ptr & localConflictNote,
NoteUpdate remoteNote,
const std::list<std::string> & noteUpdateTitles,
SyncTitleConflictResolution savedBehavior,
diff --git a/src/synchronization/syncmanager.cpp b/src/synchronization/syncmanager.cpp
index 14b490e..987d554 100644
--- a/src/synchronization/syncmanager.cpp
+++ b/src/synchronization/syncmanager.cpp
@@ -210,7 +210,7 @@ namespace sync {
if(existingNote != 0 && !iter->second.basically_equal_to(static_pointer_cast<Note>(existingNote)))
{
DBG_OUT("Sync: Early conflict detection for '%s'", iter->second.m_title.c_str());
if(m_sync_ui != 0) {
- m_sync_ui->note_conflict_detected(note_mgr(), static_pointer_cast<Note>(existingNote),
iter->second, noteUpdateTitles);
+ m_sync_ui->note_conflict_detected(static_pointer_cast<Note>(existingNote), iter->second,
noteUpdateTitles);
}
}
}
@@ -249,7 +249,7 @@ namespace sync {
DBG_OUT("SyncManager: Content conflict in note update for note '%s'",
iter->second.m_title.c_str());
// Note already exists locally, but has been modified since last sync; prompt user
if(m_sync_ui != 0) {
- m_sync_ui->note_conflict_detected(note_mgr(), static_pointer_cast<Note>(existingNote),
iter->second, noteUpdateTitles);
+ m_sync_ui->note_conflict_detected(static_pointer_cast<Note>(existingNote), iter->second,
noteUpdateTitles);
}
// Note has been deleted or okay'd for overwrite
diff --git a/src/synchronization/syncui.hpp b/src/synchronization/syncui.hpp
index f5524d1..112ac9d 100644
--- a/src/synchronization/syncui.hpp
+++ b/src/synchronization/syncui.hpp
@@ -43,8 +43,7 @@ namespace sync {
virtual void sync_state_changed(SyncState state) = 0;
void note_synchronized_th(const std::string & noteTitle, NoteSyncType type);
virtual void note_synchronized(const std::string & noteTitle, NoteSyncType type) = 0;
- virtual void note_conflict_detected(NoteManager & manager,
- const Note::Ptr & localConflictNote,
+ virtual void note_conflict_detected(const Note::Ptr & localConflictNote,
NoteUpdate remoteNote,
const std::list<std::string> & noteUpdateTitles) = 0;
virtual void present_ui() = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]