mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 10:11:41 -05:00
merged with new PopupMenu
This commit is contained in:
commit
4ed11ebfff
27 changed files with 711 additions and 737 deletions
9
MSVC.md
9
MSVC.md
|
@ -160,14 +160,15 @@ and run
|
||||||
|
|
||||||
git clone git://code.qt.io/qt/qt5.git QtStatic
|
git clone git://code.qt.io/qt/qt5.git QtStatic
|
||||||
cd QtStatic
|
cd QtStatic
|
||||||
git checkout 5.5.1
|
git checkout 5.5
|
||||||
perl init-repository --module-subset=qtbase,qtimageformats
|
perl init-repository --module-subset=qtbase,qtimageformats
|
||||||
|
git checkout v5.5.1
|
||||||
|
cd qtimageformats && git checkout v5.5.1 && cd ..
|
||||||
|
cd qtbase && git checkout v5.5.1 && cd ..
|
||||||
|
|
||||||
#####Apply the patch
|
#####Apply the patch
|
||||||
|
|
||||||
cd qtbase
|
cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd ..
|
||||||
git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
#####Building library
|
#####Building library
|
||||||
|
|
||||||
|
|
|
@ -93,14 +93,15 @@ In Terminal go to **/home/user/TBuild/Libraries** and run
|
||||||
|
|
||||||
git clone git://code.qt.io/qt/qt5.git QtStatic
|
git clone git://code.qt.io/qt/qt5.git QtStatic
|
||||||
cd QtStatic
|
cd QtStatic
|
||||||
git checkout 5.5.1
|
git checkout 5.5
|
||||||
perl init-repository --module-subset=qtbase,qtimageformats
|
perl init-repository --module-subset=qtbase,qtimageformats
|
||||||
|
git checkout v5.5.1
|
||||||
|
cd qtimageformats && git checkout v5.5.1 && cd ..
|
||||||
|
cd qtbase && git checkout v5.5.1 && cd ..
|
||||||
|
|
||||||
#####Apply the patch
|
#####Apply the patch
|
||||||
|
|
||||||
cd qtbase
|
cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd ..
|
||||||
git apply ./../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
#####Building library
|
#####Building library
|
||||||
|
|
||||||
|
|
|
@ -250,12 +250,23 @@ defaultPopupMenu: PopupMenu {
|
||||||
itemBgOver: overBg;
|
itemBgOver: overBg;
|
||||||
itemFg: black;
|
itemFg: black;
|
||||||
itemFgOver: black;
|
itemFgOver: black;
|
||||||
|
itemFgDisabled: #ccc;
|
||||||
|
itemFgShortcut: #999;
|
||||||
|
itemFgShortcutOver: #7c99b2;
|
||||||
|
itemFgShortcutDisabled: #ccc;
|
||||||
|
|
||||||
itemPadding: margins(17px, 8px, 17px, 7px);
|
itemPadding: margins(17px, 8px, 17px, 7px);
|
||||||
itemFont: normalFont;
|
itemFont: normalFont;
|
||||||
|
|
||||||
|
separatorPadding: margins(0px, 5px, 0px, 5px);
|
||||||
|
separatorWidth: 1px;
|
||||||
|
separatorFg: #f1f1f1;
|
||||||
|
|
||||||
|
arrow: sprite(0px, 126px, 4px, 7px);
|
||||||
|
|
||||||
duration: 120;
|
duration: 120;
|
||||||
|
|
||||||
widthMin: 160px;
|
widthMin: 180px;
|
||||||
widthMax: 300px;
|
widthMax: 300px;
|
||||||
}
|
}
|
||||||
almostTransparent: #ffffff0d;
|
almostTransparent: #ffffff0d;
|
||||||
|
@ -2004,6 +2015,20 @@ mvButton: iconedButton(btnDefIconed) {
|
||||||
|
|
||||||
duration: 0;
|
duration: 0;
|
||||||
}
|
}
|
||||||
|
mvPopupMenu: PopupMenu(defaultPopupMenu) {
|
||||||
|
shadow: sprite(0px, 0px, 0px, 0px);
|
||||||
|
|
||||||
|
itemBg: #383838;
|
||||||
|
itemBgOver: #505050;
|
||||||
|
itemFg: white;
|
||||||
|
itemFgOver: white;
|
||||||
|
itemFgDisabled: #999;
|
||||||
|
itemFgShortcut: #eee;
|
||||||
|
itemFgShortcutOver: #fff;
|
||||||
|
itemFgShortcutDisabled: #999;
|
||||||
|
|
||||||
|
separatorFg: #484848;
|
||||||
|
}
|
||||||
mvContextButton: iconedButton(mvButton) {
|
mvContextButton: iconedButton(mvButton) {
|
||||||
bgColor: #383838E6;
|
bgColor: #383838E6;
|
||||||
overBgColor: #505050E7;
|
overBgColor: #505050E7;
|
||||||
|
|
|
@ -253,9 +253,19 @@ PopupMenu {
|
||||||
itemBgOver: color;
|
itemBgOver: color;
|
||||||
itemFg: color;
|
itemFg: color;
|
||||||
itemFgOver: color;
|
itemFgOver: color;
|
||||||
|
itemFgDisabled: color;
|
||||||
|
itemFgShortcut: color;
|
||||||
|
itemFgShortcutOver: color;
|
||||||
|
itemFgShortcutDisabled: color;
|
||||||
itemPadding: margins;
|
itemPadding: margins;
|
||||||
itemFont: font;
|
itemFont: font;
|
||||||
|
|
||||||
|
separatorPadding: margins;
|
||||||
|
separatorWidth: number;
|
||||||
|
separatorFg: color;
|
||||||
|
|
||||||
|
arrow: sprite;
|
||||||
|
|
||||||
duration: number;
|
duration: number;
|
||||||
|
|
||||||
widthMin: number;
|
widthMin: number;
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 178 KiB |
Binary file not shown.
Before Width: | Height: | Size: 237 KiB After Width: | Height: | Size: 238 KiB |
|
@ -1,564 +0,0 @@
|
||||||
/*
|
|
||||||
This file is part of Telegram Desktop,
|
|
||||||
the official desktop version of Telegram messaging app, see https://telegram.org
|
|
||||||
|
|
||||||
Telegram Desktop is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
It is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
|
||||||
Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org
|
|
||||||
*/
|
|
||||||
#include "stdafx.h"
|
|
||||||
|
|
||||||
#include "contextmenu.h"
|
|
||||||
#include "flatbutton.h"
|
|
||||||
#include "pspecific.h"
|
|
||||||
|
|
||||||
#include "application.h"
|
|
||||||
|
|
||||||
#include "lang.h"
|
|
||||||
|
|
||||||
ContextMenu::ContextMenu(QWidget *parent, const style::dropdown &st, const style::iconedButton &btnst) : TWidget(0),
|
|
||||||
_width(st.width), _hiding(false), _st(st), _btnst(btnst), _shadow(_st.shadow), _selected(-1), a_opacity(0), _deleteOnHide(false) {
|
|
||||||
resetActions();
|
|
||||||
|
|
||||||
setWindowFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint | Qt::Tool | Qt::NoDropShadowWindowHint | Qt::WindowStaysOnTopHint);
|
|
||||||
hide();
|
|
||||||
|
|
||||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
|
||||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *ContextMenu::addAction(const QString &text, const QObject *receiver, const char* member) {
|
|
||||||
QAction *a = 0;
|
|
||||||
_actions.push_back(a = new QAction(text, this));
|
|
||||||
connect(a, SIGNAL(triggered(bool)), receiver, member);
|
|
||||||
connect(a, SIGNAL(changed()), this, SLOT(actionChanged()));
|
|
||||||
|
|
||||||
IconedButton *b = 0;
|
|
||||||
_buttons.push_back(b = new IconedButton(this, _btnst, a->text()));
|
|
||||||
connect(b, SIGNAL(clicked()), this, SLOT(hideStart()));
|
|
||||||
connect(b, SIGNAL(clicked()), a, SIGNAL(triggered()));
|
|
||||||
connect(b, SIGNAL(stateChanged(int,ButtonStateChangeSource)), this, SLOT(buttonStateChanged(int,ButtonStateChangeSource)));
|
|
||||||
|
|
||||||
_width = qMax(_width, int(_st.padding.left() + _st.padding.right() + b->width()));
|
|
||||||
for (int32 i = 0, l = _buttons.size(); i < l; ++i) _buttons[i]->resize(_width - int(_st.padding.left() + _st.padding.right()), _buttons[i]->height());
|
|
||||||
_height += b->height();
|
|
||||||
|
|
||||||
resize(_width, _height);
|
|
||||||
|
|
||||||
return a;
|
|
||||||
}
|
|
||||||
|
|
||||||
ContextMenu::Actions &ContextMenu::actions() {
|
|
||||||
return _actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::actionChanged() {
|
|
||||||
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
|
||||||
_buttons[i]->setText(_actions[i]->text());
|
|
||||||
_width = qMax(_width, int(_st.padding.left() + _st.padding.right() + _buttons[i]->width()));
|
|
||||||
_buttons[i]->resize(_width - int(_st.padding.left() + _st.padding.right()), _buttons[i]->height());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::onActiveChanged() {
|
|
||||||
if (!windowHandle()->isActive()) {
|
|
||||||
hideStart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::buttonStateChanged(int oldState, ButtonStateChangeSource source) {
|
|
||||||
if (source == ButtonByUser) {
|
|
||||||
for (int32 i = 0, l = _buttons.size(); i < l; ++i) {
|
|
||||||
if (_buttons[i]->getState() & Button::StateOver) {
|
|
||||||
if (i != _selected) {
|
|
||||||
_buttons[i]->setOver(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (source == ButtonByHover) {
|
|
||||||
for (int32 i = 0, l = _buttons.size(); i < l; ++i) {
|
|
||||||
if (_buttons[i]->getState() & Button::StateOver) {
|
|
||||||
if (i != _selected) {
|
|
||||||
int32 sel = _selected;
|
|
||||||
_selected = i;
|
|
||||||
if (sel >= 0 && sel < _buttons.size()) {
|
|
||||||
_buttons[sel]->setOver(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::resetActions() {
|
|
||||||
_width = qMax(_st.padding.left() + _st.padding.right(), int(_st.width));
|
|
||||||
_height = _st.padding.top() + _st.padding.bottom();
|
|
||||||
resize(_width, _height);
|
|
||||||
|
|
||||||
clearActions();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::clearActions() {
|
|
||||||
for (int32 i = 0, l = _buttons.size(); i < l; ++i) {
|
|
||||||
delete _buttons[i];
|
|
||||||
}
|
|
||||||
_buttons.clear();
|
|
||||||
|
|
||||||
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
|
||||||
delete _actions[i];
|
|
||||||
}
|
|
||||||
_actions.clear();
|
|
||||||
|
|
||||||
_selected = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::resizeEvent(QResizeEvent *e) {
|
|
||||||
int32 top = _st.padding.top();
|
|
||||||
for (Buttons::const_iterator i = _buttons.cbegin(), e = _buttons.cend(); i != e; ++i) {
|
|
||||||
(*i)->move(_st.padding.left(), top);
|
|
||||||
top += (*i)->height();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::paintEvent(QPaintEvent *e) {
|
|
||||||
QPainter p(this);
|
|
||||||
|
|
||||||
p.setClipRect(e->rect());
|
|
||||||
QPainter::CompositionMode m = p.compositionMode();
|
|
||||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
|
||||||
p.fillRect(e->rect(), st::transparent->b);
|
|
||||||
p.setCompositionMode(m);
|
|
||||||
|
|
||||||
if (animating()) {
|
|
||||||
p.setOpacity(a_opacity.current());
|
|
||||||
}
|
|
||||||
|
|
||||||
QRect r(_st.padding.left(), _st.padding.top(), _width - _st.padding.left() - _st.padding.right(), _height - _st.padding.top() - _st.padding.bottom());
|
|
||||||
// draw shadow
|
|
||||||
_shadow.paint(p, r, _st.shadowShift);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::keyPressEvent(QKeyEvent *e) {
|
|
||||||
if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) {
|
|
||||||
if (_selected >= 0 && _selected < _buttons.size()) {
|
|
||||||
emit _buttons[_selected]->clicked();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if (e->key() == Qt::Key_Escape) {
|
|
||||||
hideStart();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((e->key() != Qt::Key_Up && e->key() != Qt::Key_Down) || _buttons.size() < 1) return;
|
|
||||||
|
|
||||||
int32 newSelected = _selected + (e->key() == Qt::Key_Down ? 1 : -1);
|
|
||||||
if (_selected < 0 || _selected >= _buttons.size()) {
|
|
||||||
newSelected = e->key() == Qt::Key_Down ? 0 : (_buttons.size() - 1);
|
|
||||||
} else {
|
|
||||||
if (newSelected < 0) {
|
|
||||||
newSelected = _buttons.size() - 1;
|
|
||||||
} else if (newSelected >= _buttons.size()) {
|
|
||||||
newSelected = 0;
|
|
||||||
}
|
|
||||||
_buttons[_selected]->setOver(false);
|
|
||||||
}
|
|
||||||
_selected = newSelected;
|
|
||||||
_buttons[_selected]->setOver(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::focusOutEvent(QFocusEvent *e) {
|
|
||||||
if (!_hiding) hideStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::fastHide() {
|
|
||||||
if (animating()) {
|
|
||||||
anim::stop(this);
|
|
||||||
}
|
|
||||||
a_opacity = anim::fvalue(0, 0);
|
|
||||||
hideFinish();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::adjustButtons() {
|
|
||||||
for (Buttons::const_iterator i = _buttons.cbegin(), e = _buttons.cend(); i != e; ++i) {
|
|
||||||
(*i)->setOpacity(a_opacity.current());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::hideStart() {
|
|
||||||
if (isHidden()) return;
|
|
||||||
|
|
||||||
_hiding = true;
|
|
||||||
a_opacity.start(0);
|
|
||||||
anim::start(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::hideFinish() {
|
|
||||||
hide();
|
|
||||||
if (_deleteOnHide) {
|
|
||||||
deleteLater();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::showStart() {
|
|
||||||
if (!isHidden() && a_opacity.current() == 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_selected = -1;
|
|
||||||
_hiding = false;
|
|
||||||
a_opacity.start(1);
|
|
||||||
anim::start(this);
|
|
||||||
animStep(0);
|
|
||||||
psUpdateOverlayed(this);
|
|
||||||
show();
|
|
||||||
psShowOverAll(this);
|
|
||||||
windowHandle()->requestActivate();
|
|
||||||
activateWindow();
|
|
||||||
setFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ContextMenu::animStep(float64 ms) {
|
|
||||||
float64 dt = ms / 150;
|
|
||||||
bool res = true;
|
|
||||||
if (dt >= 1) {
|
|
||||||
a_opacity.finish();
|
|
||||||
if (_hiding) {
|
|
||||||
hideFinish();
|
|
||||||
}
|
|
||||||
res = false;
|
|
||||||
} else {
|
|
||||||
a_opacity.update(dt, anim::linear);
|
|
||||||
}
|
|
||||||
adjustButtons();
|
|
||||||
update();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::deleteOnHide() {
|
|
||||||
_deleteOnHide = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContextMenu::popup(const QPoint &p) {
|
|
||||||
QPoint w = p - QPoint(_st.padding.left(), _st.padding.top());
|
|
||||||
QRect r = App::app() ? App::app()->desktop()->screenGeometry(p) : QDesktopWidget().screenGeometry(p);
|
|
||||||
if (rtl()) {
|
|
||||||
if (w.x() - width() + 2 * _st.padding.left() < r.x() - _st.padding.left()) {
|
|
||||||
w.setX(r.x() - _st.padding.left());
|
|
||||||
} else {
|
|
||||||
w.setX(w.x() - width() + 2 * _st.padding.left());
|
|
||||||
}
|
|
||||||
} else if (w.x() + width() - _st.padding.right() > r.x() + r.width()) {
|
|
||||||
w.setX(r.x() + r.width() - width() + _st.padding.right());
|
|
||||||
}
|
|
||||||
if (w.y() + height() - _st.padding.bottom() > r.y() + r.height()) {
|
|
||||||
w.setY(p.y() - height() + _st.padding.bottom());
|
|
||||||
}
|
|
||||||
if (w.y() < r.y()) {
|
|
||||||
w.setY(r.y());
|
|
||||||
}
|
|
||||||
move(w);
|
|
||||||
showStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
ContextMenu::~ContextMenu() {
|
|
||||||
clearActions();
|
|
||||||
#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
|
||||||
if (App::wnd()) {
|
|
||||||
App::wnd()->activateWindow();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
PopupMenu::PopupMenu(const style::PopupMenu &st) : TWidget(0)
|
|
||||||
, _st(st)
|
|
||||||
, _itemHeight(_st.itemPadding.top() + _st.itemFont->height + _st.itemPadding.bottom())
|
|
||||||
, _mouseSelection(false)
|
|
||||||
, _shadow(_st.shadow)
|
|
||||||
, _selected(-1)
|
|
||||||
, a_opacity(1)
|
|
||||||
, _a_hide(animFunc(this, &PopupMenu::animStep_hide))
|
|
||||||
, _deleteOnHide(false) {
|
|
||||||
_padding = _shadow.getDimensions(_st.shadowShift);
|
|
||||||
|
|
||||||
resetActions();
|
|
||||||
|
|
||||||
setWindowFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint | Qt::Tool | Qt::NoDropShadowWindowHint | Qt::WindowStaysOnTopHint);
|
|
||||||
setMouseTracking(true);
|
|
||||||
|
|
||||||
hide();
|
|
||||||
|
|
||||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
|
||||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *PopupMenu::addAction(const QString &text, const QObject *receiver, const char* member) {
|
|
||||||
QAction *a = 0;
|
|
||||||
_actions.push_back(a = new QAction(text, this));
|
|
||||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(hideStart()));
|
|
||||||
connect(a, SIGNAL(triggered(bool)), receiver, member);
|
|
||||||
connect(a, SIGNAL(changed()), this, SLOT(actionChanged()));
|
|
||||||
|
|
||||||
int32 w = _padding.left() + _st.widthMin + _padding.right();
|
|
||||||
int32 mw = _padding.left() + _st.widthMax + _padding.right();
|
|
||||||
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
|
||||||
int32 goodw = _padding.left() + _st.itemPadding.left() + _st.itemFont->width(_actions[i]->text()) + _st.itemPadding.right() + _padding.right();
|
|
||||||
w = snap(goodw, w, mw);
|
|
||||||
}
|
|
||||||
resize(w, height() + _itemHeight);
|
|
||||||
update();
|
|
||||||
|
|
||||||
return a;
|
|
||||||
}
|
|
||||||
|
|
||||||
PopupMenu::Actions &PopupMenu::actions() {
|
|
||||||
return _actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::actionChanged() {
|
|
||||||
int32 w = _padding.left() + _st.widthMin + _padding.right();
|
|
||||||
int32 mw = _padding.left() + _st.widthMax + _padding.right();
|
|
||||||
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
|
||||||
int32 goodw = _padding.left() + _st.itemPadding.left() + _st.itemFont->width(_actions[i]->text()) + _st.itemPadding.right() + _padding.right();
|
|
||||||
w = snap(goodw, w, mw);
|
|
||||||
}
|
|
||||||
if (w != width()) {
|
|
||||||
resize(w, height());
|
|
||||||
}
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::activeWindowChanged() {
|
|
||||||
if (!windowHandle()->isActive()) {
|
|
||||||
hideStart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::resetActions() {
|
|
||||||
clearActions();
|
|
||||||
resize(_padding.left() + _st.widthMin + _padding.right(), _padding.top() + (_st.skip * 2) + _padding.bottom());
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::clearActions() {
|
|
||||||
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
|
||||||
delete _actions[i];
|
|
||||||
}
|
|
||||||
_actions.clear();
|
|
||||||
|
|
||||||
_selected = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::resizeEvent(QResizeEvent *e) {
|
|
||||||
_inner = QRect(_padding.left(), _padding.top(), width() - _padding.left() - _padding.right(), height() - _padding.top() - _padding.bottom());
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::paintEvent(QPaintEvent *e) {
|
|
||||||
Painter p(this);
|
|
||||||
|
|
||||||
p.setClipRect(e->rect());
|
|
||||||
QPainter::CompositionMode m = p.compositionMode();
|
|
||||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
|
||||||
if (_a_hide.animating()) {
|
|
||||||
p.setOpacity(a_opacity.current());
|
|
||||||
p.drawPixmap(0, 0, _cache);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.fillRect(e->rect(), st::almostTransparent->b);
|
|
||||||
p.setCompositionMode(m);
|
|
||||||
|
|
||||||
_shadow.paint(p, _inner, _st.shadowShift);
|
|
||||||
|
|
||||||
QRect topskip(_padding.left(), _padding.top(), _inner.width(), _st.skip);
|
|
||||||
QRect bottomskip(_padding.left(), height() - _padding.bottom() - _st.skip, _inner.width(), _st.skip);
|
|
||||||
if (e->rect().intersects(topskip)) p.fillRect(e->rect().intersected(topskip), _st.itemBg->b);
|
|
||||||
if (e->rect().intersects(bottomskip)) p.fillRect(e->rect().intersected(bottomskip), _st.itemBg->b);
|
|
||||||
|
|
||||||
int32 from = floorclamp(e->rect().top() - _padding.top() - _st.skip, _itemHeight, 0, _actions.size());
|
|
||||||
int32 to = ceilclamp(e->rect().top() + e->rect().height() - _padding.top() - _st.skip, _itemHeight, 0, _actions.size());
|
|
||||||
|
|
||||||
p.translate(_padding.left(), _padding.top() + _st.skip + (from * _itemHeight));
|
|
||||||
p.setFont(_st.itemFont);
|
|
||||||
for (int32 i = from; i < to; ++i) {
|
|
||||||
p.fillRect(0, 0, _inner.width(), _itemHeight, (i == _selected ? _st.itemBgOver : _st.itemBg)->b);
|
|
||||||
p.setPen(i == _selected ? _st.itemFgOver : _st.itemFg);
|
|
||||||
p.drawTextLeft(_st.itemPadding.left(), _st.itemPadding.top(), width() - _padding.left() - _padding.right(), _actions.at(i)->text());
|
|
||||||
p.translate(0, _itemHeight);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::updateSelected() {
|
|
||||||
if (!_mouseSelection) return;
|
|
||||||
|
|
||||||
QPoint p(mapFromGlobal(_mouse) - QPoint(_padding.left(), _padding.top() + _st.skip));
|
|
||||||
setSelected(p.y() >= 0 ? (p.y() / _itemHeight) : -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::itemPressed() {
|
|
||||||
if (_selected >= 0 && _selected < _actions.size()) {
|
|
||||||
emit _actions[_selected]->trigger();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::keyPressEvent(QKeyEvent *e) {
|
|
||||||
if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) {
|
|
||||||
itemPressed();
|
|
||||||
} else if (e->key() == Qt::Key_Escape) {
|
|
||||||
hideStart();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((e->key() != Qt::Key_Up && e->key() != Qt::Key_Down) || _actions.size() < 1) return;
|
|
||||||
|
|
||||||
int32 newSelected = _selected + (e->key() == Qt::Key_Down ? 1 : -1);
|
|
||||||
if (_selected < 0 || _selected >= _actions.size()) {
|
|
||||||
newSelected = (e->key() == Qt::Key_Down) ? 0 : (_actions.size() - 1);
|
|
||||||
} else {
|
|
||||||
if (newSelected < 0) {
|
|
||||||
newSelected = _actions.size() - 1;
|
|
||||||
} else if (newSelected >= _actions.size()) {
|
|
||||||
newSelected = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_mouseSelection = false;
|
|
||||||
setSelected(newSelected);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::enterEvent(QEvent *e) {
|
|
||||||
QPoint mouse = QCursor::pos();
|
|
||||||
if (_inner.contains(mapFromGlobal(mouse))) {
|
|
||||||
_mouseSelection = true;
|
|
||||||
_mouse = mouse;
|
|
||||||
updateSelected();
|
|
||||||
} else {
|
|
||||||
_mouseSelection = false;
|
|
||||||
setSelected(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::leaveEvent(QEvent *e) {
|
|
||||||
if (_mouseSelection) {
|
|
||||||
_mouseSelection = false;
|
|
||||||
setSelected(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::setSelected(int32 newSelected) {
|
|
||||||
if (newSelected >= _actions.size()) {
|
|
||||||
newSelected = -1;
|
|
||||||
}
|
|
||||||
if (newSelected != _selected) {
|
|
||||||
updateSelectedItem();
|
|
||||||
_selected = newSelected;
|
|
||||||
updateSelectedItem();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::updateSelectedItem() {
|
|
||||||
if (_selected >= 0) {
|
|
||||||
update(_padding.left(), _padding.top() + _st.skip + (_selected * _itemHeight), width() - _padding.left() - _padding.right(), _itemHeight);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::mouseMoveEvent(QMouseEvent *e) {
|
|
||||||
if (_inner.contains(e->pos())) {
|
|
||||||
_mouseSelection = true;
|
|
||||||
_mouse = e->globalPos();
|
|
||||||
updateSelected();
|
|
||||||
} else {
|
|
||||||
_mouseSelection = false;
|
|
||||||
setSelected(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::mousePressEvent(QMouseEvent *e) {
|
|
||||||
mouseMoveEvent(e);
|
|
||||||
itemPressed();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::focusOutEvent(QFocusEvent *e) {
|
|
||||||
if (!_a_hide.animating()) hideStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::fastHide() {
|
|
||||||
if (_a_hide.animating()) {
|
|
||||||
_a_hide.stop();
|
|
||||||
}
|
|
||||||
a_opacity = anim::fvalue(0, 0);
|
|
||||||
hideFinish();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::hideStart() {
|
|
||||||
if (isHidden()) return;
|
|
||||||
|
|
||||||
_cache = myGrab(this);
|
|
||||||
a_opacity.start(0);
|
|
||||||
_a_hide.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::hideFinish() {
|
|
||||||
hide();
|
|
||||||
if (_deleteOnHide) {
|
|
||||||
deleteLater();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PopupMenu::animStep_hide(float64 ms) {
|
|
||||||
float64 dt = ms / _st.duration;
|
|
||||||
bool res = true;
|
|
||||||
if (dt >= 1) {
|
|
||||||
a_opacity.finish();
|
|
||||||
hideFinish();
|
|
||||||
res = false;
|
|
||||||
} else {
|
|
||||||
a_opacity.update(dt, anim::linear);
|
|
||||||
}
|
|
||||||
update();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::deleteOnHide() {
|
|
||||||
_deleteOnHide = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupMenu::popup(const QPoint &p) {
|
|
||||||
QPoint w = p - QPoint(0, _padding.top());
|
|
||||||
QRect r = App::app() ? App::app()->desktop()->screenGeometry(p) : QDesktopWidget().screenGeometry(p);
|
|
||||||
if (rtl()) {
|
|
||||||
if (w.x() - width() < r.x() - _padding.left()) {
|
|
||||||
w.setX(r.x() - _padding.left());
|
|
||||||
} else {
|
|
||||||
w.setX(w.x() - width());
|
|
||||||
}
|
|
||||||
} else if (w.x() + width() - _padding.right() > r.x() + r.width()) {
|
|
||||||
w.setX(r.x() + r.width() - width() + _padding.right());
|
|
||||||
}
|
|
||||||
if (w.y() + height() - _padding.bottom() > r.y() + r.height()) {
|
|
||||||
w.setY(p.y() - height() + _padding.bottom());
|
|
||||||
}
|
|
||||||
if (w.y() < r.y()) {
|
|
||||||
w.setY(r.y());
|
|
||||||
}
|
|
||||||
move(w);
|
|
||||||
psUpdateOverlayed(this);
|
|
||||||
show();
|
|
||||||
psShowOverAll(this);
|
|
||||||
windowHandle()->requestActivate();
|
|
||||||
activateWindow();
|
|
||||||
setFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
PopupMenu::~PopupMenu() {
|
|
||||||
clearActions();
|
|
||||||
#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
|
||||||
if (App::wnd()) {
|
|
||||||
App::wnd()->activateWindow();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
|
@ -205,6 +205,17 @@ void FlatInput::resizeEvent(QResizeEvent *e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#include "../../../QtStatic/qtbase/src/widgets/widgets/qwidgettextcontrol_p.h"
|
||||||
|
|
||||||
|
void FlatInput::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
|
if (QMenu *menu = createStandardContextMenu()) {
|
||||||
|
//menu->addSeparator(); // testing two level menu
|
||||||
|
//QUnicodeControlCharacterMenu *ctrlCharacterMenu = new QUnicodeControlCharacterMenu(this, menu);
|
||||||
|
//menu->addMenu(ctrlCharacterMenu);
|
||||||
|
(new PopupMenu(menu))->popup(e->globalPos());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QSize FlatInput::sizeHint() const {
|
QSize FlatInput::sizeHint() const {
|
||||||
return geometry().size();
|
return geometry().size();
|
||||||
}
|
}
|
||||||
|
@ -1226,6 +1237,12 @@ void InputArea::InputAreaInner::paintEvent(QPaintEvent *e) {
|
||||||
return QTextEdit::paintEvent(e);
|
return QTextEdit::paintEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InputArea::InputAreaInner::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
|
if (QMenu *menu = createStandardContextMenu()) {
|
||||||
|
(new PopupMenu(menu))->popup(e->globalPos());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InputArea::resizeEvent(QResizeEvent *e) {
|
void InputArea::resizeEvent(QResizeEvent *e) {
|
||||||
_placeholder = _st.font->elided(_placeholderFull, width() - _st.textMargins.left() - _st.textMargins.right() - _st.placeholderMargins.left() - _st.placeholderMargins.right() - 1);
|
_placeholder = _st.font->elided(_placeholderFull, width() - _st.textMargins.left() - _st.textMargins.right() - _st.placeholderMargins.left() - _st.placeholderMargins.right() - 1);
|
||||||
_inner.setGeometry(rect().marginsRemoved(_st.textMargins));
|
_inner.setGeometry(rect().marginsRemoved(_st.textMargins));
|
||||||
|
@ -1935,6 +1952,12 @@ void InputField::InputFieldInner::paintEvent(QPaintEvent *e) {
|
||||||
return QTextEdit::paintEvent(e);
|
return QTextEdit::paintEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InputField::InputFieldInner::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
|
if (QMenu *menu = createStandardContextMenu()) {
|
||||||
|
(new PopupMenu(menu))->popup(e->globalPos());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InputField::resizeEvent(QResizeEvent *e) {
|
void InputField::resizeEvent(QResizeEvent *e) {
|
||||||
_placeholder = _st.font->elided(_placeholderFull, width() - _st.textMargins.left() - _st.textMargins.right() - _st.placeholderMargins.left() - _st.placeholderMargins.right() - 1);
|
_placeholder = _st.font->elided(_placeholderFull, width() - _st.textMargins.left() - _st.textMargins.right() - _st.placeholderMargins.left() - _st.placeholderMargins.right() - 1);
|
||||||
_inner.setGeometry(rect().marginsRemoved(_st.textMargins));
|
_inner.setGeometry(rect().marginsRemoved(_st.textMargins));
|
||||||
|
@ -2134,6 +2157,12 @@ void MaskedInputField::resizeEvent(QResizeEvent *e) {
|
||||||
QLineEdit::resizeEvent(e);
|
QLineEdit::resizeEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MaskedInputField::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
|
if (QMenu *menu = createStandardContextMenu()) {
|
||||||
|
(new PopupMenu(menu))->popup(e->globalPos());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MaskedInputField::showError() {
|
void MaskedInputField::showError() {
|
||||||
_error = true;
|
_error = true;
|
||||||
if (hasFocus()) {
|
if (hasFocus()) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ public:
|
||||||
void focusOutEvent(QFocusEvent *e);
|
void focusOutEvent(QFocusEvent *e);
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e);
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
|
|
||||||
void notaBene();
|
void notaBene();
|
||||||
|
|
||||||
|
@ -276,6 +277,7 @@ private:
|
||||||
void focusOutEvent(QFocusEvent *e);
|
void focusOutEvent(QFocusEvent *e);
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e);
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e);
|
||||||
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
|
|
||||||
QMimeData *createMimeDataFromSelection() const;
|
QMimeData *createMimeDataFromSelection() const;
|
||||||
|
|
||||||
|
@ -445,6 +447,7 @@ private:
|
||||||
void focusOutEvent(QFocusEvent *e);
|
void focusOutEvent(QFocusEvent *e);
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e);
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e);
|
||||||
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
|
|
||||||
QMimeData *createMimeDataFromSelection() const;
|
QMimeData *createMimeDataFromSelection() const;
|
||||||
|
|
||||||
|
@ -510,6 +513,7 @@ public:
|
||||||
void focusOutEvent(QFocusEvent *e);
|
void focusOutEvent(QFocusEvent *e);
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e);
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
|
|
||||||
void showError();
|
void showError();
|
||||||
|
|
||||||
|
|
|
@ -929,3 +929,9 @@ void FlatTextarea::dropEvent(QDropEvent *e) {
|
||||||
_inDrop = false;
|
_inDrop = false;
|
||||||
emit spacedReturnedPasted();
|
emit spacedReturnedPasted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FlatTextarea::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
|
if (QMenu *menu = createStandardContextMenu()) {
|
||||||
|
(new PopupMenu(menu))->popup(e->globalPos());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ public:
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
void mousePressEvent(QMouseEvent *e);
|
void mousePressEvent(QMouseEvent *e);
|
||||||
void dropEvent(QDropEvent *e);
|
void dropEvent(QDropEvent *e);
|
||||||
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
|
|
||||||
void setMaxLength(int32 maxLength);
|
void setMaxLength(int32 maxLength);
|
||||||
void setMinHeight(int32 minHeight);
|
void setMinHeight(int32 minHeight);
|
||||||
|
|
506
Telegram/SourceFiles/gui/popupmenu.cpp
Normal file
506
Telegram/SourceFiles/gui/popupmenu.cpp
Normal file
|
@ -0,0 +1,506 @@
|
||||||
|
/*
|
||||||
|
This file is part of Telegram Desktop,
|
||||||
|
the official desktop version of Telegram messaging app, see https://telegram.org
|
||||||
|
|
||||||
|
Telegram Desktop is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
It is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||||
|
Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org
|
||||||
|
*/
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
#include "popupmenu.h"
|
||||||
|
#include "flatbutton.h"
|
||||||
|
#include "pspecific.h"
|
||||||
|
|
||||||
|
#include "application.h"
|
||||||
|
|
||||||
|
#include "lang.h"
|
||||||
|
|
||||||
|
PopupMenu::PopupMenu(const style::PopupMenu &st) : TWidget(0)
|
||||||
|
, _st(st)
|
||||||
|
, _menu(0)
|
||||||
|
, _parent(0)
|
||||||
|
, _itemHeight(_st.itemPadding.top() + _st.itemFont->height + _st.itemPadding.bottom())
|
||||||
|
, _separatorHeight(_st.separatorPadding.top() + _st.separatorWidth + _st.separatorPadding.bottom())
|
||||||
|
, _mouseSelection(false)
|
||||||
|
, _shadow(_st.shadow)
|
||||||
|
, _selected(-1)
|
||||||
|
, _childMenuIndex(-1)
|
||||||
|
, a_opacity(1)
|
||||||
|
, _a_hide(animFunc(this, &PopupMenu::animStep_hide))
|
||||||
|
, _deleteOnHide(true) {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
PopupMenu::PopupMenu(QMenu *menu, const style::PopupMenu &st) : TWidget(0)
|
||||||
|
, _st(st)
|
||||||
|
, _menu(menu)
|
||||||
|
, _parent(0)
|
||||||
|
, _itemHeight(_st.itemPadding.top() + _st.itemFont->height + _st.itemPadding.bottom())
|
||||||
|
, _separatorHeight(_st.separatorPadding.top() + _st.separatorWidth + _st.separatorPadding.bottom())
|
||||||
|
, _mouseSelection(false)
|
||||||
|
, _shadow(_st.shadow)
|
||||||
|
, _selected(-1)
|
||||||
|
, a_opacity(1)
|
||||||
|
, _a_hide(animFunc(this, &PopupMenu::animStep_hide))
|
||||||
|
, _deleteOnHide(true) {
|
||||||
|
init();
|
||||||
|
QList<QAction*> actions(menu->actions());
|
||||||
|
for (int32 i = 0, l = actions.size(); i < l; ++i) {
|
||||||
|
addAction(actions.at(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::init() {
|
||||||
|
_padding = _shadow.getDimensions(_st.shadowShift);
|
||||||
|
|
||||||
|
resetActions();
|
||||||
|
|
||||||
|
setWindowFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint | Qt::Popup | Qt::NoDropShadowWindowHint);
|
||||||
|
setMouseTracking(true);
|
||||||
|
|
||||||
|
hide();
|
||||||
|
|
||||||
|
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||||
|
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QAction *PopupMenu::addAction(const QString &text, const QObject *receiver, const char* member) {
|
||||||
|
QAction *a = new QAction(text, this);
|
||||||
|
connect(a, SIGNAL(triggered(bool)), receiver, member);
|
||||||
|
return addAction(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
QAction *PopupMenu::addAction(QAction *a) {
|
||||||
|
connect(a, SIGNAL(changed()), this, SLOT(actionChanged()));
|
||||||
|
_actions.push_back(a);
|
||||||
|
if (a->menu()) {
|
||||||
|
_menus.push_back(new PopupMenu(a->menu()));
|
||||||
|
_menus.back()->deleteOnHide(false);
|
||||||
|
} else {
|
||||||
|
_menus.push_back(0);
|
||||||
|
}
|
||||||
|
_texts.push_back(QString());
|
||||||
|
_shortcutTexts.push_back(QString());
|
||||||
|
int32 w = processAction(a, _actions.size() - 1, width());
|
||||||
|
resize(w, height() + (a->isSeparator() ? _separatorHeight : _itemHeight));
|
||||||
|
update();
|
||||||
|
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32 PopupMenu::processAction(QAction *a, int32 index, int32 w) {
|
||||||
|
if (a->isSeparator() || a->text().isEmpty()) {
|
||||||
|
_texts[index] = _shortcutTexts[index] = QString();
|
||||||
|
} else {
|
||||||
|
QStringList texts = a->text().split('\t');
|
||||||
|
int32 textw = _st.itemFont->width(texts.at(0));
|
||||||
|
int32 goodw = _padding.left() + _st.itemPadding.left() + textw + _st.itemPadding.right() + _padding.right();
|
||||||
|
if (_menus.at(index)) {
|
||||||
|
goodw += _st.itemPadding.left() + _st.arrow.pxWidth();
|
||||||
|
} else if (texts.size() > 1) {
|
||||||
|
goodw += _st.itemPadding.left() + _st.itemFont->width(texts.at(1));
|
||||||
|
}
|
||||||
|
w = snap(goodw, w, int32(_padding.left() + _st.widthMax + _padding.right()));
|
||||||
|
_texts[index] = (w < goodw) ? _st.itemFont->elided(texts.at(0), w - (goodw - textw)) : texts.at(0);
|
||||||
|
_shortcutTexts[index] = texts.size() > 1 ? texts.at(1) : QString();
|
||||||
|
}
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
PopupMenu::Actions &PopupMenu::actions() {
|
||||||
|
return _actions;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::actionChanged() {
|
||||||
|
int32 w = _padding.left() + _st.widthMin + _padding.right();
|
||||||
|
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
||||||
|
w = processAction(_actions.at(i), i, w);
|
||||||
|
}
|
||||||
|
if (w != width()) {
|
||||||
|
resize(w, height());
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::resetActions() {
|
||||||
|
clearActions();
|
||||||
|
resize(_padding.left() + _st.widthMin + _padding.right(), _padding.top() + (_st.skip * 2) + _padding.bottom());
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::clearActions(bool force) {
|
||||||
|
if (_menu && !force) return;
|
||||||
|
|
||||||
|
if (!_menu) {
|
||||||
|
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
||||||
|
delete _actions[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_actions.clear();
|
||||||
|
|
||||||
|
for (int32 i = 0, l = _menus.size(); i < l; ++i) {
|
||||||
|
delete _menus[i];
|
||||||
|
}
|
||||||
|
_menus.clear();
|
||||||
|
_childMenuIndex = -1;
|
||||||
|
|
||||||
|
_selected = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::resizeEvent(QResizeEvent *e) {
|
||||||
|
_inner = QRect(_padding.left(), _padding.top(), width() - _padding.left() - _padding.right(), height() - _padding.top() - _padding.bottom());
|
||||||
|
return TWidget::resizeEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::paintEvent(QPaintEvent *e) {
|
||||||
|
Painter p(this);
|
||||||
|
|
||||||
|
QRect r(e->rect());
|
||||||
|
p.setClipRect(r);
|
||||||
|
QPainter::CompositionMode m = p.compositionMode();
|
||||||
|
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||||
|
if (_a_hide.animating()) {
|
||||||
|
p.setOpacity(a_opacity.current());
|
||||||
|
p.drawPixmap(0, 0, _cache);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.fillRect(r, st::almostTransparent->b);
|
||||||
|
p.setCompositionMode(m);
|
||||||
|
|
||||||
|
_shadow.paint(p, _inner, _st.shadowShift);
|
||||||
|
|
||||||
|
QRect topskip(_padding.left(), _padding.top(), _inner.width(), _st.skip);
|
||||||
|
QRect bottomskip(_padding.left(), height() - _padding.bottom() - _st.skip, _inner.width(), _st.skip);
|
||||||
|
if (r.intersects(topskip)) p.fillRect(r.intersected(topskip), _st.itemBg->b);
|
||||||
|
if (r.intersects(bottomskip)) p.fillRect(r.intersected(bottomskip), _st.itemBg->b);
|
||||||
|
|
||||||
|
int32 y = _padding.top() + _st.skip;
|
||||||
|
p.translate(_padding.left(), y);
|
||||||
|
p.setFont(_st.itemFont);
|
||||||
|
for (int32 i = 0, l = _actions.size(); i < l; ++i) {
|
||||||
|
if (r.top() + r.height() <= y) break;
|
||||||
|
int32 h = _actions.at(i)->isSeparator() ? _separatorHeight : _itemHeight;
|
||||||
|
y += h;
|
||||||
|
if (r.top() < y) {
|
||||||
|
if (_actions.at(i)->isSeparator()) {
|
||||||
|
p.fillRect(0, 0, _inner.width(), h, _st.itemBg->b);
|
||||||
|
p.fillRect(_st.separatorPadding.left(), _st.separatorPadding.top(), _inner.width() - _st.separatorPadding.left() - _st.separatorPadding.right(), _st.separatorWidth, _st.separatorFg->b);
|
||||||
|
} else {
|
||||||
|
bool enabled = _actions.at(i)->isEnabled(), selected = (i == _selected && enabled);
|
||||||
|
p.fillRect(0, 0, _inner.width(), h, (selected ? _st.itemBgOver : _st.itemBg)->b);
|
||||||
|
p.setPen(selected ? _st.itemFgOver : (enabled ? _st.itemFg : _st.itemFgDisabled));
|
||||||
|
p.drawTextLeft(_st.itemPadding.left(), _st.itemPadding.top(), _inner.width(), _texts.at(i));
|
||||||
|
if (_menus.at(i)) {
|
||||||
|
p.drawSpriteRight(_st.itemPadding.right(), (_itemHeight - _st.arrow.pxHeight()) / 2, _inner.width(), _st.arrow);
|
||||||
|
} else if (!_shortcutTexts.at(i).isEmpty()) {
|
||||||
|
p.setPen(selected ? _st.itemFgShortcutOver : (enabled ? _st.itemFgShortcut : _st.itemFgShortcutDisabled));
|
||||||
|
p.drawTextRight(_st.itemPadding.right(), _st.itemPadding.top(), _inner.width(), _shortcutTexts.at(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p.translate(0, h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::updateSelected() {
|
||||||
|
if (!_mouseSelection) return;
|
||||||
|
|
||||||
|
QPoint p(mapFromGlobal(_mouse) - QPoint(_padding.left(), _padding.top() + _st.skip));
|
||||||
|
int32 selected = -1, y = 0;
|
||||||
|
while (y <= p.y() && ++selected < _actions.size()) {
|
||||||
|
y += _actions.at(selected)->isSeparator() ? _separatorHeight : _itemHeight;
|
||||||
|
}
|
||||||
|
setSelected((selected >= 0 && selected < _actions.size() && _actions.at(selected)->isEnabled() && !_actions.at(selected)->isSeparator()) ? selected : -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::itemPressed(PressSource source) {
|
||||||
|
if (source == PressSourceMouse && !_mouseSelection) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (_selected >= 0 && _selected < _actions.size() && _actions[_selected]->isEnabled()) {
|
||||||
|
if (_menus.at(_selected)) {
|
||||||
|
if (_childMenuIndex == _selected) {
|
||||||
|
_menus.at(_childMenuIndex)->hideMenu(true);
|
||||||
|
} else {
|
||||||
|
popupChildMenu(source);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hideMenu();
|
||||||
|
emit _actions[_selected]->trigger();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::popupChildMenu(PressSource source) {
|
||||||
|
if (_childMenuIndex >= 0) {
|
||||||
|
_menus.at(_childMenuIndex)->hideMenu(true);
|
||||||
|
_childMenuIndex = -1;
|
||||||
|
}
|
||||||
|
if (_selected >= 0 && _selected < _menus.size() && _menus.at(_selected)) {
|
||||||
|
QPoint p(_inner.x() + (rtl() ? _padding.right() : _inner.width() - _padding.left()), _inner.y() + _st.skip + itemY(_selected));
|
||||||
|
_childMenuIndex = _selected;
|
||||||
|
_menus.at(_childMenuIndex)->showMenu(geometry().topLeft() + p, this, source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::keyPressEvent(QKeyEvent *e) {
|
||||||
|
if (_childMenuIndex >= 0) {
|
||||||
|
return _menus.at(_childMenuIndex)->keyPressEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) {
|
||||||
|
itemPressed(PressSourceKeyboard);
|
||||||
|
} else if (e->key() == Qt::Key_Escape) {
|
||||||
|
hideMenu(_parent ? true : false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e->key() == (rtl() ? Qt::Key_Left : Qt::Key_Right)) {
|
||||||
|
if (_selected >= 0 && _menus.at(_selected)) {
|
||||||
|
itemPressed(PressSourceKeyboard);
|
||||||
|
} else if (_selected < 0 && _parent && !_actions.isEmpty()) {
|
||||||
|
_mouseSelection = false;
|
||||||
|
setSelected(0);
|
||||||
|
}
|
||||||
|
} else if (e->key() == (rtl() ? Qt::Key_Right : Qt::Key_Left)) {
|
||||||
|
if (_parent) {
|
||||||
|
hideMenu(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((e->key() != Qt::Key_Up && e->key() != Qt::Key_Down) || _actions.size() < 1) return;
|
||||||
|
|
||||||
|
int32 delta = (e->key() == Qt::Key_Down ? 1 : -1), start = _selected;
|
||||||
|
if (start < 0 || start >= _actions.size()) {
|
||||||
|
start = (delta > 0) ? (_actions.size() - 1) : 0;
|
||||||
|
}
|
||||||
|
int32 newSelected = start;
|
||||||
|
do {
|
||||||
|
newSelected += delta;
|
||||||
|
if (newSelected < 0) {
|
||||||
|
newSelected += _actions.size();
|
||||||
|
} else if (newSelected >= _actions.size()) {
|
||||||
|
newSelected -= _actions.size();
|
||||||
|
}
|
||||||
|
} while (newSelected != start && (!_actions.at(newSelected)->isEnabled() || _actions.at(newSelected)->isSeparator()));
|
||||||
|
|
||||||
|
if (_actions.at(newSelected)->isEnabled() && !_actions.at(newSelected)->isSeparator()) {
|
||||||
|
_mouseSelection = false;
|
||||||
|
setSelected(newSelected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::enterEvent(QEvent *e) {
|
||||||
|
QPoint mouse = QCursor::pos();
|
||||||
|
if (_inner.marginsRemoved(QMargins(0, _st.skip, 0, _st.skip)).contains(mapFromGlobal(mouse))) {
|
||||||
|
_mouseSelection = true;
|
||||||
|
_mouse = mouse;
|
||||||
|
updateSelected();
|
||||||
|
} else {
|
||||||
|
if (_mouseSelection && _childMenuIndex < 0) {
|
||||||
|
_mouseSelection = false;
|
||||||
|
setSelected(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TWidget::enterEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::leaveEvent(QEvent *e) {
|
||||||
|
if (_mouseSelection && _childMenuIndex < 0) {
|
||||||
|
_mouseSelection = false;
|
||||||
|
setSelected(-1);
|
||||||
|
}
|
||||||
|
return TWidget::leaveEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::setSelected(int32 newSelected) {
|
||||||
|
if (newSelected >= _actions.size()) {
|
||||||
|
newSelected = -1;
|
||||||
|
}
|
||||||
|
if (newSelected != _selected) {
|
||||||
|
updateSelectedItem();
|
||||||
|
_selected = newSelected;
|
||||||
|
if (_mouseSelection) {
|
||||||
|
popupChildMenu(PressSourceMouse);
|
||||||
|
}
|
||||||
|
updateSelectedItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int32 PopupMenu::itemY(int32 index) {
|
||||||
|
if (index > _actions.size()) {
|
||||||
|
index = _actions.size();
|
||||||
|
}
|
||||||
|
int32 y = 0;
|
||||||
|
for (int32 i = 0; i < index; ++i) {
|
||||||
|
y += _actions.at(i)->isSeparator() ? _separatorHeight : _itemHeight;
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::updateSelectedItem() {
|
||||||
|
if (_selected >= 0) {
|
||||||
|
update(_padding.left(), _padding.top() + _st.skip + itemY(_selected), width() - _padding.left() - _padding.right(), _actions.at(_selected)->isSeparator() ? _separatorHeight : _itemHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::mouseMoveEvent(QMouseEvent *e) {
|
||||||
|
if (_inner.marginsRemoved(QMargins(0, _st.skip, 0, _st.skip)).contains(mapFromGlobal(e->globalPos()))) {
|
||||||
|
_mouseSelection = true;
|
||||||
|
_mouse = e->globalPos();
|
||||||
|
updateSelected();
|
||||||
|
} else {
|
||||||
|
if (_mouseSelection && _childMenuIndex < 0) {
|
||||||
|
_mouseSelection = false;
|
||||||
|
setSelected(-1);
|
||||||
|
}
|
||||||
|
if (_parent) {
|
||||||
|
_parent->mouseMoveEvent(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::mousePressEvent(QMouseEvent *e) {
|
||||||
|
mouseMoveEvent(e);
|
||||||
|
itemPressed(PressSourceMouse);
|
||||||
|
if (!_inner.contains(mapFromGlobal(e->globalPos()))) {
|
||||||
|
if (_parent) {
|
||||||
|
_parent->mousePressEvent(e);
|
||||||
|
} else {
|
||||||
|
hideMenu();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::focusOutEvent(QFocusEvent *e) {
|
||||||
|
hideMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::hideMenu(bool fast) {
|
||||||
|
if (isHidden()) return;
|
||||||
|
if (_parent && !_a_hide.animating()) {
|
||||||
|
_parent->childHiding(this);
|
||||||
|
}
|
||||||
|
if (fast) {
|
||||||
|
if (_a_hide.animating()) {
|
||||||
|
_a_hide.stop();
|
||||||
|
}
|
||||||
|
a_opacity = anim::fvalue(0, 0);
|
||||||
|
hideFinish();
|
||||||
|
} else {
|
||||||
|
if (!_a_hide.animating()) {
|
||||||
|
_cache = myGrab(this);
|
||||||
|
a_opacity.start(0);
|
||||||
|
_a_hide.start();
|
||||||
|
}
|
||||||
|
if (_parent) {
|
||||||
|
_parent->hideMenu();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_childMenuIndex >= 0) {
|
||||||
|
_menus.at(_childMenuIndex)->hideMenu(fast);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::childHiding(PopupMenu *child) {
|
||||||
|
if (_childMenuIndex >= 0 && _menus.at(_childMenuIndex) == child) {
|
||||||
|
_childMenuIndex = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::hideFinish() {
|
||||||
|
hide();
|
||||||
|
if (_deleteOnHide) {
|
||||||
|
deleteLater();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PopupMenu::animStep_hide(float64 ms) {
|
||||||
|
float64 dt = ms / _st.duration;
|
||||||
|
bool res = true;
|
||||||
|
if (dt >= 1) {
|
||||||
|
a_opacity.finish();
|
||||||
|
hideFinish();
|
||||||
|
res = false;
|
||||||
|
} else {
|
||||||
|
a_opacity.update(dt, anim::linear);
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::deleteOnHide(bool del) {
|
||||||
|
_deleteOnHide = del;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::popup(const QPoint &p) {
|
||||||
|
showMenu(p, 0, PressSourceMouse);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupMenu::showMenu(const QPoint &p, PopupMenu *parent, PressSource source) {
|
||||||
|
_parent = parent;
|
||||||
|
|
||||||
|
QPoint w = p - QPoint(0, _padding.top());
|
||||||
|
QRect r = App::app() ? App::app()->desktop()->screenGeometry(p) : QDesktopWidget().screenGeometry(p);
|
||||||
|
if (rtl()) {
|
||||||
|
if (w.x() - width() < r.x() - _padding.left()) {
|
||||||
|
if (_parent && w.x() + _parent->width() - _padding.left() - _padding.right() + width() - _padding.right() <= r.x() + r.width()) {
|
||||||
|
w.setX(w.x() + _parent->width() - _padding.left() - _padding.right());
|
||||||
|
} else {
|
||||||
|
w.setX(r.x() - _padding.left());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
w.setX(w.x() - width());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (w.x() + width() - _padding.right() > r.x() + r.width()) {
|
||||||
|
if (_parent && w.x() - _parent->width() + _padding.left() + _padding.right() - width() + _padding.right() >= r.x() - _padding.left()) {
|
||||||
|
w.setX(w.x() + _padding.left() + _padding.right() - _parent->width() - width() + _padding.left() + _padding.right());
|
||||||
|
} else {
|
||||||
|
w.setX(r.x() + r.width() - width() + _padding.right());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (w.y() + height() - _padding.bottom() > r.y() + r.height()) {
|
||||||
|
if (_parent) {
|
||||||
|
w.setY(r.y() + r.height() - height() + _padding.bottom());
|
||||||
|
} else {
|
||||||
|
w.setY(p.y() - height() + _padding.bottom());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (w.y() < r.y()) {
|
||||||
|
w.setY(r.y());
|
||||||
|
}
|
||||||
|
move(w);
|
||||||
|
|
||||||
|
setSelected((source == PressSourceMouse || _actions.isEmpty()) ? -1 : 0);
|
||||||
|
psUpdateOverlayed(this);
|
||||||
|
show();
|
||||||
|
psShowOverAll(this);
|
||||||
|
windowHandle()->requestActivate();
|
||||||
|
activateWindow();
|
||||||
|
|
||||||
|
if (_a_hide.animating()) {
|
||||||
|
_a_hide.stop();
|
||||||
|
_cache = QPixmap();
|
||||||
|
}
|
||||||
|
a_opacity = anim::fvalue(1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
PopupMenu::~PopupMenu() {
|
||||||
|
clearActions(true);
|
||||||
|
delete _menu;
|
||||||
|
#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||||
|
if (App::wnd()) {
|
||||||
|
App::wnd()->activateWindow();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
|
@ -17,85 +17,28 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QtWidgets/QWidget>
|
|
||||||
#include "gui/boxshadow.h"
|
|
||||||
|
|
||||||
class ContextMenu : public TWidget, public Animated {
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
ContextMenu(QWidget *parent, const style::dropdown &st = st::dropdownDef, const style::iconedButton &btnst = st::btnContext);
|
|
||||||
QAction *addAction(const QString &text, const QObject *receiver, const char* member);
|
|
||||||
void resetActions();
|
|
||||||
|
|
||||||
typedef QVector<QAction*> Actions;
|
|
||||||
Actions &actions();
|
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *e);
|
|
||||||
void paintEvent(QPaintEvent *e);
|
|
||||||
void keyPressEvent(QKeyEvent *e);
|
|
||||||
|
|
||||||
void focusOutEvent(QFocusEvent *e);
|
|
||||||
|
|
||||||
void fastHide();
|
|
||||||
|
|
||||||
bool animStep(float64 ms);
|
|
||||||
|
|
||||||
void deleteOnHide();
|
|
||||||
void popup(const QPoint &p);
|
|
||||||
|
|
||||||
~ContextMenu();
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
|
|
||||||
void hideStart();
|
|
||||||
void hideFinish();
|
|
||||||
|
|
||||||
void showStart();
|
|
||||||
|
|
||||||
void actionChanged();
|
|
||||||
|
|
||||||
void onActiveChanged();
|
|
||||||
void buttonStateChanged(int oldState, ButtonStateChangeSource source);
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
void clearActions();
|
|
||||||
void adjustButtons();
|
|
||||||
|
|
||||||
typedef QVector<IconedButton*> Buttons;
|
|
||||||
Buttons _buttons;
|
|
||||||
|
|
||||||
Actions _actions;
|
|
||||||
|
|
||||||
int32 _width, _height;
|
|
||||||
bool _hiding;
|
|
||||||
|
|
||||||
const style::dropdown &_st;
|
|
||||||
const style::iconedButton &_btnst;
|
|
||||||
|
|
||||||
BoxShadow _shadow;
|
|
||||||
int32 _selected;
|
|
||||||
|
|
||||||
anim::fvalue a_opacity;
|
|
||||||
|
|
||||||
bool _deleteOnHide;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
class PopupMenu : public TWidget {
|
class PopupMenu : public TWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PopupMenu(const style::PopupMenu &st = st::defaultPopupMenu);
|
PopupMenu(const style::PopupMenu &st = st::defaultPopupMenu);
|
||||||
|
PopupMenu(QMenu *menu, const style::PopupMenu &st = st::defaultPopupMenu);
|
||||||
QAction *addAction(const QString &text, const QObject *receiver, const char* member);
|
QAction *addAction(const QString &text, const QObject *receiver, const char* member);
|
||||||
|
QAction *addAction(QAction *a);
|
||||||
void resetActions();
|
void resetActions();
|
||||||
|
|
||||||
typedef QVector<QAction*> Actions;
|
typedef QVector<QAction*> Actions;
|
||||||
Actions &actions();
|
Actions &actions();
|
||||||
|
|
||||||
|
void deleteOnHide(bool del);
|
||||||
|
void popup(const QPoint &p);
|
||||||
|
void hideMenu(bool fast = false);
|
||||||
|
|
||||||
|
~PopupMenu();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e);
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e);
|
||||||
|
@ -103,40 +46,48 @@ public:
|
||||||
void mousePressEvent(QMouseEvent *e);
|
void mousePressEvent(QMouseEvent *e);
|
||||||
void leaveEvent(QEvent *e);
|
void leaveEvent(QEvent *e);
|
||||||
void enterEvent(QEvent *e);
|
void enterEvent(QEvent *e);
|
||||||
|
|
||||||
void focusOutEvent(QFocusEvent *e);
|
void focusOutEvent(QFocusEvent *e);
|
||||||
|
|
||||||
void fastHide();
|
|
||||||
|
|
||||||
bool animStep_hide(float64 ms);
|
|
||||||
|
|
||||||
void updateSelected();
|
|
||||||
|
|
||||||
void deleteOnHide();
|
|
||||||
void popup(const QPoint &p);
|
|
||||||
|
|
||||||
~PopupMenu();
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void hideStart();
|
|
||||||
void hideFinish();
|
|
||||||
|
|
||||||
void actionChanged();
|
void actionChanged();
|
||||||
void activeWindowChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void clearActions();
|
void updateSelected();
|
||||||
|
|
||||||
|
void childHiding(PopupMenu *child);
|
||||||
|
|
||||||
|
bool animStep_hide(float64 ms);
|
||||||
|
|
||||||
|
void init();
|
||||||
|
void hideFinish();
|
||||||
|
|
||||||
|
enum PressSource {
|
||||||
|
PressSourceMouse,
|
||||||
|
PressSourceKeyboard,
|
||||||
|
};
|
||||||
|
|
||||||
|
void clearActions(bool force = false);
|
||||||
|
int32 processAction(QAction *a, int32 index, int32 w);
|
||||||
void setSelected(int32 selected);
|
void setSelected(int32 selected);
|
||||||
|
int32 itemY(int32 index);
|
||||||
void updateSelectedItem();
|
void updateSelectedItem();
|
||||||
void itemPressed();
|
void itemPressed(PressSource source);
|
||||||
|
void popupChildMenu(PressSource source);
|
||||||
|
void showMenu(const QPoint &p, PopupMenu *parent, PressSource source);;
|
||||||
|
|
||||||
const style::PopupMenu &_st;
|
const style::PopupMenu &_st;
|
||||||
|
|
||||||
Actions _actions;
|
typedef QVector<PopupMenu*> PopupMenus;
|
||||||
|
|
||||||
int32 _itemHeight;
|
QMenu *_menu;
|
||||||
|
Actions _actions;
|
||||||
|
PopupMenus _menus;
|
||||||
|
PopupMenu *_parent;
|
||||||
|
QStringList _texts, _shortcutTexts;
|
||||||
|
|
||||||
|
int32 _itemHeight, _separatorHeight;
|
||||||
QRect _inner;
|
QRect _inner;
|
||||||
style::margins _padding;
|
style::margins _padding;
|
||||||
|
|
||||||
|
@ -144,7 +95,7 @@ private:
|
||||||
bool _mouseSelection;
|
bool _mouseSelection;
|
||||||
|
|
||||||
BoxShadow _shadow;
|
BoxShadow _shadow;
|
||||||
int32 _selected;
|
int32 _selected, _childMenuIndex;
|
||||||
|
|
||||||
QPixmap _cache;
|
QPixmap _cache;
|
||||||
anim::fvalue a_opacity;
|
anim::fvalue a_opacity;
|
|
@ -929,7 +929,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_menu) {
|
if (_menu) {
|
||||||
_menu->deleteOnHide();
|
|
||||||
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
||||||
_menu->popup(e->globalPos());
|
_menu->popup(e->globalPos());
|
||||||
e->accept();
|
e->accept();
|
||||||
|
|
|
@ -424,6 +424,7 @@ void MediaView::showSaveMsgFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaView::close() {
|
void MediaView::close() {
|
||||||
|
if (_menu) _menu->hideMenu(true);
|
||||||
if (App::wnd()) {
|
if (App::wnd()) {
|
||||||
App::wnd()->hideLayer(true);
|
App::wnd()->hideLayer(true);
|
||||||
}
|
}
|
||||||
|
@ -460,7 +461,6 @@ void MediaView::onDropdownHiding() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaView::onToMessage() {
|
void MediaView::onToMessage() {
|
||||||
if (_menu) _menu->fastHide();
|
|
||||||
if (HistoryItem *item = _msgid ? App::histItemById(_channel, _msgid) : 0) {
|
if (HistoryItem *item = _msgid ? App::histItemById(_channel, _msgid) : 0) {
|
||||||
if (App::wnd()) {
|
if (App::wnd()) {
|
||||||
close();
|
close();
|
||||||
|
@ -629,7 +629,7 @@ void MediaView::onDelete() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaView::onOverview() {
|
void MediaView::onOverview() {
|
||||||
if (_menu) _menu->fastHide();
|
if (_menu) _menu->hideMenu(true);
|
||||||
if (!_history || _overview == OverviewCount) {
|
if (!_history || _overview == OverviewCount) {
|
||||||
update();
|
update();
|
||||||
return;
|
return;
|
||||||
|
@ -1730,12 +1730,11 @@ void MediaView::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
_menu->deleteLater();
|
_menu->deleteLater();
|
||||||
_menu = 0;
|
_menu = 0;
|
||||||
}
|
}
|
||||||
_menu = new ContextMenu(this, st::mvDropdown, st::mvContextButton);
|
_menu = new PopupMenu(st::mvPopupMenu);
|
||||||
updateDropdown();
|
updateDropdown();
|
||||||
for (int32 i = 0, l = _btns.size(); i < l; ++i) {
|
for (int32 i = 0, l = _btns.size(); i < l; ++i) {
|
||||||
if (!_btns.at(i)->isHidden()) _menu->addAction(_btns.at(i)->getText(), _btns.at(i), SIGNAL(clicked()))->setEnabled(true);
|
if (!_btns.at(i)->isHidden()) _menu->addAction(_btns.at(i)->getText(), _btns.at(i), SIGNAL(clicked()))->setEnabled(true);
|
||||||
}
|
}
|
||||||
_menu->deleteOnHide();
|
|
||||||
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
||||||
_menu->popup(e->globalPos());
|
_menu->popup(e->globalPos());
|
||||||
e->accept();
|
e->accept();
|
||||||
|
|
|
@ -194,7 +194,7 @@ private:
|
||||||
QTimer _controlsHideTimer;
|
QTimer _controlsHideTimer;
|
||||||
anim::fvalue a_cOpacity;
|
anim::fvalue a_cOpacity;
|
||||||
|
|
||||||
ContextMenu *_menu;
|
PopupMenu *_menu;
|
||||||
Dropdown _dropdown;
|
Dropdown _dropdown;
|
||||||
IconedButton *_btnSaveCancel, *_btnToMessage, *_btnShowInFolder, *_btnSaveAs, *_btnCopy, *_btnForward, *_btnDelete, *_btnViewAll;
|
IconedButton *_btnSaveCancel, *_btnToMessage, *_btnShowInFolder, *_btnSaveAs, *_btnCopy, *_btnForward, *_btnDelete, *_btnViewAll;
|
||||||
QList<IconedButton*> _btns;
|
QList<IconedButton*> _btns;
|
||||||
|
|
|
@ -1858,7 +1858,6 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
if (_selectedMsgId > 0) updateMsg(App::histItemById(_channel, _selectedMsgId));
|
if (_selectedMsgId > 0) updateMsg(App::histItemById(_channel, _selectedMsgId));
|
||||||
}
|
}
|
||||||
if (_menu) {
|
if (_menu) {
|
||||||
_menu->deleteOnHide();
|
|
||||||
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
||||||
_menu->popup(e->globalPos());
|
_menu->popup(e->globalPos());
|
||||||
e->accept();
|
e->accept();
|
||||||
|
|
|
@ -1234,7 +1234,6 @@ void ProfileInner::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
if (_peerUser && !_peerUser->username.isEmpty()) {
|
if (_peerUser && !_peerUser->username.isEmpty()) {
|
||||||
_menu->addAction(lang(lng_context_copy_mention), this, SLOT(onCopyUsername()))->setEnabled(true);
|
_menu->addAction(lang(lng_context_copy_mention), this, SLOT(onCopyUsername()))->setEnabled(true);
|
||||||
}
|
}
|
||||||
_menu->deleteOnHide();
|
|
||||||
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
connect(_menu, SIGNAL(destroyed(QObject*)), this, SLOT(onMenuDestroy(QObject*)));
|
||||||
_menu->popup(e->globalPos());
|
_menu->popup(e->globalPos());
|
||||||
e->accept();
|
e->accept();
|
||||||
|
|
|
@ -62,7 +62,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org
|
||||||
#include "gui/flatinput.h"
|
#include "gui/flatinput.h"
|
||||||
#include "gui/flattextarea.h"
|
#include "gui/flattextarea.h"
|
||||||
#include "gui/flatbutton.h"
|
#include "gui/flatbutton.h"
|
||||||
#include "gui/contextmenu.h"
|
#include "gui/boxshadow.h"
|
||||||
|
#include "gui/popupmenu.h"
|
||||||
#include "gui/switcher.h"
|
#include "gui/switcher.h"
|
||||||
#include "gui/scrollarea.h"
|
#include "gui/scrollarea.h"
|
||||||
#include "gui/images.h"
|
#include "gui/images.h"
|
||||||
|
|
|
@ -445,6 +445,7 @@ void Window::init() {
|
||||||
void Window::firstShow() {
|
void Window::firstShow() {
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
trayIconMenu = new PopupMenu();
|
trayIconMenu = new PopupMenu();
|
||||||
|
trayIconMenu->deleteOnHide(false);
|
||||||
#else
|
#else
|
||||||
trayIconMenu = new QMenu(this);
|
trayIconMenu = new QMenu(this);
|
||||||
trayIconMenu->setFont(QFont("Tahoma"));
|
trayIconMenu->setFont(QFont("Tahoma"));
|
||||||
|
|
|
@ -122,7 +122,7 @@ SOURCES += \
|
||||||
./SourceFiles/gui/animation.cpp \
|
./SourceFiles/gui/animation.cpp \
|
||||||
./SourceFiles/gui/boxshadow.cpp \
|
./SourceFiles/gui/boxshadow.cpp \
|
||||||
./SourceFiles/gui/button.cpp \
|
./SourceFiles/gui/button.cpp \
|
||||||
./SourceFiles/gui/contextmenu.cpp \
|
./SourceFiles/gui/popupmenu.cpp \
|
||||||
./SourceFiles/gui/countryinput.cpp \
|
./SourceFiles/gui/countryinput.cpp \
|
||||||
./SourceFiles/gui/emoji_config.cpp \
|
./SourceFiles/gui/emoji_config.cpp \
|
||||||
./SourceFiles/gui/filedialog.cpp \
|
./SourceFiles/gui/filedialog.cpp \
|
||||||
|
@ -214,7 +214,7 @@ HEADERS += \
|
||||||
./SourceFiles/gui/animation.h \
|
./SourceFiles/gui/animation.h \
|
||||||
./SourceFiles/gui/boxshadow.h \
|
./SourceFiles/gui/boxshadow.h \
|
||||||
./SourceFiles/gui/button.h \
|
./SourceFiles/gui/button.h \
|
||||||
./SourceFiles/gui/contextmenu.h \
|
./SourceFiles/gui/popupmenu.h \
|
||||||
./SourceFiles/gui/countryinput.h \
|
./SourceFiles/gui/countryinput.h \
|
||||||
./SourceFiles/gui/emoji_config.h \
|
./SourceFiles/gui/emoji_config.h \
|
||||||
./SourceFiles/gui/filedialog.h \
|
./SourceFiles/gui/filedialog.h \
|
||||||
|
|
|
@ -211,10 +211,6 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="GeneratedFiles\Debug\moc_contextmenu.cpp">
|
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GeneratedFiles\Debug\moc_countryinput.cpp">
|
<ClCompile Include="GeneratedFiles\Debug\moc_countryinput.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
@ -355,6 +351,10 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="GeneratedFiles\Debug\moc_popupmenu.cpp">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="GeneratedFiles\Debug\moc_profilewidget.cpp">
|
<ClCompile Include="GeneratedFiles\Debug\moc_profilewidget.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
@ -473,10 +473,6 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="GeneratedFiles\Deploy\moc_contextmenu.cpp">
|
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GeneratedFiles\Deploy\moc_countryinput.cpp">
|
<ClCompile Include="GeneratedFiles\Deploy\moc_countryinput.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
@ -617,6 +613,10 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="GeneratedFiles\Deploy\moc_popupmenu.cpp">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="GeneratedFiles\Deploy\moc_profilewidget.cpp">
|
<ClCompile Include="GeneratedFiles\Deploy\moc_profilewidget.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
@ -761,10 +761,6 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="GeneratedFiles\Release\moc_contextmenu.cpp">
|
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GeneratedFiles\Release\moc_countryinput.cpp">
|
<ClCompile Include="GeneratedFiles\Release\moc_countryinput.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
@ -905,6 +901,10 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="GeneratedFiles\Release\moc_popupmenu.cpp">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="GeneratedFiles\Release\moc_profilewidget.cpp">
|
<ClCompile Include="GeneratedFiles\Release\moc_profilewidget.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
@ -996,7 +996,7 @@
|
||||||
<ClCompile Include="SourceFiles\gui\animation.cpp" />
|
<ClCompile Include="SourceFiles\gui\animation.cpp" />
|
||||||
<ClCompile Include="SourceFiles\gui\boxshadow.cpp" />
|
<ClCompile Include="SourceFiles\gui\boxshadow.cpp" />
|
||||||
<ClCompile Include="SourceFiles\gui\button.cpp" />
|
<ClCompile Include="SourceFiles\gui\button.cpp" />
|
||||||
<ClCompile Include="SourceFiles\gui\contextmenu.cpp" />
|
<ClCompile Include="SourceFiles\gui\popupmenu.cpp" />
|
||||||
<ClCompile Include="SourceFiles\gui\countryinput.cpp" />
|
<ClCompile Include="SourceFiles\gui\countryinput.cpp" />
|
||||||
<ClCompile Include="SourceFiles\gui\emoji_config.cpp" />
|
<ClCompile Include="SourceFiles\gui\emoji_config.cpp" />
|
||||||
<ClCompile Include="SourceFiles\gui\filedialog.cpp" />
|
<ClCompile Include="SourceFiles\gui\filedialog.cpp" />
|
||||||
|
@ -1553,19 +1553,19 @@
|
||||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
<ClInclude Include="SourceFiles\gui\boxshadow.h" />
|
<ClInclude Include="SourceFiles\gui\boxshadow.h" />
|
||||||
<CustomBuild Include="SourceFiles\gui\contextmenu.h">
|
<CustomBuild Include="SourceFiles\gui\popupmenu.h">
|
||||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||||
<Message Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">Moc%27ing contextmenu.h...</Message>
|
<Message Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">Moc%27ing popupmenu.h...</Message>
|
||||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||||
<Command Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/contextmenu.h"</Command>
|
<Command Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui"</Command>
|
||||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing contextmenu.h...</Message>
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing popupmenu.h...</Message>
|
||||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/contextmenu.h"</Command>
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui"</Command>
|
||||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing contextmenu.h...</Message>
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing popupmenu.h...</Message>
|
||||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/contextmenu.h"</Command>
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui"</Command>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
<ClInclude Include="SourceFiles\gui\emoji_config.h" />
|
<ClInclude Include="SourceFiles\gui\emoji_config.h" />
|
||||||
<CustomBuild Include="SourceFiles\gui\flatcheckbox.h">
|
<CustomBuild Include="SourceFiles\gui\flatcheckbox.h">
|
||||||
|
@ -2119,7 +2119,9 @@
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Telegram.plist" />
|
<None Include="Telegram.plist" />
|
||||||
|
<None Include="Telegram.pro" />
|
||||||
<None Include="Telegram.xcodeproj\project.pbxproj" />
|
<None Include="Telegram.xcodeproj\project.pbxproj" />
|
||||||
|
<None Include="Telegram.xcodeproj\qt_preprocess.mak" />
|
||||||
<None Include="Version" />
|
<None Include="Version" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
|
|
@ -657,18 +657,6 @@
|
||||||
<ClCompile Include="GeneratedFiles\Release\moc_audio.cpp">
|
<ClCompile Include="GeneratedFiles\Release\moc_audio.cpp">
|
||||||
<Filter>Generated Files\Release</Filter>
|
<Filter>Generated Files\Release</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="SourceFiles\gui\contextmenu.cpp">
|
|
||||||
<Filter>gui</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GeneratedFiles\Deploy\moc_contextmenu.cpp">
|
|
||||||
<Filter>Generated Files\Deploy</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GeneratedFiles\Debug\moc_contextmenu.cpp">
|
|
||||||
<Filter>Generated Files\Debug</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="GeneratedFiles\Release\moc_contextmenu.cpp">
|
|
||||||
<Filter>Generated Files\Release</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="SourceFiles\mtproto\mtpCoreTypes.cpp">
|
<ClCompile Include="SourceFiles\mtproto\mtpCoreTypes.cpp">
|
||||||
<Filter>mtproto</Filter>
|
<Filter>mtproto</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -900,6 +888,18 @@
|
||||||
<ClCompile Include="GeneratedFiles\numbers.cpp">
|
<ClCompile Include="GeneratedFiles\numbers.cpp">
|
||||||
<Filter>Generated Files</Filter>
|
<Filter>Generated Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="GeneratedFiles\Deploy\moc_popupmenu.cpp">
|
||||||
|
<Filter>Generated Files\Deploy</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="GeneratedFiles\Debug\moc_popupmenu.cpp">
|
||||||
|
<Filter>Generated Files\Debug</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="GeneratedFiles\Release\moc_popupmenu.cpp">
|
||||||
|
<Filter>Generated Files\Release</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="SourceFiles\gui\popupmenu.cpp">
|
||||||
|
<Filter>gui</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="SourceFiles\stdafx.h">
|
<ClInclude Include="SourceFiles\stdafx.h">
|
||||||
|
@ -1132,9 +1132,6 @@
|
||||||
<CustomBuild Include="SourceFiles\audio.h">
|
<CustomBuild Include="SourceFiles\audio.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
<CustomBuild Include="SourceFiles\gui\contextmenu.h">
|
|
||||||
<Filter>gui</Filter>
|
|
||||||
</CustomBuild>
|
|
||||||
<CustomBuild Include="SourceFiles\boxes\usernamebox.h">
|
<CustomBuild Include="SourceFiles\boxes\usernamebox.h">
|
||||||
<Filter>boxes</Filter>
|
<Filter>boxes</Filter>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
|
@ -1210,6 +1207,9 @@
|
||||||
<CustomBuild Include="SourceFiles\telegram_wnd.qrc">
|
<CustomBuild Include="SourceFiles\telegram_wnd.qrc">
|
||||||
<Filter>Resources</Filter>
|
<Filter>Resources</Filter>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="SourceFiles\gui\popupmenu.h">
|
||||||
|
<Filter>gui</Filter>
|
||||||
|
</CustomBuild>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="SourceFiles\langs\lang_it.strings">
|
<None Include="SourceFiles\langs\lang_it.strings">
|
||||||
|
@ -1242,6 +1242,12 @@
|
||||||
<None Include="Version">
|
<None Include="Version">
|
||||||
<Filter>Version</Filter>
|
<Filter>Version</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="Telegram.xcodeproj\qt_preprocess.mak">
|
||||||
|
<Filter>Version</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="Telegram.pro">
|
||||||
|
<Filter>Version</Filter>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="SourceFiles\art\icon256.ico">
|
<Image Include="SourceFiles\art\icon256.ico">
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
074968D01A44D14C00394F46 /* languagebox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074968CE1A44D14C00394F46 /* languagebox.cpp */; };
|
074968D01A44D14C00394F46 /* languagebox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074968CE1A44D14C00394F46 /* languagebox.cpp */; };
|
||||||
074968D21A44D1DF00394F46 /* moc_languagebox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074968D11A44D1DF00394F46 /* moc_languagebox.cpp */; };
|
074968D21A44D1DF00394F46 /* moc_languagebox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074968D11A44D1DF00394F46 /* moc_languagebox.cpp */; };
|
||||||
0749CE69194D723400345D61 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 07C3AF24194335ED0016CFF1 /* Images.xcassets */; };
|
0749CE69194D723400345D61 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 07C3AF24194335ED0016CFF1 /* Images.xcassets */; };
|
||||||
074FCB8E19D36851004C6EB2 /* contextmenu.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074FCB8C19D36851004C6EB2 /* contextmenu.cpp */; };
|
074FCB8E19D36851004C6EB2 /* popupmenu.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074FCB8C19D36851004C6EB2 /* popupmenu.cpp */; };
|
||||||
074FCB9119D36E60004C6EB2 /* moc_contextmenu.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074FCB9019D36E60004C6EB2 /* moc_contextmenu.cpp */; };
|
074FCB9119D36E60004C6EB2 /* moc_popupmenu.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074FCB9019D36E60004C6EB2 /* moc_popupmenu.cpp */; };
|
||||||
07539B1D1A1416AF00083EFC /* moc_history.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07539B1C1A1416AF00083EFC /* moc_history.cpp */; };
|
07539B1D1A1416AF00083EFC /* moc_history.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07539B1C1A1416AF00083EFC /* moc_history.cpp */; };
|
||||||
0755AEDD1AD12A80004D738A /* moc_abstractbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDA1AD12A80004D738A /* moc_abstractbox.cpp */; };
|
0755AEDD1AD12A80004D738A /* moc_abstractbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDA1AD12A80004D738A /* moc_abstractbox.cpp */; };
|
||||||
0755AEDE1AD12A80004D738A /* moc_intropwdcheck.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDB1AD12A80004D738A /* moc_intropwdcheck.cpp */; };
|
0755AEDE1AD12A80004D738A /* moc_intropwdcheck.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDB1AD12A80004D738A /* moc_intropwdcheck.cpp */; };
|
||||||
|
@ -279,9 +279,9 @@
|
||||||
074968CE1A44D14C00394F46 /* languagebox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = languagebox.cpp; path = SourceFiles/boxes/languagebox.cpp; sourceTree = SOURCE_ROOT; };
|
074968CE1A44D14C00394F46 /* languagebox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = languagebox.cpp; path = SourceFiles/boxes/languagebox.cpp; sourceTree = SOURCE_ROOT; };
|
||||||
074968CF1A44D14C00394F46 /* languagebox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = languagebox.h; path = SourceFiles/boxes/languagebox.h; sourceTree = SOURCE_ROOT; };
|
074968CF1A44D14C00394F46 /* languagebox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = languagebox.h; path = SourceFiles/boxes/languagebox.h; sourceTree = SOURCE_ROOT; };
|
||||||
074968D11A44D1DF00394F46 /* moc_languagebox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_languagebox.cpp; path = GeneratedFiles/Debug/moc_languagebox.cpp; sourceTree = SOURCE_ROOT; };
|
074968D11A44D1DF00394F46 /* moc_languagebox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_languagebox.cpp; path = GeneratedFiles/Debug/moc_languagebox.cpp; sourceTree = SOURCE_ROOT; };
|
||||||
074FCB8C19D36851004C6EB2 /* contextmenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = contextmenu.cpp; path = SourceFiles/gui/contextmenu.cpp; sourceTree = SOURCE_ROOT; };
|
074FCB8C19D36851004C6EB2 /* popupmenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = popupmenu.cpp; path = SourceFiles/gui/popupmenu.cpp; sourceTree = SOURCE_ROOT; };
|
||||||
074FCB8D19D36851004C6EB2 /* contextmenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = contextmenu.h; path = SourceFiles/gui/contextmenu.h; sourceTree = SOURCE_ROOT; };
|
074FCB8D19D36851004C6EB2 /* popupmenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = popupmenu.h; path = SourceFiles/gui/popupmenu.h; sourceTree = SOURCE_ROOT; };
|
||||||
074FCB9019D36E60004C6EB2 /* moc_contextmenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_contextmenu.cpp; path = GeneratedFiles/Debug/moc_contextmenu.cpp; sourceTree = SOURCE_ROOT; };
|
074FCB9019D36E60004C6EB2 /* moc_popupmenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_popupmenu.cpp; path = GeneratedFiles/Debug/moc_popupmenu.cpp; sourceTree = SOURCE_ROOT; };
|
||||||
07539B1C1A1416AF00083EFC /* moc_history.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_history.cpp; path = GeneratedFiles/Debug/moc_history.cpp; sourceTree = SOURCE_ROOT; };
|
07539B1C1A1416AF00083EFC /* moc_history.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_history.cpp; path = GeneratedFiles/Debug/moc_history.cpp; sourceTree = SOURCE_ROOT; };
|
||||||
0755AEDA1AD12A80004D738A /* moc_abstractbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_abstractbox.cpp; path = GeneratedFiles/Debug/moc_abstractbox.cpp; sourceTree = SOURCE_ROOT; };
|
0755AEDA1AD12A80004D738A /* moc_abstractbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_abstractbox.cpp; path = GeneratedFiles/Debug/moc_abstractbox.cpp; sourceTree = SOURCE_ROOT; };
|
||||||
0755AEDB1AD12A80004D738A /* moc_intropwdcheck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_intropwdcheck.cpp; path = GeneratedFiles/Debug/moc_intropwdcheck.cpp; sourceTree = SOURCE_ROOT; };
|
0755AEDB1AD12A80004D738A /* moc_intropwdcheck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_intropwdcheck.cpp; path = GeneratedFiles/Debug/moc_intropwdcheck.cpp; sourceTree = SOURCE_ROOT; };
|
||||||
|
@ -828,7 +828,7 @@
|
||||||
D3FE9C29B6A61D7C3C4B731B /* animation.cpp */,
|
D3FE9C29B6A61D7C3C4B731B /* animation.cpp */,
|
||||||
08A7682548FB7E671FF03822 /* boxshadow.cpp */,
|
08A7682548FB7E671FF03822 /* boxshadow.cpp */,
|
||||||
4D55B83DFDFE3D492CDBD27A /* button.cpp */,
|
4D55B83DFDFE3D492CDBD27A /* button.cpp */,
|
||||||
074FCB8C19D36851004C6EB2 /* contextmenu.cpp */,
|
074FCB8C19D36851004C6EB2 /* popupmenu.cpp */,
|
||||||
3E329D4547CC23585307FA32 /* countryinput.cpp */,
|
3E329D4547CC23585307FA32 /* countryinput.cpp */,
|
||||||
B3062303CE8F4EB9325CB3DC /* emoji_config.cpp */,
|
B3062303CE8F4EB9325CB3DC /* emoji_config.cpp */,
|
||||||
DE4C0E3685DDAE58F9397B13 /* filedialog.cpp */,
|
DE4C0E3685DDAE58F9397B13 /* filedialog.cpp */,
|
||||||
|
@ -846,7 +846,7 @@
|
||||||
85FABD67716E36CD8B3CA4FA /* animation.h */,
|
85FABD67716E36CD8B3CA4FA /* animation.h */,
|
||||||
BDAB6725B830DEE896DC0F55 /* boxshadow.h */,
|
BDAB6725B830DEE896DC0F55 /* boxshadow.h */,
|
||||||
4604687EBA85611C9E8A9CDF /* button.h */,
|
4604687EBA85611C9E8A9CDF /* button.h */,
|
||||||
074FCB8D19D36851004C6EB2 /* contextmenu.h */,
|
074FCB8D19D36851004C6EB2 /* popupmenu.h */,
|
||||||
6868ADA9E9A9801B2BA92B97 /* countryinput.h */,
|
6868ADA9E9A9801B2BA92B97 /* countryinput.h */,
|
||||||
19618554524B8D928F13940D /* emoji_config.h */,
|
19618554524B8D928F13940D /* emoji_config.h */,
|
||||||
9BD0BE66E93ACE27D00D6D75 /* filedialog.h */,
|
9BD0BE66E93ACE27D00D6D75 /* filedialog.h */,
|
||||||
|
@ -1116,7 +1116,7 @@
|
||||||
07539B1C1A1416AF00083EFC /* moc_history.cpp */,
|
07539B1C1A1416AF00083EFC /* moc_history.cpp */,
|
||||||
074756181A1372C600CA07F7 /* moc_types.cpp */,
|
074756181A1372C600CA07F7 /* moc_types.cpp */,
|
||||||
07D8510719F8340A00623D75 /* moc_usernamebox.cpp */,
|
07D8510719F8340A00623D75 /* moc_usernamebox.cpp */,
|
||||||
074FCB9019D36E60004C6EB2 /* moc_contextmenu.cpp */,
|
074FCB9019D36E60004C6EB2 /* moc_popupmenu.cpp */,
|
||||||
07D703BA19B88FB900C4EED2 /* moc_audio.cpp */,
|
07D703BA19B88FB900C4EED2 /* moc_audio.cpp */,
|
||||||
0732E4AB199E268A00D50FE7 /* moc_overviewwidget.cpp */,
|
0732E4AB199E268A00D50FE7 /* moc_overviewwidget.cpp */,
|
||||||
07C4753E1967E37300CAAFE9 /* moc_switcher.cpp */,
|
07C4753E1967E37300CAAFE9 /* moc_switcher.cpp */,
|
||||||
|
@ -1523,7 +1523,7 @@
|
||||||
68FFEB7CA30BF0149161B809 /* window.cpp in Compile Sources */,
|
68FFEB7CA30BF0149161B809 /* window.cpp in Compile Sources */,
|
||||||
0CB7DE9A54CC9BF86FB7B5CA /* mtp.cpp in Compile Sources */,
|
0CB7DE9A54CC9BF86FB7B5CA /* mtp.cpp in Compile Sources */,
|
||||||
DF259E9677CC63AF8754032B /* mtpConnection.cpp in Compile Sources */,
|
DF259E9677CC63AF8754032B /* mtpConnection.cpp in Compile Sources */,
|
||||||
074FCB9119D36E60004C6EB2 /* moc_contextmenu.cpp in Compile Sources */,
|
074FCB9119D36E60004C6EB2 /* moc_popupmenu.cpp in Compile Sources */,
|
||||||
B6346B66B0A2228A91D8A5D9 /* mtpDC.cpp in Compile Sources */,
|
B6346B66B0A2228A91D8A5D9 /* mtpDC.cpp in Compile Sources */,
|
||||||
0755AEDF1AD12A80004D738A /* moc_sessionsbox.cpp in Compile Sources */,
|
0755AEDF1AD12A80004D738A /* moc_sessionsbox.cpp in Compile Sources */,
|
||||||
B8CA3E1E11A7E0E7DF9E1CDE /* mtpFileLoader.cpp in Compile Sources */,
|
B8CA3E1E11A7E0E7DF9E1CDE /* mtpFileLoader.cpp in Compile Sources */,
|
||||||
|
@ -1547,7 +1547,7 @@
|
||||||
E3D7A5CA24541D5DB69D6606 /* images.cpp in Compile Sources */,
|
E3D7A5CA24541D5DB69D6606 /* images.cpp in Compile Sources */,
|
||||||
ADE99904299B99EB6135E8D9 /* scrollarea.cpp in Compile Sources */,
|
ADE99904299B99EB6135E8D9 /* scrollarea.cpp in Compile Sources */,
|
||||||
90085DF442550A0845D5AF37 /* style_core.cpp in Compile Sources */,
|
90085DF442550A0845D5AF37 /* style_core.cpp in Compile Sources */,
|
||||||
074FCB8E19D36851004C6EB2 /* contextmenu.cpp in Compile Sources */,
|
074FCB8E19D36851004C6EB2 /* popupmenu.cpp in Compile Sources */,
|
||||||
3AA6E7264581F82856FB37F7 /* text.cpp in Compile Sources */,
|
3AA6E7264581F82856FB37F7 /* text.cpp in Compile Sources */,
|
||||||
FCE6518C548DF7BC82228A4A /* twidget.cpp in Compile Sources */,
|
FCE6518C548DF7BC82228A4A /* twidget.cpp in Compile Sources */,
|
||||||
E9F1CE7F9B18C7C85A50E62D /* style_auto.cpp in Compile Sources */,
|
E9F1CE7F9B18C7C85A50E62D /* style_auto.cpp in Compile Sources */,
|
||||||
|
|
|
@ -40,7 +40,7 @@ compilers: GeneratedFiles/qrc_telegram.cpp GeneratedFiles/qrc_telegram_emojis.cp
|
||||||
GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp\
|
GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp\
|
||||||
GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp\
|
GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp\
|
||||||
GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp\
|
GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp\
|
||||||
GeneratedFiles/Debug/moc_contextmenu.cpp\
|
GeneratedFiles/Debug/moc_popupmenu.cpp\
|
||||||
GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp\
|
GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp\
|
||||||
GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp\
|
GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp\
|
||||||
GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp\
|
GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp\
|
||||||
|
@ -99,9 +99,9 @@ GeneratedFiles/qrc_telegram_mac.cpp: SourceFiles/telegram_mac.qrc \
|
||||||
SourceFiles/art/osxtray.png
|
SourceFiles/art/osxtray.png
|
||||||
/usr/local/Qt-5.5.1/bin/rcc -name telegram_mac SourceFiles/telegram_mac.qrc -o GeneratedFiles/qrc_telegram_mac.cpp
|
/usr/local/Qt-5.5.1/bin/rcc -name telegram_mac SourceFiles/telegram_mac.qrc -o GeneratedFiles/qrc_telegram_mac.cpp
|
||||||
|
|
||||||
compiler_moc_header_make_all: GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamebox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
compiler_moc_header_make_all: GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_popupmenu.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamebox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
||||||
compiler_moc_header_clean:
|
compiler_moc_header_clean:
|
||||||
-$(DEL_FILE) GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_contextmenu.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamedbox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
-$(DEL_FILE) GeneratedFiles/Debug/moc_apiwrap.cpp GeneratedFiles/Debug/moc_application.cpp GeneratedFiles/Debug/moc_audio.cpp GeneratedFiles/Debug/moc_autoupdater.cpp GeneratedFiles/Debug/moc_dialogswidget.cpp GeneratedFiles/Debug/moc_dropdown.cpp GeneratedFiles/Debug/moc_fileuploader.cpp GeneratedFiles/Debug/moc_history.cpp GeneratedFiles/Debug/moc_historywidget.cpp GeneratedFiles/Debug/moc_layerwidget.cpp GeneratedFiles/Debug/moc_mediaview.cpp GeneratedFiles/Debug/moc_overviewwidget.cpp GeneratedFiles/Debug/moc_playerwidget.cpp GeneratedFiles/Debug/moc_profilewidget.cpp GeneratedFiles/Debug/moc_passcodewidget.cpp GeneratedFiles/Debug/moc_localimageloader.cpp GeneratedFiles/Debug/moc_localstorage.cpp GeneratedFiles/Debug/moc_mainwidget.cpp GeneratedFiles/Debug/moc_settingswidget.cpp GeneratedFiles/Debug/moc_sysbuttons.cpp GeneratedFiles/Debug/moc_title.cpp GeneratedFiles/Debug/moc_types.cpp GeneratedFiles/Debug/moc_window.cpp GeneratedFiles/Debug/moc_mtp.cpp GeneratedFiles/Debug/moc_mtpConnection.cpp GeneratedFiles/Debug/moc_mtpDC.cpp GeneratedFiles/Debug/moc_mtpFileLoader.cpp GeneratedFiles/Debug/moc_mtpSession.cpp GeneratedFiles/Debug/moc_animation.cpp GeneratedFiles/Debug/moc_button.cpp GeneratedFiles/Debug/moc_popupmenu.cpp GeneratedFiles/Debug/moc_countryinput.cpp GeneratedFiles/Debug/moc_flatbutton.cpp GeneratedFiles/Debug/moc_flatcheckbox.cpp GeneratedFiles/Debug/moc_flatinput.cpp GeneratedFiles/Debug/moc_flatlabel.cpp GeneratedFiles/Debug/moc_flattextarea.cpp GeneratedFiles/Debug/moc_switcher.cpp GeneratedFiles/Debug/moc_scrollarea.cpp GeneratedFiles/Debug/moc_twidget.cpp GeneratedFiles/Debug/moc_aboutbox.cpp GeneratedFiles/Debug/moc_abstractbox.cpp GeneratedFiles/Debug/moc_addcontactbox.cpp GeneratedFiles/Debug/moc_autolockbox.cpp GeneratedFiles/Debug/moc_backgroundbox.cpp GeneratedFiles/Debug/moc_confirmbox.cpp GeneratedFiles/Debug/moc_connectionbox.cpp GeneratedFiles/Debug/moc_contactsbox.cpp GeneratedFiles/Debug/moc_downloadpathbox.cpp GeneratedFiles/Debug/moc_emojibox.cpp GeneratedFiles/Debug/moc_languagebox.cpp GeneratedFiles/Debug/moc_passcodebox.cpp GeneratedFiles/Debug/moc_photocropbox.cpp GeneratedFiles/Debug/moc_photosendbox.cpp GeneratedFiles/Debug/moc_sessionsbox.cpp GeneratedFiles/Debug/moc_stickersetbox.cpp GeneratedFiles/Debug/moc_usernamedbox.cpp GeneratedFiles/Debug/moc_intro.cpp GeneratedFiles/Debug/moc_introcode.cpp GeneratedFiles/Debug/moc_introphone.cpp GeneratedFiles/Debug/moc_intropwdcheck.cpp GeneratedFiles/Debug/moc_introsignup.cpp GeneratedFiles/Debug/moc_pspecific_mac.cpp
|
||||||
GeneratedFiles/Debug/moc_apiwrap.cpp: SourceFiles/types.h \
|
GeneratedFiles/Debug/moc_apiwrap.cpp: SourceFiles/types.h \
|
||||||
SourceFiles/logs.h \
|
SourceFiles/logs.h \
|
||||||
SourceFiles/apiwrap.h
|
SourceFiles/apiwrap.h
|
||||||
|
@ -348,9 +348,9 @@ GeneratedFiles/Debug/moc_button.cpp: ../../Libraries/QtStatic/qtbase/include/QtW
|
||||||
SourceFiles/gui/button.h
|
SourceFiles/gui/button.h
|
||||||
/usr/local/Qt-5.5.1/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.5.1/mkspecs/macx-clang -I. -I/usr/local/Qt-5.5.1/include/QtGui/5.5.1/QtGui -I/usr/local/Qt-5.5.1/include/QtCore/5.5.1/QtCore -I/usr/local/Qt-5.5.1/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.5.1/include -I/usr/local/Qt-5.5.1/include/QtMultimedia -I/usr/local/Qt-5.5.1/include/QtWidgets -I/usr/local/Qt-5.5.1/include/QtNetwork -I/usr/local/Qt-5.5.1/include/QtGui -I/usr/local/Qt-5.5.1/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/gui/button.h -o GeneratedFiles/Debug/moc_button.cpp
|
/usr/local/Qt-5.5.1/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.5.1/mkspecs/macx-clang -I. -I/usr/local/Qt-5.5.1/include/QtGui/5.5.1/QtGui -I/usr/local/Qt-5.5.1/include/QtCore/5.5.1/QtCore -I/usr/local/Qt-5.5.1/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.5.1/include -I/usr/local/Qt-5.5.1/include/QtMultimedia -I/usr/local/Qt-5.5.1/include/QtWidgets -I/usr/local/Qt-5.5.1/include/QtNetwork -I/usr/local/Qt-5.5.1/include/QtGui -I/usr/local/Qt-5.5.1/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/gui/button.h -o GeneratedFiles/Debug/moc_button.cpp
|
||||||
|
|
||||||
GeneratedFiles/Debug/moc_contextmenu.cpp: ../../Libraries/QtStatic/qtbase/include/QtWidgets/QWidget \
|
GeneratedFiles/Debug/moc_popupmenu.cpp: ../../Libraries/QtStatic/qtbase/include/QtWidgets/QWidget \
|
||||||
SourceFiles/gui/contextmenu.h
|
SourceFiles/gui/popupmenu.h
|
||||||
/usr/local/Qt-5.5.1/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.5.1/mkspecs/macx-clang -I. -I/usr/local/Qt-5.5.1/include/QtGui/5.5.1/QtGui -I/usr/local/Qt-5.5.1/include/QtCore/5.5.1/QtCore -I/usr/local/Qt-5.5.1/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.5.1/include -I/usr/local/Qt-5.5.1/include/QtMultimedia -I/usr/local/Qt-5.5.1/include/QtWidgets -I/usr/local/Qt-5.5.1/include/QtNetwork -I/usr/local/Qt-5.5.1/include/QtGui -I/usr/local/Qt-5.5.1/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/gui/contextmenu.h -o GeneratedFiles/Debug/moc_contextmenu.cpp
|
/usr/local/Qt-5.5.1/bin/moc $(DEFINES) -D__APPLE__ -D__GNUC__=4 -I/usr/local/Qt-5.5.1/mkspecs/macx-clang -I. -I/usr/local/Qt-5.5.1/include/QtGui/5.5.1/QtGui -I/usr/local/Qt-5.5.1/include/QtCore/5.5.1/QtCore -I/usr/local/Qt-5.5.1/include -I./SourceFiles -I./GeneratedFiles -I../../Libraries/lzma/C -I../../Libraries/libexif-0.6.20 -I/usr/local/Qt-5.5.1/include -I/usr/local/Qt-5.5.1/include/QtMultimedia -I/usr/local/Qt-5.5.1/include/QtWidgets -I/usr/local/Qt-5.5.1/include/QtNetwork -I/usr/local/Qt-5.5.1/include/QtGui -I/usr/local/Qt-5.5.1/include/QtCore -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/backward -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include SourceFiles/gui/popupmenu.h -o GeneratedFiles/Debug/moc_popupmenu.cpp
|
||||||
|
|
||||||
GeneratedFiles/Debug/moc_countryinput.cpp: ../../Libraries/QtStatic/qtbase/include/QtWidgets/QWidget \
|
GeneratedFiles/Debug/moc_countryinput.cpp: ../../Libraries/QtStatic/qtbase/include/QtWidgets/QWidget \
|
||||||
SourceFiles/style.h \
|
SourceFiles/style.h \
|
||||||
|
|
|
@ -282,7 +282,7 @@ index 112bb8e..45be6c6 100644
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ families << family;
|
+ families << family;
|
||||||
}
|
}
|
||||||
populateFromPattern(pattern);
|
populateFromPattern(pattern);
|
||||||
|
@ -1149,7 +1149,7 @@ new file mode 100644
|
||||||
index 0000000..b47d332
|
index 0000000..b47d332
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.cpp
|
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.cpp
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/*
|
+/*
|
||||||
+ * This file was generated by qdbusxml2cpp version 0.8
|
+ * This file was generated by qdbusxml2cpp version 0.8
|
||||||
+ * Command line was: qdbusxml2cpp -N -p fcitxqtinputcontextproxy -c FcitxQtInputContextProxy interfaces/org.fcitx.Fcitx.InputContext.xml -i fcitxqtformattedpreedit.h -i fcitxqt_export.h
|
+ * Command line was: qdbusxml2cpp -N -p fcitxqtinputcontextproxy -c FcitxQtInputContextProxy interfaces/org.fcitx.Fcitx.InputContext.xml -i fcitxqtformattedpreedit.h -i fcitxqt_export.h
|
||||||
|
@ -1175,7 +1175,6 @@ index 0000000..b47d332
|
||||||
+FcitxQtInputContextProxy::~FcitxQtInputContextProxy()
|
+FcitxQtInputContextProxy::~FcitxQtInputContextProxy()
|
||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h
|
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..19874dc
|
index 0000000..19874dc
|
||||||
|
@ -1494,7 +1493,7 @@ new file mode 100644
|
||||||
index 0000000..068f4c2
|
index 0000000..068f4c2
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.cpp
|
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.cpp
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/*
|
+/*
|
||||||
+ * This file was generated by qdbusxml2cpp version 0.8
|
+ * This file was generated by qdbusxml2cpp version 0.8
|
||||||
+ * Command line was: qdbusxml2cpp -N -p fcitxqtinputmethodproxy -c FcitxQtInputMethodProxy interfaces/org.fcitx.Fcitx.InputMethod.xml -i fcitxqtinputmethoditem.h -i fcitxqt_export.h
|
+ * Command line was: qdbusxml2cpp -N -p fcitxqtinputmethodproxy -c FcitxQtInputMethodProxy interfaces/org.fcitx.Fcitx.InputMethod.xml -i fcitxqtinputmethoditem.h -i fcitxqt_export.h
|
||||||
|
@ -1520,7 +1519,6 @@ index 0000000..068f4c2
|
||||||
+FcitxQtInputMethodProxy::~FcitxQtInputMethodProxy()
|
+FcitxQtInputMethodProxy::~FcitxQtInputMethodProxy()
|
||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h
|
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..7aa37e2
|
index 0000000..7aa37e2
|
||||||
|
@ -1919,7 +1917,7 @@ new file mode 100644
|
||||||
index 0000000..7523a92
|
index 0000000..7523a92
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.cpp
|
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.cpp
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/*
|
+/*
|
||||||
+ * This file was generated by qdbusxml2cpp version 0.8
|
+ * This file was generated by qdbusxml2cpp version 0.8
|
||||||
+ * Command line was: qdbusxml2cpp -N -p fcitxqtkeyboardproxy -c FcitxQtKeyboardProxy interfaces/org.fcitx.Fcitx.Keyboard.xml -i fcitxqtkeyboardlayout.h -i fcitxqt_export.h
|
+ * Command line was: qdbusxml2cpp -N -p fcitxqtkeyboardproxy -c FcitxQtKeyboardProxy interfaces/org.fcitx.Fcitx.Keyboard.xml -i fcitxqtkeyboardlayout.h -i fcitxqt_export.h
|
||||||
|
@ -1945,7 +1943,6 @@ index 0000000..7523a92
|
||||||
+FcitxQtKeyboardProxy::~FcitxQtKeyboardProxy()
|
+FcitxQtKeyboardProxy::~FcitxQtKeyboardProxy()
|
||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h
|
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..42a6561
|
index 0000000..42a6561
|
||||||
|
|
9
XCODE.md
9
XCODE.md
|
@ -142,14 +142,15 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run
|
||||||
|
|
||||||
git clone git://code.qt.io/qt/qt5.git QtStatic
|
git clone git://code.qt.io/qt/qt5.git QtStatic
|
||||||
cd QtStatic
|
cd QtStatic
|
||||||
git checkout 5.5.1
|
git checkout 5.5
|
||||||
perl init-repository --module-subset=qtbase,qtimageformats
|
perl init-repository --module-subset=qtbase,qtimageformats
|
||||||
|
git checkout v5.5.1
|
||||||
|
cd qtimageformats && git checkout v5.5.1 && cd ..
|
||||||
|
cd qtbase && git checkout v5.5.1 && cd ..
|
||||||
|
|
||||||
#####Apply the patch
|
#####Apply the patch
|
||||||
|
|
||||||
cd qtbase
|
cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd ..
|
||||||
git apply ./../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
#####Building library
|
#####Building library
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue