diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-22 19:58:45 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-22 19:58:45 (GMT) |
commit | fd7d3f4f994159a4990f3a0029597d4c14f727a9 (patch) | |
tree | 56286c8258cae942ae641235167b6dfdb512483a /Swift/Controllers/UIInterfaces | |
parent | 7cac59f3ec12e3440341bb561ab3c8e6c3fe80e0 (diff) | |
download | swift-contrib-fd7d3f4f994159a4990f3a0029597d4c14f727a9.zip swift-contrib-fd7d3f4f994159a4990f3a0029597d4c14f727a9.tar.bz2 |
Fixed memory leaks and segfault on signout.
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/EventWindow.h | 9 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/MainWindow.h | 14 |
2 files changed, 19 insertions, 4 deletions
diff --git a/Swift/Controllers/UIInterfaces/EventWindow.h b/Swift/Controllers/UIInterfaces/EventWindow.h index 0999e0e..e756655 100644 --- a/Swift/Controllers/UIInterfaces/EventWindow.h +++ b/Swift/Controllers/UIInterfaces/EventWindow.h @@ -12,8 +12,17 @@ namespace Swift { class EventWindow { public: + EventWindow(bool candelete = true) : canDelete_(candelete) {} + + bool canDelete() const { + return canDelete_; + } + virtual ~EventWindow() {}; virtual void addEvent(boost::shared_ptr<StanzaEvent> event, bool active) = 0; virtual void removeEvent(boost::shared_ptr<StanzaEvent> event) = 0; + + private: + bool canDelete_; }; } diff --git a/Swift/Controllers/UIInterfaces/MainWindow.h b/Swift/Controllers/UIInterfaces/MainWindow.h index 5d0c14e..570c919 100644 --- a/Swift/Controllers/UIInterfaces/MainWindow.h +++ b/Swift/Controllers/UIInterfaces/MainWindow.h @@ -4,8 +4,7 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#ifndef SWIFTEN_MainWindow_H -#define SWIFTEN_MainWindow_H +#pragma once #include "Swiften/Base/String.h" #include "Swiften/JID/JID.h" @@ -19,7 +18,13 @@ namespace Swift { class MainWindow { public: + MainWindow(bool candelete = true) : canDelete_(candelete) {} virtual ~MainWindow() {}; + + bool canDelete() const { + return canDelete_; + } + virtual void setMyName(const String& name) = 0; virtual void setMyAvatarPath(const String& path) = 0; virtual void setMyStatusText(const String& status) = 0; @@ -29,7 +34,8 @@ namespace Swift { boost::signal<void (StatusShow::Type, const String&)> onChangeStatusRequest; boost::signal<void (bool)> onShowOfflineToggled; boost::signal<void ()> onSignOutRequest; + + private: + bool canDelete_; }; } -#endif - |