Display tool tips for browser tabs with the page title.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@504 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
committed by
Alexandre Deckner
parent
402459960e
commit
af7e6dd1a4
@@ -43,6 +43,7 @@ public:
|
||||
virtual void DoubleClickOutsideTabs() = 0;
|
||||
virtual void UpdateTabScrollability(bool canScrollLeft,
|
||||
bool canScrollRight) = 0;
|
||||
virtual void SetToolTip(const BString& text) = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
@@ -307,6 +307,17 @@ public:
|
||||
fTabContainerGroup->EnableScrollButtons(canScrollLeft, canScrollRight);
|
||||
}
|
||||
|
||||
virtual void SetToolTip(const BString& text)
|
||||
{
|
||||
if (fCurrentToolTip == text)
|
||||
return;
|
||||
fCurrentToolTip = text;
|
||||
fManager->GetTabContainerView()->HideToolTip();
|
||||
fManager->GetTabContainerView()->SetToolTip(
|
||||
reinterpret_cast<BToolTip*>(NULL));
|
||||
fManager->GetTabContainerView()->SetToolTip(fCurrentToolTip.String());
|
||||
}
|
||||
|
||||
void CloseTab(int32 index);
|
||||
|
||||
void SetCloseButtonsAvailable(bool available)
|
||||
@@ -333,6 +344,7 @@ private:
|
||||
bool fCloseButtonsAvailable;
|
||||
BMessage* fDoubleClickOutsideTabsMessage;
|
||||
BMessenger fTarget;
|
||||
BString fCurrentToolTip;
|
||||
};
|
||||
|
||||
|
||||
@@ -502,6 +514,8 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
|
||||
}
|
||||
}
|
||||
|
||||
fController->SetToolTip(Label());
|
||||
|
||||
TabView::MouseMoved(where, transit, dragMessage);
|
||||
}
|
||||
|
||||
@@ -695,6 +709,13 @@ TabManager::TabGroup() const
|
||||
}
|
||||
|
||||
|
||||
BView*
|
||||
TabManager::GetTabContainerView() const
|
||||
{
|
||||
return fTabContainerView;
|
||||
}
|
||||
|
||||
|
||||
BView*
|
||||
TabManager::ContainerView() const
|
||||
{
|
||||
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
#endif
|
||||
|
||||
BView* TabGroup() const;
|
||||
BView* GetTabContainerView() const;
|
||||
BView* ContainerView() const;
|
||||
|
||||
BView* ViewForTab(int32 tabIndex) const;
|
||||
|
||||
Reference in New Issue
Block a user