Beta version 10019002: fixed build for Xcode.

This commit is contained in:
John Preston 2016-11-06 21:45:50 +03:00
parent dac96bfc4a
commit 0326976473
6 changed files with 23 additions and 12 deletions

View File

@ -144,7 +144,7 @@ public:
bool isActive(bool cached = true) const; bool isActive(bool cached = true) const;
void hideMediaview(); void hideMediaview();
QImage iconWithCounter(int size, int count, const style::color &bg, const style::color &fg, bool smallIcon); QImage iconWithCounter(int size, int count, const style::color &bg, const style::color &fg, bool smallIcon) override;
bool contentOverlapped(const QRect &globalRect); bool contentOverlapped(const QRect &globalRect);
bool contentOverlapped(QWidget *w, QPaintEvent *e) { bool contentOverlapped(QWidget *w, QPaintEvent *e) {
@ -225,7 +225,7 @@ private:
QPixmap grabInner(); QPixmap grabInner();
void placeSmallCounter(QImage &img, int size, int count, const style::color &bg, const QPoint &shift, const style::color &color); void placeSmallCounter(QImage &img, int size, int count, const style::color &bg, const QPoint &shift, const style::color &color) override;
QImage icon16, icon32, icon64, iconbig16, iconbig32, iconbig64; QImage icon16, icon32, icon64, iconbig16, iconbig32, iconbig64;
typedef QPair<QString, MTPMessageMedia> DelayedServiceMsg; typedef QPair<QString, MTPMessageMedia> DelayedServiceMsg;

View File

@ -28,6 +28,14 @@ namespace Notifications {
inline void defaultNotificationShown(QWidget *widget) { inline void defaultNotificationShown(QWidget *widget) {
} }
inline bool skipAudio() {
return false;
}
inline bool skipToast() {
return false;
}
class Manager : public Window::Notifications::NativeManager { class Manager : public Window::Notifications::NativeManager {
public: public:
Manager(); Manager();

View File

@ -25,7 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "historywidget.h" #include "historywidget.h"
#include "localstorage.h" #include "localstorage.h"
#include "window/notifications_manager_default.h" #include "window/notifications_manager_default.h"
#include "platform/mac/notifications_manager_mac.h" #include "platform/platform_notifications_manager.h"
#include "boxes/contactsbox.h" #include "boxes/contactsbox.h"
#include "boxes/aboutbox.h" #include "boxes/aboutbox.h"
@ -189,11 +189,6 @@ void MainWindow::psUpdateCounter() {
} }
} }
void MainWindow::psInitFrameless() {
psUpdatedPositionTimer.setSingleShot(true);
connect(&psUpdatedPositionTimer, SIGNAL(timeout()), this, SLOT(psSavePosition()));
}
void MainWindow::psFirstShow() { void MainWindow::psFirstShow() {
psUpdateMargins(); psUpdateMargins();
@ -258,7 +253,7 @@ void MainWindow::createGlobalMenu() {
if (!App::self()) return; if (!App::self()) return;
Ui::showLayer(new ContactsBox()); Ui::showLayer(new ContactsBox());
}, SLOT(action())); }), SLOT(action()));
psAddContact = window->addAction(lang(lng_mac_menu_add_contact), App::wnd(), SLOT(onShowAddContact())); psAddContact = window->addAction(lang(lng_mac_menu_add_contact), App::wnd(), SLOT(onShowAddContact()));
window->addSeparator(); window->addSeparator();
psNewGroup = window->addAction(lang(lng_mac_menu_new_group), App::wnd(), SLOT(onShowNewGroup())); psNewGroup = window->addAction(lang(lng_mac_menu_new_group), App::wnd(), SLOT(onShowNewGroup()));

View File

@ -25,6 +25,14 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
namespace Platform { namespace Platform {
namespace Notifications { namespace Notifications {
inline bool skipAudio() {
return false;
}
inline bool skipToast() {
return false;
}
class Manager : public Window::Notifications::NativeManager { class Manager : public Window::Notifications::NativeManager {
public: public:
Manager(); Manager();

View File

@ -27,7 +27,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#else // Q_OS_WIN #else // Q_OS_WIN
namespace Platform { namespace Platform {
inline Window::TitleWidget *CreateTitleWidget() { inline Window::TitleWidget *CreateTitleWidget(QWidget *parent) {
return nullptr; return nullptr;
} }

View File

@ -31,8 +31,8 @@ TitleWidget::TitleWidget(QWidget *parent) : Window::TitleWidget(parent)
, _minimize(this, st::titleButtonMinimize) , _minimize(this, st::titleButtonMinimize)
, _maximizeRestore(this, st::titleButtonMaximize) , _maximizeRestore(this, st::titleButtonMaximize)
, _close(this, st::titleButtonClose) , _close(this, st::titleButtonClose)
, _maximized(parent->window()->windowState() & Qt::WindowMaximized) , _shadow(this, st::titleShadow)
, _shadow(this, st::titleShadow) { , _maximized(parent->window()->windowState() & Qt::WindowMaximized) {
_minimize->setClickedCallback([this]() { _minimize->setClickedCallback([this]() {
window()->setWindowState(Qt::WindowMinimized); window()->setWindowState(Qt::WindowMinimized);
_minimize->clearState(); _minimize->clearState();