diff --git a/src/widget/form/groupchatform.cpp b/src/widget/form/groupchatform.cpp index 3efa71f2a..32bed5cc5 100644 --- a/src/widget/form/groupchatform.cpp +++ b/src/widget/form/groupchatform.cpp @@ -101,13 +101,18 @@ void GroupChatForm::onSendTriggered() msgEdit->setLastMessage(msg); msgEdit->clear(); - if (msg.startsWith("/me ")) + if (group->getPeersCount() != 1) { - msg = msg.right(msg.length() - 4); - emit sendAction(group->getGroupId(), msg); - } else { - emit sendMessage(group->getGroupId(), msg); + if (msg.startsWith("/me ")) + { + msg = msg.right(msg.length() - 4); + emit sendAction(group->getGroupId(), msg); + } + else + emit sendMessage(group->getGroupId(), msg); } + else + addSelfMessage(msg, msg.startsWith("/me "), QDateTime::currentDateTime(), true); } void GroupChatForm::onUserListChanged() diff --git a/src/widget/groupwidget.cpp b/src/widget/groupwidget.cpp index 60c5d2297..b180fc3c0 100644 --- a/src/widget/groupwidget.cpp +++ b/src/widget/groupwidget.cpp @@ -51,7 +51,7 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event) { QPoint pos = event->globalPos(); QMenu menu; - QAction* setAlias = menu.addAction(tr("Set title...")); + QAction* setTitle = menu.addAction(tr("Set title...")); QAction* quitGroup = menu.addAction(tr("Quit group","Menu to quit a groupchat")); QAction* selectedItem = menu.exec(pos); @@ -59,7 +59,7 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event) { if (selectedItem == quitGroup) emit removeGroup(groupId); - else if (selectedItem == setAlias) + else if (selectedItem == setTitle) { bool ok; Group* g = GroupList::findGroup(groupId); @@ -69,6 +69,7 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event) if (ok && alias != nameLabel->fullText()) emit g->getChatForm()->groupTitleChanged(groupId, alias.left(128)); + this->repaint(); } } } diff --git a/src/widget/systemtrayicon.cpp b/src/widget/systemtrayicon.cpp index 329c9ce42..343a48071 100644 --- a/src/widget/systemtrayicon.cpp +++ b/src/widget/systemtrayicon.cpp @@ -331,7 +331,7 @@ void SystemTrayIcon::setVisible(bool newState) } } -void SystemTrayIcon::setIcon(QIcon &&icon) +void SystemTrayIcon::setIcon(QIcon &icon) { if (false); #ifdef ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND diff --git a/src/widget/systemtrayicon.h b/src/widget/systemtrayicon.h index 1d062acfa..f15dec04a 100644 --- a/src/widget/systemtrayicon.h +++ b/src/widget/systemtrayicon.h @@ -17,7 +17,7 @@ public: void show(); void hide(); void setVisible(bool); - void setIcon(QIcon&& icon); + void setIcon(QIcon &icon); signals: void activated(QSystemTrayIcon::ActivationReason); diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index a3d08b981..6549e8273 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -92,6 +92,10 @@ void Widget::init() { ui->setupUi(this); + QIcon themeIcon = QIcon::fromTheme("qtox"); + if (!themeIcon.isNull()) + setWindowIcon(themeIcon); + timer = new QTimer(); timer->start(1000); offlineMsgTimer = new QTimer(); @@ -224,6 +228,9 @@ void Widget::setTranslation() void Widget::updateTrayIcon() { + if (!icon) + return; + QString status; if (eventIcon) status = "event"; @@ -233,10 +240,15 @@ void Widget::updateTrayIcon() if (!status.length()) status = "offline"; } - QString color = Settings::getInstance().getLightTrayIcon() ? "light" : "dark"; - QString pic = ":img/taskbar/" + color + "/taskbar_" + status + ".svg"; - if (icon) - icon->setIcon(QIcon(pic)); + + QIcon ico = QIcon::fromTheme("qtox-" + status); + if (ico.isNull()) + { + QString color = Settings::getInstance().getLightTrayIcon() ? "light" : "dark"; + ico = QIcon(":img/taskbar/" + color + "/taskbar_" + status + ".svg"); + } + + icon->setIcon(ico); } Widget::~Widget() diff --git a/translations/it.ts b/translations/it.ts index 5abd10ec5..8486a4f7f 100644 --- a/translations/it.ts +++ b/translations/it.ts @@ -288,80 +288,80 @@ Ignorare le impostazioni del proxy e connettersi direttamente alla rete Tox? ChatForm - + Load chat history... Carica cronologia chat... - + Send a file Invia un file - - + + File not read Impossibile leggere il file - - + + qTox wasn't able to open %1 qTox non è riuscito ad aprire %1 - - + + Bad Idea Pessima idea - - + + You're trying to send a special (sequential) file, that's not going to work! Stai cercando di inviare un file speciale (sequenziale), questo non funzionerà! - + Accept video call Accetta videochiamata - + Accept audio call Accetta chiamata - + %1 calling %1 ti sta chiamando - + End video call Termina videochiamata - + End audio call Termina chiamata - - + + Mute microphone Disattiva microfono - - + + Mute call Disattiva audio - + %1 stopped calling %1 ha fermato la chiamata @@ -381,37 +381,37 @@ Ignorare le impostazioni del proxy e connettersi direttamente alla rete Tox?Stai chiamando %1 - + Start audio call Avvia chiamata - + Start video call Avvia videochiamata - + Unmute microphone Attiva microfono - + Unmute call Attiva audio - + Failed to send file "%1" Invio del file "%1" fallito - + Call with %1 ended. %2 Chiamata con %1 terminata. %2 - + Call duration: Durata chiamata: @@ -590,37 +590,37 @@ Disabilitando la cronologia delle chat lascerà la cronologia criptata intatta ( [anteprima] - + Waiting to send... file transfer widget In attesa di inviare... - + Accept to receive this file file transfer widget Accetta la ricezione di questo file - + Location not writable Title of permissions popup Errore - + You do not have permission to write that location. Choose another, or cancel the save dialog. text of permissions popup Non hai sufficienti permessi per scrivere in questa locazione. Scegli un'altra posizione, o annulla il salvataggio. - + paused file transfer widget in pausa - + Save a file Title of the file saving dialog Salva file @@ -684,47 +684,47 @@ Disabilitando la cronologia delle chat lascerà la cronologia criptata intatta ( FriendWidget - + Copy friend ID Menu to copy the Tox ID of that friend Copia Tox ID del contatto - + Auto accept files from this friend context menu entry Accetta automaticamente i files inviati da questo contatto - + Invite to group Menu to invite a friend to a groupchat Invita nel gruppo - + Set alias... Imposta soprannome... - + Remove friend Menu to remove the friend from our friendlist Rimuovi contatto - + Choose an auto accept directory popup title Scegli dove salvare i files accettati automaticamente - + User alias Rinomina contatto - + You can also set this by clicking the chat form name. Alias: Per impostare un soprannome puoi anche cliccare sul nome direttamente dalla chat. @@ -1117,7 +1117,7 @@ will be sent to them when they will appear online to you. - + Save chat log Salva il log della chat @@ -1127,12 +1127,12 @@ will be sent to them when they will appear online to you. Rimuovi messaggi visualizzati - + Not sent Non inviato - + Cleared Pulito @@ -1146,39 +1146,39 @@ will be sent to them when they will appear online to you. %1 utenti in chat - + %1 users in chat %1 utenti in chat - - + + Mute microphone Disattiva microfono - + Unmute microphone Attiva microfono - - + + Mute call Disattiva audio - + Unmute call Attiva audio - + End audio call Termina chiamata - + Start audio call Avvia chiamata @@ -1221,136 +1221,6 @@ Title: Nome gruppo: - - IdentityForm - - - Identity - Identità - - - - Call active - popup title - Chiamata in corso - - - - You can't switch profiles while a call is active! - popup text - Non puoi cambiare profilo durante una chiamata! - - - - Rename "%1" - renaming a profile - Rinomina "%1" - - - - Profile already exists - rename confirm title - Profilo già esistente - - - - A profile named "%1" already exists. Do you want to erase it? - rename confirm text - Un profilo chiamato "%1" esiste già. Vuoi sovrascriverlo? - - - - Export profile - save dialog title - Esporta profilo - - - - Tox save file (*.tox) - save dialog filter - Tox save file (*.tox) - - - - Failed to remove file - Impossibile rimuovere il file - - - - The file you chose to overwrite could not be removed first. - Il file che hai scelto di sovrascrivere non può essere prima rimosso. - - - - Failed to copy file - Impossibile copiare il file - - - - The file you chose could not be written to. - Il file che hai scelto non può essere copiato. - - - - Profile currently loaded - current profile deletion warning title - Profilo attualmente in uso - - - - This profile is currently in use. Please load a different profile before deleting this one. - current profile deletion warning text - Questo profilo è attualmente in uso. Per favore carica un profilo differente prima di eliminare questo. - - - - Deletion imminent! - deletion confirmation title - Eliminazione imminente! - - - - Are you sure you want to delete this profile? - deletion confirmation text - Sei sicuro di voler eliminare questo profilo? - - - - Import profile - import dialog title - Importa profilo - - - - Tox save file (*.tox) - import dialog filter - Tox save file (*.tox) - - - - Ignoring non-Tox file - popup title - File ignorato - - - - Warning: you've chosen a file that is not a Tox save file; ignoring. - popup text - Attenzione: hai scelto un file che non contiente un profilo Tox.\nQuesto file verrà ignorato. - - - - Profile already exists - import confirm title - Profilo già esistente - - - - A profile named "%1" already exists. Do you want to erase it? - import confirm text - Un profilo chiamato "%1" esiste già. Vuoi sovrascriverlo? - - IdentitySettings @@ -1359,22 +1229,22 @@ Nome gruppo: Informazioni Pubbliche - + Name Nome - + Status Stato - + Tox ID Tox ID - + This bunch of characters tells other Tox clients how to contact you. Share it with your friends to communicate. Tox ID tooltip @@ -1382,58 +1252,58 @@ Share it with your friends to communicate. Condivilo con chi vuoi comunicare. - + Your Tox ID (click to copy) (clicca qui per copiare) - + Profiles Gestione Profili - + Available profiles: Profili disponibili: - + Currently selected profile. toolTip for currently set profile Profilo corrente. - + Load selected profile and switch to it. tooltip for loading profile button Carica il profilo selezionato. - + Load load profile button Carica - + Rename rename profile button Rinomina - + Rename selected profile. tooltip for renaming profile button Rinomina il profilo selezionato. - + Export export profile button Esporta - + Allows you to export your Tox profile to a file. Profile does not contain your history. tooltip for profile exporting button @@ -1441,37 +1311,37 @@ Profile does not contain your history. I profili non contengono la cronologia messaggi. - + Delete selected profile. delete profile button tooltip Elimina il profilo selezionato. - + Delete delete profile button Elimina - + Import a profile import profile button Importa profilo - + Import Tox profile from a .tox file. tooltip for importing profile button Importa un profilo da un file ".tox". - + Create new Tox ID and switch to it. tooltip for creating new Tox ID button Crea un nuovo profilo (Tox ID) e iniza subito ad usarlo. - + New Tox ID new profile button Nuovo profilo @@ -1493,37 +1363,37 @@ I profili non contengono la cronologia messaggi. MainWindow - + Your name qTox User - + Your status Toxing on qTox - + Add friends Aggiungi contatto - + Create a group chat Crea un gruppo - + View completed file transfers Visualizza i trasferimenti completati - + Change your settings Cambia le impostazioni - + Close Chiudi @@ -1722,6 +1592,163 @@ ma i nuovi contatti dovranno conoscere il tuo nuovo Tox ID per aggiungerti.Genera valore nospam casuale + + ProfileForm + + + User Profile + Profilo Utente + + + + Choose a profile picture + Scegli un'immagine per il profilo + + + + + + Error + Errore + + + + Unable to open this file + Impossibile aprire il file + + + + Unable to read this image + Impossibile leggere l'immagine + + + + This image is too big + L'immagine è troppo grande + + + + Call active + popup title + Chiamata in corso + + + + You can't switch profiles while a call is active! + popup text + Non puoi cambiare profilo durante una chiamata! + + + + Rename "%1" + renaming a profile + Rinomina "%1" + + + + Profile already exists + rename confirm title + Profilo già esistente + + + + A profile named "%1" already exists. Do you want to erase it? + rename confirm text + Un profilo chiamato "%1" esiste già. Vuoi sovrascriverlo? + + + + Export profile + save dialog title + Esporta profilo + + + + Tox save file (*.tox) + save dialog filter + Tox save file (*.tox) + + + + Failed to remove file + Impossibile rimuovere il file + + + + The file you chose to overwrite could not be removed first. + Il file che hai scelto di sovrascrivere non può essere prima rimosso. + + + + Failed to copy file + Impossibile copiare il file + + + + The file you chose could not be written to. + Il file che hai scelto non può essere copiato. + + + + Profile currently loaded + current profile deletion warning title + Profilo attualmente in uso + + + + This profile is currently in use. Please load a different profile before deleting this one. + current profile deletion warning text + Questo profilo è attualmente in uso. Per favore carica un profilo differente prima di eliminare questo. + + + + Deletion imminent! + deletion confirmation title + Eliminazione imminente! + + + + Are you sure you want to delete this profile? + deletion confirmation text + Sei sicuro di voler eliminare questo profilo? + + + + Import profile + import dialog title + Importa profilo + + + + Tox save file (*.tox) + import dialog filter + Tox save file (*.tox) + + + + Ignoring non-Tox file + popup title + File ignorato + + + + Warning: you've chosen a file that is not a Tox save file; ignoring. + popup text + Attenzione: hai scelto un file che non contiente un profilo Tox.\nQuesto file verrà ignorato. + + + + Profile already exists + import confirm title + Profilo già esistente + + + + A profile named "%1" already exists. Do you want to erase it? + import confirm text + Un profilo chiamato "%1" esiste già. Vuoi sovrascriverlo? + + QObject @@ -1772,17 +1799,17 @@ It will be installed when qTox restarts. Verrà installata al riavvio del programma. - + Tox URI to parse URI Tox da interpretare - + Starts new instance and loads specified profile. Avvia una nuova istanza caricando il profilo selezionato. - + profile profilo @@ -1974,153 +2001,131 @@ Se non sei sicuro, scegli "No", così le informazioni inviate al serve Widget - + &Quit &Esci - + Online Button to set your status to 'Online' Online - + Away Button to set your status to 'Away' Assente - + Busy Button to set your status to 'Busy' Occupato - - Choose a profile picture - Scegli un'immagine per il profilo - - - - - - Error - Errore - - - - Unable to open this file - Impossibile aprire il file - - - - Unable to read this image - Impossibile leggere l'immagine - - - - This image is too big - L'immagine è troppo grande - - - + Toxcore failed to start, the application will terminate after you close this message. Impossibile avviare Toxcore.\nqTox terminerà dopo che avrai chiuso questo messaggio. - + toxcore failed to start with your proxy settings. qTox cannot run; please modify your settings and restart. popup text Impossibile avviare Toxcore con le tue impostazione proxy.\nqTox non può funzionare correttamente, per favore modifica le impostazioni e riavvia il programma. - + Add friend Aggiungi contatto - + File transfers Files trasferiti - + Executable file popup title File eseguibile - + You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file? popup text Hai chiesto a qTox di aprire un file eseguibile. I files eseguibili possono danneggiare il tuo computer. Sei sicuro di voler aprire questo file? - + Settings Impostazioni - + + Profile + Profilo + + + Couldn't request friendship Impossibile inviare la richiesta d'amicizia - + away contact status assente - + busy contact status occupato - + offline contact status offline - + online contact status online - + %1 is now %2 e.g. "Dubslow is now online" %1 è ora %2 - + Group invite popup title Invito chat di gruppo - + %1 has invited you to a groupchat. Would you like to join? popup text %1 ti ha invitato in una chat di gruppo. Vuoi partecipare? - + <Unknown> Placeholder when we don't know someone's name in a group chat <Sconosciuto> - + %1 has set the title to %2 %1 ha impostato il titolo in %2 - + Message failed to send Impossibile inviare il messaggio