2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

voice messages moved to documents with waveforms

This commit is contained in:
John Preston
2016-02-12 19:35:06 +03:00
parent ffa588bf5d
commit 189d0e8de3
36 changed files with 1615 additions and 2495 deletions

View File

@@ -101,7 +101,7 @@ ProfileInner::ProfileInner(ProfileWidget *profile, ScrollArea *scroll, PeerData
, _kickOver(0)
, _kickDown(0)
, _kickConfirm(0)
, _menu(0) {
connect(App::wnd(), SIGNAL(imageLoaded()), this, SLOT(update()));
@@ -209,9 +209,9 @@ ProfileInner::ProfileInner(ProfileWidget *profile, ScrollArea *scroll, PeerData
// shared media
connect((_mediaButtons[OverviewPhotos] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaPhotos()));
connect((_mediaButtons[OverviewVideos] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaVideos()));
connect((_mediaButtons[OverviewAudioDocuments] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaSongs()));
connect((_mediaButtons[OverviewDocuments] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaDocuments()));
connect((_mediaButtons[OverviewAudios] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaAudios()));
connect((_mediaButtons[OverviewMusicFiles] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaSongs()));
connect((_mediaButtons[OverviewFiles] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaDocuments()));
connect((_mediaButtons[OverviewVoiceFiles] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaAudios()));
connect((_mediaButtons[OverviewLinks] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaLinks()));
updateMediaLinks();
@@ -261,7 +261,7 @@ void ProfileInner::loadProfilePhotos(int32 yFrom) {
int32 yTo = yFrom + (parentWidget() ? parentWidget()->height() : App::wnd()->height()) * 5;
MTP::clearLoaderPriorities();
int32 partfrom = _mediaButtons[OverviewAudios]->y() + _mediaButtons[OverviewAudios]->height() + st::profileHeaderSkip;
int32 partfrom = _mediaButtons[OverviewVoiceFiles]->y() + _mediaButtons[OverviewVoiceFiles]->height() + st::profileHeaderSkip;
yFrom -= partfrom;
yTo -= partfrom;
@@ -279,7 +279,7 @@ void ProfileInner::loadProfilePhotos(int32 yFrom) {
void ProfileInner::onUpdatePhoto() {
saveError();
QStringList imgExtensions(cImgExtensions());
QStringList imgExtensions(cImgExtensions());
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;All files (*.*)"));
QImage img;
@@ -440,15 +440,15 @@ void ProfileInner::onMediaVideos() {
}
void ProfileInner::onMediaSongs() {
App::main()->showMediaOverview(_peer, OverviewAudioDocuments);
App::main()->showMediaOverview(_peer, OverviewMusicFiles);
}
void ProfileInner::onMediaDocuments() {
App::main()->showMediaOverview(_peer, OverviewDocuments);
App::main()->showMediaOverview(_peer, OverviewFiles);
}
void ProfileInner::onMediaAudios() {
App::main()->showMediaOverview(_peer, OverviewAudios);
App::main()->showMediaOverview(_peer, OverviewVoiceFiles);
}
void ProfileInner::onMediaLinks() {
@@ -464,7 +464,7 @@ void ProfileInner::onInvitationLink() {
void ProfileInner::onPublicLink() {
if (!_peerChannel) return;
if (_peerChannel->isPublic()) {
QApplication::clipboard()->setText(qsl("https://telegram.me/") + _peerChannel->username);
Ui::showLayer(new InformBox(lang(lng_channel_public_link_copied)));
@@ -776,7 +776,7 @@ void ProfileInner::paintEvent(QPaintEvent *e) {
p.setOpacity(1);
}
}
int32 namew = _width - st::profilePhotoSize - st::profileNameLeft;
p.setPen(st::black->p);
if (_peer->isVerified()) {
@@ -1271,7 +1271,7 @@ void ProfileInner::resizeEvent(QResizeEvent *e) {
_left = (width() - _width) / 2;
int32 top = 0, btnWidth = (_width - st::profileButtonSkip) / 2;
// profile
top += st::profilePadding.top();
int32 addbyname = 0;
@@ -1446,7 +1446,7 @@ ProfileInner::~ProfileInner() {
}
_participantsData.clear();
}
void ProfileInner::openContextImage() {
}
@@ -1711,9 +1711,9 @@ QString ProfileInner::overviewLinkText(int32 type, int32 count) {
switch (type) {
case OverviewPhotos: return lng_profile_photos(lt_count, count);
case OverviewVideos: return lng_profile_videos(lt_count, count);
case OverviewAudioDocuments: return lng_profile_songs(lt_count, count);
case OverviewDocuments: return lng_profile_files(lt_count, count);
case OverviewAudios: return lng_profile_audios(lt_count, count);
case OverviewMusicFiles: return lng_profile_songs(lt_count, count);
case OverviewFiles: return lng_profile_files(lt_count, count);
case OverviewVoiceFiles: return lng_profile_audios(lt_count, count);
case OverviewLinks: return lng_profile_shared_links(lt_count, count);
}
return QString();