Skip to content

Commit

Permalink
Updated patches/0150-psiplus-decorate-windows.diff. Disable mouse tra…
Browse files Browse the repository at this point in the history
…cking on psiwindowheader widget deletion
  • Loading branch information
Vitozz committed Sep 21, 2017
1 parent a5158a1 commit 0fa13c9
Showing 1 changed file with 49 additions and 47 deletions.
96 changes: 49 additions & 47 deletions patches/0150-psiplus-decorate-windows.diff
@@ -1,15 +1,15 @@
--- a/options/default.xml
+++ b/options/default.xml
@@ -483,6 +483,7 @@ QLineEdit#le_status_text {
--- git.orig/options/default.xml
+++ git/options/default.xml
@@ -488,6 +488,7 @@ QLineEdit#le_status_text {
</sounds>
<successful-subscription type="bool">true</successful-subscription>
</notifications>
+ <decorate-windows type="bool">true</decorate-windows>
<service-discovery>
<automatically-get-info type="bool">false</automatically-get-info>
<automatically-get-items type="bool">false</automatically-get-items>
--- a/src/groupchatdlg.cpp
+++ b/src/groupchatdlg.cpp
--- git.orig/src/groupchatdlg.cpp
+++ git/src/groupchatdlg.cpp
@@ -90,6 +90,7 @@
#include "pluginmanager.h"
#endif
Expand All @@ -32,7 +32,7 @@
public:
ChatEdit* mle() const { return dlg->ui_.mle->chatEdit(); }
ChatView* te_log() const { return dlg->ui_.log; }
@@ -693,6 +698,13 @@ GCMainDlg::GCMainDlg(PsiAccount *pa, const Jid &j, TabManager *tabManager)
@@ -693,6 +698,13 @@ GCMainDlg::GCMainDlg(PsiAccount *pa, con
#ifdef WEBKIT
ui_.log->setAccount(account());
#endif
Expand All @@ -46,7 +46,7 @@

connect(ui_.log, SIGNAL(showNM(QString)), this, SLOT(showNM(QString)));
connect(URLObject::getInstance(), SIGNAL(openURL(QString)), SLOT(openURL(QString)));
@@ -2330,6 +2342,25 @@ void GCMainDlg::resizeEvent(QResizeEvent *e)
@@ -2330,6 +2342,25 @@ void GCMainDlg::resizeEvent(QResizeEvent
QTimer::singleShot(0, this, SLOT(horizSplitterMoved()));
}

Expand All @@ -72,8 +72,8 @@
//----------------------------------------------------------------------------
// GCFindDlg
//----------------------------------------------------------------------------
--- a/src/groupchatdlg.h
+++ b/src/groupchatdlg.h
--- git.orig/src/groupchatdlg.h
+++ git/src/groupchatdlg.h
@@ -175,6 +175,8 @@ private:

inline XMPP::Jid jidForNick(const QString &nick) const;
Expand All @@ -83,8 +83,8 @@
};

class GCFindDlg : public QDialog
--- a/src/mainwin.cpp
+++ b/src/mainwin.cpp
--- git.orig/src/mainwin.cpp
+++ git/src/mainwin.cpp
@@ -130,6 +130,7 @@ public:
int tabsSize;
int rosterSize;
Expand All @@ -93,7 +93,7 @@

PopupAction* optionsButton, *statusButton;
IconActionGroup* statusGroup, *viewGroups;
@@ -528,6 +529,8 @@ MainWin::MainWin(bool _onTop, bool _asTool, PsiCon* psi)
@@ -528,6 +529,8 @@ MainWin::MainWin(bool _onTop, bool _asTo
connect(sp_ss, SIGNAL(triggered()), SLOT(avcallConfig()));*/
optionChanged("options.ui.contactlist.css");

Expand All @@ -102,7 +102,7 @@
reinitAutoHide();
}

@@ -566,6 +569,10 @@ void MainWin::optionChanged(const QString& option)
@@ -566,6 +569,10 @@ void MainWin::optionChanged(const QStrin
setStyleSheet(css);
}
}
Expand All @@ -121,7 +121,7 @@
}
}

@@ -1961,4 +1969,34 @@ void MainWin::resizeEvent(QResizeEvent *e)
@@ -1961,4 +1969,34 @@ void MainWin::resizeEvent(QResizeEvent *
}
}

Expand Down Expand Up @@ -156,8 +156,8 @@
+}
+
//#endif
--- a/src/mainwin.h
+++ b/src/mainwin.h
--- git.orig/src/mainwin.h
+++ git/src/mainwin.h
@@ -26,6 +26,7 @@
#include <QList>
#include <QString>
Expand All @@ -175,8 +175,8 @@

signals:
void statusChanged(XMPP::Status::Type);
--- a/src/options/opt_application.cpp
+++ b/src/options/opt_application.cpp
--- git.orig/src/options/opt_application.cpp
+++ git/src/options/opt_application.cpp
@@ -63,7 +63,9 @@ QWidget *OptionsTabApplication::widget()

w = new OptApplicationUI();
Expand All @@ -188,24 +188,24 @@
// docklet
d->ck_docklet->setWhatsThis(
tr("Makes Psi use a docklet icon, also known as system tray icon."));
@@ -111,6 +113,7 @@ void OptionsTabApplication::applyOptions()
@@ -111,6 +113,7 @@ void OptionsTabApplication::applyOptions
OptApplicationUI *d = (OptApplicationUI *)w;

PsiOptions::instance()->setOption("options.ui.contactlist.quit-on-close", d->ck_quitOnClose->isChecked());
+ PsiOptions::instance()->setOption("options.ui.decorate-windows", d->ck_winDecor->isChecked());

// Auto-update
PsiOptions::instance()->setOption("options.auto-update.check-on-startup", d->ck_autoUpdate->isChecked());
@@ -178,6 +181,7 @@ void OptionsTabApplication::restoreOptions()
@@ -178,6 +181,7 @@ void OptionsTabApplication::restoreOptio

d->ck_autoUpdate->setChecked(PsiOptions::instance()->getOption("options.auto-update.check-on-startup").toBool());
d->ck_quitOnClose->setChecked(PsiOptions::instance()->getOption("options.ui.contactlist.quit-on-close").toBool());
+ d->ck_winDecor->setChecked(PsiOptions::instance()->getOption("options.ui.decorate-windows").toBool());

// docklet
d->ck_docklet->setChecked( PsiOptions::instance()->getOption("options.ui.systemtray.enable").toBool() );
--- a/src/options/opt_application.ui
+++ b/src/options/opt_application.ui
--- git.orig/src/options/opt_application.ui
+++ git/src/options/opt_application.ui
@@ -21,6 +21,16 @@
</widget>
</item>
Expand All @@ -231,9 +231,9 @@
<tabstop>ck_docklet</tabstop>
<tabstop>ck_dockDCstyle</tabstop>
<tabstop>ck_dockHideMW</tabstop>
--- a/src/psichatdlg.cpp
+++ b/src/psichatdlg.cpp
@@ -182,6 +182,8 @@ PsiChatDlg::PsiChatDlg(const Jid& jid, PsiAccount* pa, TabManager* tabManager)
--- git.orig/src/psichatdlg.cpp
+++ git/src/psichatdlg.cpp
@@ -182,6 +182,8 @@ PsiChatDlg::PsiChatDlg(const Jid& jid, P
connect(account(), SIGNAL(removedContact(PsiContact*)), SLOT(updateContactAdding(PsiContact*)));
connect(account(), SIGNAL(updateContact(const Jid &)), SLOT(updateContactAdding(const Jid &)));
mCmdManager_.registerProvider(new ChatDlgMCmdProvider(this));
Expand Down Expand Up @@ -301,8 +301,8 @@
+}
+
#include "psichatdlg.moc"
--- a/src/psichatdlg.h
+++ b/src/psichatdlg.h
--- git.orig/src/psichatdlg.h
+++ git/src/psichatdlg.h
@@ -10,6 +10,7 @@

#include "ui_chatdlg.h"
Expand All @@ -328,9 +328,9 @@
};

#endif
--- a/src/tabs/tabdlg.cpp
+++ b/src/tabs/tabdlg.cpp
@@ -167,9 +167,19 @@ TabDlg::TabDlg(TabManager* tabManager, const QString& geometryOption, TabDlgDele
--- git.orig/src/tabs/tabdlg.cpp
+++ git/src/tabs/tabdlg.cpp
@@ -167,9 +167,19 @@ TabDlg::TabDlg(TabManager* tabManager, c
delegate_->tabWidgetCreated(this, tabWidget_);

QVBoxLayout *vert1 = new QVBoxLayout(this);
Expand All @@ -351,16 +351,16 @@
setAcceptDrops(true);

X11WM_CLASS("tabs");
@@ -189,6 +199,7 @@ TabDlg::TabDlg(TabManager* tabManager, const QString& geometryOption, TabDlgDele
@@ -189,6 +199,7 @@ TabDlg::TabDlg(TabManager* tabManager, c

if(!PsiOptions::instance()->getOption("options.ui.tabs.grouping").toString().contains('A'))
setGeometryOptionPath(geometryOption);
+ setWindowBorder(PsiOptions::instance()->getOption("options.ui.decorate-windows").toBool());
}

TabDlg::~TabDlg()
--- a/src/tabs/tabdlg.h
+++ b/src/tabs/tabdlg.h
--- git.orig/src/tabs/tabdlg.h
+++ git/src/tabs/tabdlg.h
@@ -29,6 +29,7 @@
#include "advwidget.h"

Expand All @@ -377,9 +377,9 @@
};

#endif
--- a/src/tools/advwidget/advwidget.cpp
+++ b/src/tools/advwidget/advwidget.cpp
@@ -417,7 +417,11 @@ bool GAdvancedWidget::Private::eventFilter(QObject* obj, QEvent* e)
--- git.orig/src/tools/advwidget/advwidget.cpp
+++ git/src/tools/advwidget/advwidget.cpp
@@ -363,7 +363,11 @@ bool GAdvancedWidget::Private::eventFilt
}
saveGeometryTimer_->start();
}
Expand All @@ -392,8 +392,8 @@
return false;
}

--- a/src/tools/advwidget/advwidget.h
+++ b/src/tools/advwidget/advwidget.h
--- git.orig/src/tools/advwidget/advwidget.h
+++ git/src/tools/advwidget/advwidget.h
@@ -1,6 +1,6 @@
/*
* advwidget.h - AdvancedWidget template class
Expand Down Expand Up @@ -728,9 +728,9 @@
};

#endif
--- /dev/null
+++ b/src/widgets/psiwindowheader.cpp
@@ -0,0 +1,263 @@
--- git.orig/src/widgets/psiwindowheader.cpp
+++ git/src/widgets/psiwindowheader.cpp
@@ -0,0 +1,265 @@
+/*
+ * psiwindowheader.cpp
+ * Copyright (C) 2010-2017 Evgeny Khryukin, Vitaly Tonkacheyev
Expand Down Expand Up @@ -783,6 +783,8 @@
+
+PsiWindowHeader::~PsiWindowHeader()
+{
+ //Disable mouse tracking on widget deletion
+ enableMouseTracking(false);
+}
+
+void PsiWindowHeader::hidePressed()
Expand Down Expand Up @@ -994,8 +996,8 @@
+ w->setMouseTracking(enabled);
+ }
+}
--- /dev/null
+++ b/src/widgets/psiwindowheader.h
--- git.orig/src/widgets/psiwindowheader.h
+++ git/src/widgets/psiwindowheader.h
@@ -0,0 +1,66 @@
+/*
+ * psiwindowheader.cpp
Expand Down Expand Up @@ -1063,8 +1065,8 @@
+};
+
+#endif // PSIWINDOWHEADER_H
--- /dev/null
+++ b/src/widgets/psiwindowheader.ui
--- git.orig/src/widgets/psiwindowheader.ui
+++ git/src/widgets/psiwindowheader.ui
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
Expand Down Expand Up @@ -1186,8 +1188,8 @@
+ <resources/>
+ <connections/>
+</ui>
--- a/src/widgets/widgets.pri
+++ b/src/widgets/widgets.pri
--- git.orig/src/widgets/widgets.pri
+++ git/src/widgets/widgets.pri
@@ -16,6 +16,7 @@ SOURCES += \
$$PWD/psitiplabel.cpp \
$$PWD/psitabwidget.cpp \
Expand Down

0 comments on commit 0fa13c9

Please sign in to comment.