Add the "Close Tabs" feature
Also made notebooks open a container if no tabs are loaded Fixes #166
This commit is contained in:
@@ -14,9 +14,10 @@
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
NotebookTab::NotebookTab(Notebook *_notebook, const std::string &settingPrefix)
|
||||
NotebookTab::NotebookTab(Notebook *_notebook, const std::string &_uuid)
|
||||
: BaseWidget(_notebook)
|
||||
, settingRoot(fS("{}/tab", settingPrefix))
|
||||
, uuid(_uuid)
|
||||
, settingRoot(fS("/containers/{}/tab", this->uuid))
|
||||
, positionChangedAnimation(this, "pos")
|
||||
, notebook(_notebook)
|
||||
, title(fS("{}/title", this->settingRoot), "")
|
||||
|
||||
@@ -21,10 +21,11 @@ class NotebookTab : public BaseWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
std::string settingRoot;
|
||||
const std::string uuid;
|
||||
const std::string settingRoot;
|
||||
|
||||
public:
|
||||
explicit NotebookTab(Notebook *_notebook, const std::string &settingPrefix);
|
||||
explicit NotebookTab(Notebook *_notebook, const std::string &_uuid);
|
||||
|
||||
void calcSize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user