diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp index 996825a80..e3453f294 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp @@ -37,6 +37,10 @@ #include +#define COLUMN_ICON 0 +#define COLUMN_NAME 1 +#define COLUMN_COUNT 2 + /** Default constructor */ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::WFlags flags) : ChatDialog(parent, flags), lobbyId(lid) @@ -46,9 +50,11 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::WF connect(ui.participantsFrameButton, SIGNAL(toggled(bool)), this, SLOT(showParticipantsFrame(bool))); connect(ui.actionChangeNickname, SIGNAL(triggered()), this, SLOT(changeNickname())); - connect(ui.participantsList, SIGNAL( customContextMenuRequested(QPoint)), this, SLOT( participantsTreeWidgetCostumPopupMenu(QPoint))); + connect(ui.participantsList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(participantsTreeWidgetCostumPopupMenu(QPoint))); + connect(ui.participantsList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(participantsTreeWidgetDoubleClicked(QTreeWidgetItem*,int))); - ui.participantsList->setRootIsDecorated(false); + ui.participantsList->setColumnCount(COLUMN_COUNT); + ui.participantsList->setColumnWidth(COLUMN_ICON, 20); // Mute a Participant muteAct = new QAction(QIcon(), tr("Mute participant"), this); @@ -57,15 +63,23 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::WF void ChatLobbyDialog::participantsTreeWidgetCostumPopupMenu(QPoint) { - QTreeWidgetItem *item = getCurrentParticipant(); + QList selectedItems = ui.participantsList->selectedItems(); QMenu contextMnu(this); contextMnu.addAction(muteAct); - muteAct->setEnabled(item != NULL); muteAct->setCheckable(true); - if (item) { - muteAct->setChecked(isParticipantMuted(item->text(0))); + muteAct->setEnabled(false); + if (selectedItems.size()) { + muteAct->setEnabled(true); + + QList::iterator item; + for (item = selectedItems.begin(); item != selectedItems.end(); ++item) { + if (isParticipantMuted((*item)->text(COLUMN_NAME))) { + muteAct->setChecked(true); + break; + } + } } else { muteAct->setChecked(false); } @@ -239,6 +253,15 @@ void ChatLobbyDialog::addIncomingChatMsg(const ChatInfo& info) */ void ChatLobbyDialog::updateParticipantsList() { + /* Save selected items */ + QStringList selectedParcipants; + QList selectedItems = ui.participantsList->selectedItems(); + + QList::iterator item; + for (item = selectedItems.begin(); item != selectedItems.end(); ++item) { + selectedParcipants.append((*item)->text(COLUMN_NAME)); + } + ui.participantsList->clear(); ui.participantsList->setSortingEnabled(false); @@ -258,18 +281,23 @@ void ChatLobbyDialog::updateParticipantsList() QTreeWidgetItem *widgetitem = new RSTreeWidgetItem; if (isParticipantMuted(participant)) { - widgetitem->setIcon(0,(QIcon(":/images/yellowled.png"))); + widgetitem->setIcon(COLUMN_ICON, QIcon(":/images/yellowled.png")); } else { - widgetitem->setIcon(0,(QIcon(":/images/greenled.png"))); + widgetitem->setIcon(COLUMN_ICON, QIcon(":/images/greenled.png")); } - widgetitem->setText(0, participant); - widgetitem->setToolTip(0,(tr("right click,and check to mute participant"))); + widgetitem->setToolTip(COLUMN_ICON, tr("Double click to mute/unmute participant")); + + widgetitem->setText(COLUMN_NAME, participant); + widgetitem->setToolTip(COLUMN_NAME, tr("Right click to mute/unmute participants")); ui.participantsList->addTopLevelItem(widgetitem); + if (selectedParcipants.contains(participant)) { + widgetitem->setSelected(true); + } } } ui.participantsList->setSortingEnabled(true); - ui.participantsList->sortItems(0, Qt::AscendingOrder); + ui.participantsList->sortItems(COLUMN_NAME, Qt::AscendingOrder); } /** @@ -283,22 +311,48 @@ void ChatLobbyDialog::updateParticipantsList() */ void ChatLobbyDialog::changePartipationState() { - QTreeWidgetItem *item = getCurrentParticipant(); - if (!item) + QList selectedItems = ui.participantsList->selectedItems(); + if (selectedItems.size() == 0) { return; - - QString nickname = item->text(0); - - std::cerr << "check Partipation status for '" << nickname.toStdString() << std::endl; - - if (muteAct->isChecked()) { - muteParticipant(nickname); - } else { - unMuteParticipant(nickname); } - + + QList::iterator item; + for (item = selectedItems.begin(); item != selectedItems.end(); ++item) { + QString nickname = (*item)->text(COLUMN_NAME); + + std::cerr << "check Partipation status for '" << nickname.toUtf8().constData() << std::endl; + + if (muteAct->isChecked()) { + muteParticipant(nickname); + } else { + unMuteParticipant(nickname); + } + } + mutedParticipants->removeDuplicates(); - + + updateParticipantsList(); +} + +void ChatLobbyDialog::participantsTreeWidgetDoubleClicked(QTreeWidgetItem *item, int column) +{ + if (!item) { + return; + } + + if (column != COLUMN_ICON) { + return; + } + + QString nickname = item->text(COLUMN_NAME); + if (isParticipantMuted(nickname)) { + unMuteParticipant(nickname); + } else { + muteParticipant(nickname); + } + + mutedParticipants->removeDuplicates(); + updateParticipantsList(); } @@ -424,13 +478,3 @@ void ChatLobbyDialog::showParticipantsFrame(bool show) PeerSettings->setShowParticipantsFrame(getPeerId(), show); } - -QTreeWidgetItem *ChatLobbyDialog::getCurrentParticipant() -{ - if (ui.participantsList->selectedItems().size() != 0) { - return ui.participantsList->currentItem(); - } - - return NULL; -} - diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.h b/retroshare-gui/src/gui/chat/ChatLobbyDialog.h index 859cf5530..cf2b26584 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.h +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.h @@ -61,10 +61,9 @@ protected: protected slots: void changeNickname(); void changePartipationState(); + void participantsTreeWidgetDoubleClicked(QTreeWidgetItem *item, int column); private: - QTreeWidgetItem *getCurrentParticipant(); - void updateParticipantsList(); void muteParticipant(const QString &nickname); diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui b/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui index 315929085..b2154d55c 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.ui @@ -119,12 +119,18 @@ Qt::CustomContextMenu + + QAbstractItemView::ExtendedSelection + 16 16 + + false + true @@ -135,13 +141,10 @@ false - false + true - true - - - true + false diff --git a/retroshare-gui/src/lang/retroshare_de.ts b/retroshare-gui/src/lang/retroshare_de.ts index 934bef009..15ed417f5 100644 --- a/retroshare-gui/src/lang/retroshare_de.ts +++ b/retroshare-gui/src/lang/retroshare_de.ts @@ -956,7 +956,7 @@ Bitte wähle einen zum Chatten aus. Uncheck to mute participant - Haken entfernen, um Teilnehmer stumm zu schalten + Haken entfernen, um Teilnehmer stumm zu schalten %1 changed his name to: %2 @@ -966,6 +966,22 @@ Bitte wähle einen zum Chatten aus. Lobby chat Lobbychat + + Participants + + + + Mute participant + + + + Double click to mute/unmute participant + + + + Right click to mute/unmute participants + + ChatLobbyToaster @@ -4129,7 +4145,7 @@ p, li { white-space: pre-wrap; } Search forums - Forum durchsuchen + Forum durchsuchen Original Message @@ -4160,7 +4176,19 @@ p, li { white-space: pre-wrap; } Du kannst einem anonymen Autor nicht antworten - Search this forum... + Search Title + + + + Search Date + + + + Search Author + + + + Search Content @@ -4762,23 +4790,23 @@ p, li { white-space: pre-wrap; } Create new Profile - Neues Profil erstellen + Neues Profil erstellen Create new Forum - Neues Forum erstellen + Neues Forum erstellen F - F + F Create new Channel - Neuen Kanal erstellen + Neuen Kanal erstellen C - C + C Add your Avatar Picture @@ -5101,19 +5129,19 @@ Gib, wenn du gefragt wirst, dein PGP Passwort ein, um deinen neuen Schlüssel zu Select Trusted Friend - Wähle vertrauten Freund + Wähle vertrauten Freund Certificates (*.pqi *.pem) - Zertifikate (*.pqi *.pem) + Zertifikate (*.pqi *.pem) Multiple instances - Mehrere Instanzen + Mehrere Instanzen Another RetroShare using the same profile is already running on your system. Please close that instance first - Ein laufendes RetroShare benutzt das gleiche Profil. Bitte schließe diese Instanz + Ein laufendes RetroShare benutzt das gleiche Profil. Bitte schließe diese Instanz Generate ID Failure @@ -5121,7 +5149,7 @@ Gib, wenn du gefragt wirst, dein PGP Passwort ein, um deinen neuen Schlüssel zu Failed to Load your new Certificate! - Fehler beim Laden deines neuen Zertifikates! + Fehler beim Laden deines neuen Zertifikates! [Optional] Visible to your friends, and friends of friends. @@ -5234,7 +5262,7 @@ und den Import zum Laden verwenden RetroShare uses gpg keys for identity management. You can use an existing identity (i.e. a gpg key pair), from the list below, or create a new one with this form. - Du kannst eine vorhandene Identität (PGP-Schlüssel) aus der Liste benutzen oder ein neue mit diesem Dialog erstellen. + Du kannst eine vorhandene Identität (PGP-Schlüssel) aus der Liste benutzen oder ein neue mit diesem Dialog erstellen. Your identity was not saved. An error occurred. @@ -5246,7 +5274,23 @@ You can use an existing identity (i.e. a gpg key pair), from the list below, or An unexpected error occurred when Retroshare tried to acquire the single instance lock - Ein unerwarteter Fehler während des "Single instance lock" ist aufgetreten + Ein unerwarteter Fehler während des "Single instance lock" ist aufgetreten + + + RetroShare uses gpg keys for identity management. + + + + You can create a new identity with this form. + + + + You can use an existing identity (i.e. a gpg key pair), from the list below, or create a new one with this form. + + + + Failed to Generate your new Certificate, maybe PGP password is wrong! + @@ -5629,11 +5673,45 @@ p, li { white-space: pre-wrap; } Favoriten + + GroupFlagsWidget + + All your friends can browse this directory + + + + + Only friends in groups + + + + can browse this directory + + + + + No one can browse this directory + + + + + All your friends can relay anonymous tunnels to this directory + + + + can relay anonymous tunnels to this directory + + + + No one can anonymously access this directory. + + + GroupTreeWidget Enter a Keyword here - Gib einen Suchbegriff ein + Gib einen Suchbegriff ein Title @@ -5659,6 +5737,14 @@ p, li { white-space: pre-wrap; } Private Key Available Privater Schlüssel verfügbar + + Search Title + + + + Search Description + + GuiExprElement @@ -7387,6 +7473,30 @@ Möchtest du die Nachricht speichern ? No starred messages available. Stars let you give messages a special status to make them easier to find. To star a message, click on the light gray star beside any message. Es sind keine gekennzeichneten Nachrichten vorhanden. Durch die Kennzeichnung kannst du Nachrichten mit einem speziellen Status versehen, sodass sie leichter zu finden sind. Klicke zum Kennzeichnen einer Nachricht auf den hellgrauen Stern neben der jeweiligen Nachricht. + + Search Subject + + + + Search From + + + + Search Date + + + + Search Content + + + + Search Tags + + + + Search Attachments + + MessengerWindow @@ -7406,6 +7516,10 @@ Möchtest du die Nachricht speichern ? Search Friends Freunde suchen + + Search + Suchen + MsgItem @@ -7685,6 +7799,14 @@ Rechtsklick und als Freund hinzufügen um zu verbinden. Display Anzeigen + + Search Name + + + + Search Peer ID + + NetworkPage @@ -9360,6 +9482,22 @@ Fehlermeldung: %2 Ein unerwarteter Fehler während des "Single instance lock" ist aufgetreten + + Directory is browsable for friends from parent groups + + + + Directory is accessible by anonymous tunnels from friends from parent groups + + + + Directory is browsable for any friend + + + + Directory is accessible by anonymous tunnels from any friend + + QuickStartWizard @@ -9674,15 +9812,15 @@ p, li { white-space: pre-wrap; } RetroshareDirModel Anonymous - Anonym + Anonym Anonymous and browsable by friends - Anonym und Durchsuchbar von Freunden + Anonym und Durchsuchbar von Freunden Only browsable by friends - Nur Durchsuchbar von Freunden + Nur Durchsuchbar von Freunden NEW @@ -9918,7 +10056,7 @@ Bild auf %1x%2 Pixel reduzieren? File Size - Dateigröße + Dateigröße Filename @@ -10350,32 +10488,36 @@ Voreinstellung ist 20. Browseable by Friends - Durchsuchbar von Freunden + Durchsuchbar von Freunden Browsable - Durchsuchbar + Durchsuchbar Anonymous shared Network Wide - Anonym im ganzen Netzwerk freigeben + Anonym im ganzen Netzwerk freigeben Network Wide - Netzwerkweit + Netzwerkweit OK - OK + OK Cancel - Abbrechen + Abbrechen Select A Folder To Share Wähle einen Ordner zum Freigeben aus + + Share flags and groups: + + ShareKey @@ -10444,11 +10586,11 @@ p, li { white-space: pre-wrap; } Network Wide - Netzwerkweit + Netzwerkweit Browsable - Durchsuchbar + Durchsuchbar Add a Share Directory @@ -10468,7 +10610,7 @@ p, li { white-space: pre-wrap; } Close - Schließen + Schließen Edit selected Shared Directory @@ -10480,11 +10622,11 @@ p, li { white-space: pre-wrap; } If checked, the share is anonymously shared to anybody. - Wenn aktiviert, dann ist dieser Ordner anonym freigegeben. + Wenn aktiviert, dann ist dieser Ordner anonym freigegeben. If checked, the share is browsable by your friends. - Wenn aktiviert, dann ist dieser Ordner von deinen Freunden durchsuchbar. + Wenn aktiviert, dann ist dieser Ordner von deinen Freunden durchsuchbar. Warning! @@ -10510,6 +10652,18 @@ p, li { white-space: pre-wrap; } Share Manager Freigabemanager + + Share flags + + + + Parent groups + + + + Apply and close + + SharedFilesDialog @@ -10783,15 +10937,15 @@ p, li { white-space: pre-wrap; } Multiple instances - Mehrere Instanzen + Mehrere Instanzen Login Failure - Anmeldefehler + Anmeldefehler Maybe password is wrong - Vielleicht ist das Passwort falsch + Vielleicht ist das Passwort falsch Warning @@ -10801,7 +10955,7 @@ p, li { white-space: pre-wrap; } Another RetroShare using the same profile is already running on your system. Please close that instance first, or choose another profile lock file: - Ein laufendes RetroShare benutzt das gleiche Profil. Bitte schließe diese Instanz oder wähle ein anderes Profil + Ein laufendes RetroShare benutzt das gleiche Profil. Bitte schließe diese Instanz oder wähle ein anderes Profil Lockdatei: @@ -10809,7 +10963,7 @@ Lockdatei: An unexpected error occurred when Retroshare tried to acquire the single instance lock lock file: - Ein unerwarteter Fehler während des "Single instance lock" ist aufgetreten + Ein unerwarteter Fehler während des "Single instance lock" ist aufgetreten Lockdatei: @@ -11093,6 +11247,14 @@ p, li { white-space: pre-wrap; } Save Channel File Datei speichern + + Open + + + + Open File + Datei öffnen + TBoard @@ -11601,6 +11763,10 @@ Bitte habe etwas Geduld! What's new Was ist neu + + Groups + Gruppen + TrustView