void TabsPropsManager::HandlePreferredWindowIndex (const IHookProxy_ptr& proxy, const QWidget*) { if (PreferredWindowsQueue_.empty ()) return; proxy->SetReturnValue (PreferredWindowsQueue_.takeFirst ()); proxy->CancelDefault (); }
void Plugin::hookTabSetText (IHookProxy_ptr proxy, int index, int windowId) { auto window = Proxy_->GetRootWindowsManager ()->GetMainWindow (windowId); if (!window) return; auto tw = Proxy_->GetRootWindowsManager ()->GetTabWidget (windowId); if (!tw) return; int realIndex = tw->TabData (index).toInt (); if (Window2PinTabsIndex2TabData_.contains (window) && Window2PinTabsIndex2TabData_ [window].contains (realIndex)) proxy->CancelDefault (); }
void Plugin::hookGonnaHandleSmiles (IHookProxy_ptr proxy, QString body, QString) { if (ConvScriptPath_.isEmpty ()) return; if (!XmlSettingsManager::Instance () .property ("OnDisplayRendering").toBool ()) return; if (!body.contains ("$$")) return; proxy->CancelDefault (); }
void FileScheme::hookNAMCreateRequest (IHookProxy_ptr proxy, QNetworkAccessManager*, QNetworkAccessManager::Operation *op, QIODevice**) { if (*op != QNetworkAccessManager::GetOperation) return; const QNetworkRequest& req = proxy->GetValue ("request").value<QNetworkRequest> (); const QUrl& url = req.url (); if (url.scheme () != "file" || !QFileInfo (url.toLocalFile ()).isDir ()) return; proxy->CancelDefault (); proxy->SetReturnValue (QVariant::fromValue<QNetworkReply*> (new SchemeReply (req, this))); }
void Plugin::hookTrayIconVisibilityChanged (IHookProxy_ptr proxy, QSystemTrayIcon*, bool) { proxy->CancelDefault (); }
void Plugin::HandleMsgOccurence (IHookProxy_ptr proxy, QObject *message) { IMessage *msg = qobject_cast<IMessage*> (message); if (IsEntryIgnored (msg->OtherPart ())) proxy->CancelDefault (); }
void Plugin::hookDnDEntry2Entry (IHookProxy_ptr proxy, QObject *source, QObject *target) { if (Core::Instance ().HandleDnDEntry2Entry (source, target)) proxy->CancelDefault (); }
void Plugin::hookAddingCLEntryBegin (IHookProxy_ptr proxy, QObject *entry) { if (Core::Instance ().HandleRealEntryAddBegin (entry)) proxy->CancelDefault (); }
void Plugin::hookDockBarWillBeShown (IHookProxy_ptr proxy, QMainWindow*, QToolBar*, Qt::DockWidgetArea) { proxy->CancelDefault (); }
void Plugin::hookDockWidgetActionVisToggled (IHookProxy_ptr proxy, QMainWindow *win, QDockWidget *dw, bool visible) { proxy->CancelDefault (); }