diff options
| author | Richard Maudsley <richard.maudsley@isode.com> | 2014-03-14 14:15:34 (GMT) |
|---|---|---|
| committer | Kevin Smith <git@kismith.co.uk> | 2014-04-02 11:14:52 (GMT) |
| commit | c9275affd040ee1ca7c1d599b28df3b363bef888 (patch) | |
| tree | 04afffe1e766f897f2208cf097a307a5fe530032 /Swift/QtUI/QtHistoryWindow.cpp | |
| parent | b92fe0b47d519da5fd55ba55ad0838e1ff69195c (diff) | |
| download | swift-contrib-c9275affd040ee1ca7c1d599b28df3b363bef888.zip swift-contrib-c9275affd040ee1ca7c1d599b28df3b363bef888.tar.bz2 | |
Make the impromptu MUCs behave more like a regular chat.
This hides occupant types in the participant list and initiates a
direct 1-to-1 on occupant double-click instead of MUC-proxied 1-to-1.
Change-Id: I76c57fe52beb3e4236524c1d8cfbd583d3dc3f62
Diffstat (limited to 'Swift/QtUI/QtHistoryWindow.cpp')
| -rw-r--r-- | Swift/QtUI/QtHistoryWindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/QtHistoryWindow.cpp b/Swift/QtUI/QtHistoryWindow.cpp index 9f88258..75eeaad 100644 --- a/Swift/QtUI/QtHistoryWindow.cpp +++ b/Swift/QtUI/QtHistoryWindow.cpp @@ -28,71 +28,71 @@ #include <Swiften/History/HistoryMessage.h> #include <Swift/Controllers/Settings/SettingsProvider.h> #include <Swift/Controllers/UIEvents/UIEventStream.h> #include <Swift/QtUI/QtSwiftUtil.h> #include <Swift/QtUI/MessageSnippet.h> #include <Swift/QtUI/QtScaledAvatarCache.h> #include <Swift/QtUI/ChatSnippet.h> #include <Swift/QtUI/QtUtilities.h> #include <Swift/QtUI/Roster/QtTreeWidget.h> #include <Swift/QtUI/QtWebKitChatView.h> namespace Swift { QtHistoryWindow::QtHistoryWindow(SettingsProvider* settings, UIEventStream* eventStream) : previousTopMessageWasSelf_(false), previousBottomMessageWasSelf_(false) { ui_.setupUi(this); theme_ = new QtChatTheme(""); idCounter_ = 0; delete ui_.conversation_; conversation_ = new QtWebKitChatView(NULL, NULL, theme_, this, true); // Horrible unsafe. Do not do this. FIXME QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(80); sizePolicy.setVerticalStretch(0); conversation_->setSizePolicy(sizePolicy); ui_.conversation_ = conversation_; ui_.bottomLayout_->addWidget(conversation_); delete ui_.conversationRoster_; - conversationRoster_ = new QtTreeWidget(eventStream, settings, this); + conversationRoster_ = new QtTreeWidget(eventStream, settings, QtTreeWidget::MessageDefaultJID, this); QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Expanding); sizePolicy2.setVerticalStretch(80); conversationRoster_->setSizePolicy(sizePolicy2); ui_.conversationRoster_ = conversationRoster_; ui_.bottomLeftLayout_->setDirection(QBoxLayout::BottomToTop); ui_.bottomLeftLayout_->addWidget(conversationRoster_); setWindowTitle(tr("History")); conversationRoster_->onSomethingSelectedChanged.connect(boost::bind(&QtHistoryWindow::handleSomethingSelectedChanged, this, _1)); connect(conversation_, SIGNAL(scrollRequested(int)), this, SLOT(handleScrollRequested(int))); connect(conversation_, SIGNAL(scrollReachedTop()), this, SLOT(handleScrollReachedTop())); connect(conversation_, SIGNAL(scrollReachedBottom()), this, SLOT(handleScrollReachedBottom())); connect(conversation_, SIGNAL(fontResized(int)), this, SLOT(handleFontResized(int))); connect(ui_.searchBox_->lineEdit(), SIGNAL(returnPressed()), this, SLOT(handleReturnPressed())); connect(ui_.calendarWidget_, SIGNAL(clicked(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); connect(ui_.calendarWidget_, SIGNAL(activated(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); connect(ui_.previousButton_, SIGNAL(clicked(bool)), this, SLOT(handlePreviousButtonClicked())); connect(ui_.nextButton_, SIGNAL(clicked(bool)), this, SLOT(handleNextButtonClicked())); } QtHistoryWindow::~QtHistoryWindow() { disconnect(conversation_, SIGNAL(scrollRequested(int)), this, SLOT(handleScrollRequested(int))); disconnect(conversation_, SIGNAL(scrollReachedTop()), this, SLOT(handleScrollReachedTop())); disconnect(conversation_, SIGNAL(scrollReachedBottom()), this, SLOT(handleScrollReachedBottom())); disconnect(conversation_, SIGNAL(fontResized(int)), this, SLOT(handleFontResized(int))); disconnect(ui_.searchBox_->lineEdit(), SIGNAL(returnPressed()), this, SLOT(handleReturnPressed())); disconnect(ui_.calendarWidget_, SIGNAL(clicked(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); disconnect(ui_.calendarWidget_, SIGNAL(activated(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); disconnect(ui_.previousButton_, SIGNAL(clicked(bool)), this, SLOT(handlePreviousButtonClicked())); disconnect(ui_.nextButton_, SIGNAL(clicked(bool)), this, SLOT(handleNextButtonClicked())); delete theme_; delete conversation_; // TODO: delete ui_ |
Swift