Changeset View
Changeset View
Standalone View
Standalone View
src/Session.cpp
Show First 20 Lines • Show All 1480 Lines • ▼ Show 20 Line(s) | |||||
1481 | { | 1481 | { | ||
1482 | return _shellProcess->pid(); | 1482 | return _shellProcess->pid(); | ||
1483 | } | 1483 | } | ||
1484 | 1484 | | |||
1485 | void Session::setTitle(int role , const QString& title) | 1485 | void Session::setTitle(int role , const QString& title) | ||
1486 | { | 1486 | { | ||
1487 | switch (role) { | 1487 | switch (role) { | ||
1488 | case 0: | 1488 | case 0: | ||
1489 | this->setTitle(Session::NameRole, title); | 1489 | setTitle(Session::NameRole, title); | ||
1490 | break; | 1490 | break; | ||
1491 | case 1: | 1491 | case 1: | ||
1492 | this->setTitle(Session::DisplayedTitleRole, title); | 1492 | setTitle(Session::DisplayedTitleRole, title); | ||
1493 | 1493 | | |||
1494 | // without these, that title will be overridden by the expansion of | 1494 | // without these, that title will be overridden by the expansion of | ||
1495 | // title format shortly after, which will confuses users. | 1495 | // title format shortly after, which will confuses users. | ||
1496 | _localTabTitleFormat = title; | 1496 | _localTabTitleFormat = title; | ||
1497 | _remoteTabTitleFormat = title; | 1497 | _remoteTabTitleFormat = title; | ||
1498 | 1498 | | |||
1499 | break; | 1499 | break; | ||
1500 | } | 1500 | } | ||
1501 | } | 1501 | } | ||
1502 | 1502 | | |||
1503 | QString Session::title(int role) const | 1503 | QString Session::title(int role) const | ||
1504 | { | 1504 | { | ||
1505 | switch (role) { | 1505 | switch (role) { | ||
1506 | case 0: | 1506 | case 0: | ||
1507 | return this->title(Session::NameRole); | 1507 | return title(Session::NameRole); | ||
1508 | case 1: | 1508 | case 1: | ||
1509 | return this->title(Session::DisplayedTitleRole); | 1509 | return title(Session::DisplayedTitleRole); | ||
1510 | default: | 1510 | default: | ||
1511 | return QString(); | 1511 | return QString(); | ||
1512 | } | 1512 | } | ||
1513 | } | 1513 | } | ||
1514 | 1514 | | |||
1515 | void Session::setTabTitleFormat(int context , const QString& format) | 1515 | void Session::setTabTitleFormat(int context , const QString& format) | ||
1516 | { | 1516 | { | ||
1517 | switch (context) { | 1517 | switch (context) { | ||
1518 | case 0: | 1518 | case 0: | ||
1519 | this->setTabTitleFormat(Session::LocalTabTitle, format); | 1519 | setTabTitleFormat(Session::LocalTabTitle, format); | ||
1520 | break; | 1520 | break; | ||
1521 | case 1: | 1521 | case 1: | ||
1522 | this->setTabTitleFormat(Session::RemoteTabTitle, format); | 1522 | setTabTitleFormat(Session::RemoteTabTitle, format); | ||
1523 | break; | 1523 | break; | ||
1524 | } | 1524 | } | ||
1525 | } | 1525 | } | ||
1526 | 1526 | | |||
1527 | QString Session::tabTitleFormat(int context) const | 1527 | QString Session::tabTitleFormat(int context) const | ||
1528 | { | 1528 | { | ||
1529 | switch (context) { | 1529 | switch (context) { | ||
1530 | case 0: | 1530 | case 0: | ||
1531 | return this->tabTitleFormat(Session::LocalTabTitle); | 1531 | return tabTitleFormat(Session::LocalTabTitle); | ||
1532 | case 1: | 1532 | case 1: | ||
1533 | return this->tabTitleFormat(Session::RemoteTabTitle); | 1533 | return tabTitleFormat(Session::RemoteTabTitle); | ||
1534 | default: | 1534 | default: | ||
1535 | return QString(); | 1535 | return QString(); | ||
1536 | } | 1536 | } | ||
1537 | } | 1537 | } | ||
1538 | 1538 | | |||
1539 | void Session::setHistorySize(int lines) | 1539 | void Session::setHistorySize(int lines) | ||
1540 | { | 1540 | { | ||
1541 | if (isReadOnly()) { | 1541 | if (isReadOnly()) { | ||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |