Permalink
Browse files

Merge commit 'refs/merge-requests/217' of git://gitorious.org/kadu/kadu

Conflicts:
	ChangeLog

Signed-off-by: Rafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
  • Loading branch information...
2 parents 501c67b + 3d269c0 commit edf252e590fb4307a6252dd40f78789b519dd370 @vogel committed May 11, 2012
Showing with 30 additions and 1 deletion.
  1. +1 −0 ChangeLog
  2. +22 −1 kadu-core/gui/windows/buddy-delete-window.cpp
  3. +7 −0 kadu-core/gui/windows/buddy-delete-window.h
View
@@ -21,6 +21,7 @@
* core: #2551 done: use the most online account's status for the tray icon (ultr)
* gui: #2581 fixed: properly ignore non-existing avatars (Vogel)
* core: #2559 fixed: StatusContainer::status() should return actual status instead of desired one (ultr)
+* gui: #2069 fixed: toggle checkboxes when the items are clicked in Delete Buddy window (ultr)
+++ version 0.12.0-beta1
* tabs: "Close all tabs but active one" action added (Juzef)
@@ -2,7 +2,7 @@
* %kadu copyright begin%
* Copyright 2010, 2010, 2011 Piotr Galiszewski (piotr.galiszewski@kadu.im)
* Copyright 2009 Wojciech Treter (juzefwt@gmail.com)
- * Copyright 2010 Piotr Dąbrowski (ultr@ultr.pl)
+ * Copyright 2010, 2012 Piotr Dąbrowski (ultr@ultr.pl)
* Copyright 2009 Bartłomiej Zimoń (uzi18@o2.pl)
* Copyright 2004 Adrian Smarzewski (adrian@kadu.net)
* Copyright 2007, 2008, 2009, 2010, 2011 Rafał Malinowski (rafal.przemyslaw.malinowski@gmail.com)
@@ -86,6 +86,8 @@ void BuddyDeleteWindow::createGui()
AdditionalDataListView = new QListWidget(contentWidget);
contentLayout->addWidget(AdditionalDataListView);
+ connect(AdditionalDataListView, SIGNAL(itemPressed(QListWidgetItem *)), this, SLOT(additionalDataListViewItemPressed(QListWidgetItem *)));
+ connect(AdditionalDataListView, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(additionalDataListViewItemClicked(QListWidgetItem *)));
fillAdditionalDataListView();
@@ -160,3 +162,22 @@ void BuddyDeleteWindow::reject()
{
QDialog::reject();
}
+
+void BuddyDeleteWindow::additionalDataListViewItemPressed(QListWidgetItem *item)
+{
+ if (!item)
+ return;
+
+ // required for proper handling of mouse double clicks
+ ItemState = item->checkState();
+}
+
+void BuddyDeleteWindow::additionalDataListViewItemClicked(QListWidgetItem *item)
+{
+ if (!item)
+ return;
+
+ ItemState = (ItemState == Qt::Unchecked ? Qt::Checked : Qt::Unchecked);
+
+ item->setCheckState(ItemState);
+}
@@ -6,6 +6,7 @@
* Copyright 2004 Adrian Smarzewski (adrian@kadu.net)
* Copyright 2007, 2008, 2009, 2010 Rafał Malinowski (rafal.przemyslaw.malinowski@gmail.com)
* Copyright 2004, 2006 Marcin Ślusarz (joi@kadu.net)
+ * Copyright 2012 Piotr "ultr" Dąbrowski (ultr@ultr.pl)
* %kadu copyright end%
*
* This program is free software; you can redistribute it and/or
@@ -26,6 +27,7 @@
#define BUDDY_DELETE_WINDOW_H
#include <QtGui/QDialog>
+#include <QtGui/QListWidgetItem>
#include "buddies/buddy-set.h"
@@ -38,13 +40,18 @@ class BuddyDeleteWindow : public QDialog
BuddySet BuddiesToDelete;
QListWidget *AdditionalDataListView;
+ Qt::CheckState ItemState;
void createGui();
void fillAdditionalDataListView();
QString getBuddiesNames();
void deleteBuddy(Buddy buddy);
+private slots:
+ void additionalDataListViewItemPressed(QListWidgetItem *item);
+ void additionalDataListViewItemClicked(QListWidgetItem *item);
+
public:
explicit BuddyDeleteWindow(const BuddySet &buddiesToDelete, QWidget *parent = 0);
virtual ~BuddyDeleteWindow();

0 comments on commit edf252e

Please sign in to comment.