Changeset View
Changeset View
Standalone View
Standalone View
src/Application.cpp
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Line(s) | 178 | { | |||
---|---|---|---|---|---|
179 | MainWindow *window = newMainWindow(); | 179 | MainWindow *window = newMainWindow(); | ||
180 | window->createSession(profile, directory); | 180 | window->createSession(profile, directory); | ||
181 | finalizeNewMainWindow(window); | 181 | finalizeNewMainWindow(window); | ||
182 | } | 182 | } | ||
183 | 183 | | |||
184 | void Application::detachView(Session *session) | 184 | void Application::detachView(Session *session) | ||
185 | { | 185 | { | ||
186 | MainWindow *window = newMainWindow(); | 186 | MainWindow *window = newMainWindow(); | ||
187 | window->createView(session); | 187 | window->viewManager()->createView(session); | ||
188 | 188 | | |||
189 | // When detaching a view, the size of the new window should equal the | 189 | // When detaching a view, the size of the new window should equal the | ||
190 | // size of the source window | 190 | // size of the source window | ||
191 | Session *newsession = window->viewManager()->activeViewController()->session(); | 191 | Session *newsession = window->viewManager()->activeViewController()->session(); | ||
192 | newsession->setSize(session->size()); | 192 | newsession->setSize(session->size()); | ||
193 | window->adjustSize(); | 193 | window->adjustSize(); | ||
194 | // Since user is dragging and dropping, move dnd window to where | 194 | // Since user is dragging and dropping, move dnd window to where | ||
195 | // the user has the cursor (correct multiple monitor setups). | 195 | // the user has the cursor (correct multiple monitor setups). | ||
▲ Show 20 Lines • Show All 229 Lines • ▼ Show 20 Line(s) | 424 | if (m_parser->isSet(QStringLiteral("fullscreen"))) { | |||
425 | window->viewFullScreen(true); | 425 | window->viewFullScreen(true); | ||
426 | } | 426 | } | ||
427 | 427 | | |||
428 | // override default tabbbar visibility | 428 | // override default tabbbar visibility | ||
429 | // FIXME: remove those magic number | 429 | // FIXME: remove those magic number | ||
430 | // see ViewContainer::NavigationVisibility | 430 | // see ViewContainer::NavigationVisibility | ||
431 | if (m_parser->isSet(QStringLiteral("show-tabbar"))) { | 431 | if (m_parser->isSet(QStringLiteral("show-tabbar"))) { | ||
432 | // always show | 432 | // always show | ||
433 | window->setNavigationVisibility(0); | 433 | window->viewManager()->setNavigationVisibility(0); | ||
434 | } | 434 | } | ||
435 | if (m_parser->isSet(QStringLiteral("hide-tabbar"))) { | 435 | if (m_parser->isSet(QStringLiteral("hide-tabbar"))) { | ||
436 | // never show | 436 | // never show | ||
437 | window->setNavigationVisibility(2); | 437 | window->viewManager()->setNavigationVisibility(2); | ||
438 | } | 438 | } | ||
439 | } | 439 | } | ||
440 | return window; | 440 | return window; | ||
441 | } | 441 | } | ||
442 | 442 | | |||
443 | // Loads a profile. | 443 | // Loads a profile. | ||
444 | // If --profile <name> is given, loads profile <name>. | 444 | // If --profile <name> is given, loads profile <name>. | ||
445 | // If --fallback-profile is given, loads profile FALLBACK/. | 445 | // If --fallback-profile is given, loads profile FALLBACK/. | ||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |