Skip to content

Commit

Permalink
fix 0750 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
wadealer committed Oct 16, 2013
1 parent 9002a6e commit 663cd0f
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions patches/0750-psi-add-join-groupchat-item-to-account-menu.diff
@@ -1,38 +1,36 @@
Index: psi/src/contactlistaccountmenu.cpp
===================================================================
--- psi.orig/src/contactlistaccountmenu.cpp 2013-01-15 14:04:15.712826601 +0400
+++ psi/src/contactlistaccountmenu.cpp 2013-01-15 14:04:15.708826601 +0400
--- psi.orig/src/contactlistaccountmenu.cpp
+++ psi/src/contactlistaccountmenu.cpp
@@ -33,6 +33,7 @@
#include "psiiconset.h"
#include "common.h"
#include "contactmanager/contactmanagerdlg.h"
+#include "mucjoindlg.h"

class ContactListAccountMenu::Private : public QObject
{
@@ -62,6 +63,7 @@
@@ -62,6 +63,7 @@ class ContactListAccountMenu::Private :
QAction* adminSetMotdAction_;
QAction* adminUpdateMotdAction_;
QAction* adminDeleteMotdAction_;
+ QAction *doGroupChatAction_;

public:
Private(ContactListAccountMenu* menu, ContactListAccountGroup* _account)
@@ -100,9 +102,12 @@
@@ -100,9 +102,12 @@ public:
contactManagerAction_ = new IconAction(tr("&Contacts Manager"), this, "psi/action_contacts_manager");
connect(contactManagerAction_, SIGNAL(triggered()), SLOT(contactManager()));

- bookmarksManageAction_ = new QAction(tr("Manage..."), this);
+ bookmarksManageAction_ = new QAction(tr("Manage Bookmarks"), this);
connect(bookmarksManageAction_, SIGNAL(triggered()), SLOT(bookmarksManage()));

+ doGroupChatAction_ = new IconAction(tr("Join Groupchat"), this, "psi/groupChat");
+ connect(doGroupChatAction_, SIGNAL(triggered()), SLOT(doGroupChat()));
+
addContactAction_ = new IconAction(tr("&Add a Contact"), this, "psi/addContact");
connect(addContactAction_, SIGNAL(triggered()), SLOT(addContact()));

@@ -143,7 +148,9 @@
@@ -143,7 +148,9 @@ public:
avatarMenu_ = menu->addMenu(IconsetFactory::icon("psi/vCard").icon(), tr("Avatar"));
avatarMenu_->addAction(setAvatarAction_);
avatarMenu_->addAction(unsetAvatarAction_);
Expand All @@ -43,19 +41,33 @@ Index: psi/src/contactlistaccountmenu.cpp
bookmarksMenu_->addAction(bookmarksManageAction_);
menu->addSeparator();
menu->addAction(addContactAction_);
@@ -191,6 +198,8 @@
@@ -191,9 +198,12 @@ private slots:
bookmarksMenu_->clear();
qDeleteAll(bookmarksJoinActions_);
bookmarksJoinActions_.clear();
+ bookmarksMenu_->addAction(doGroupChatAction_);
+ bookmarksMenu_->addSeparator();
bookmarksMenu_->addAction(bookmarksManageAction_);
+ bookmarksMenu_->setEnabled(true);
if (account->account()->bookmarkManager()->isAvailable()) {
bookmarksMenu_->setEnabled(true);
@@ -279,6 +288,15 @@
- bookmarksMenu_->setEnabled(true);
+ bookmarksManageAction_->setEnabled(true);
bookmarksMenu_->addSeparator();
foreach(ConferenceBookmark c, account->account()->bookmarkManager()->conferences()) {
QAction* joinAction = new QAction(QString(tr("Join %1")).arg(c.name()), this);
@@ -204,7 +214,7 @@ private slots:
}
}
else {
- bookmarksMenu_->setEnabled(false);
+ bookmarksManageAction_->setEnabled(false);
}

newMessageAction_->setVisible(PsiOptions::instance()->getOption("options.ui.message.enabled").toBool());
@@ -279,6 +289,15 @@ private slots:
account->account()->actionManageBookmarks();
}

+ void doGroupChat()
+ {
+ if (!account)
Expand Down

0 comments on commit 663cd0f

Please sign in to comment.