show page information in window title; refs #166
This commit is contained in:
@@ -658,6 +658,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
->url().toString());
|
||||
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0);
|
||||
}
|
||||
resetWindowTitle();
|
||||
activateTab();
|
||||
}
|
||||
|
||||
@@ -976,6 +977,23 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
TRC; LOG<<text;
|
||||
_tabs->setTabText(_tabs->indexOf(qobject_cast<QWidget*>(sender())),
|
||||
trUtf8("%1").arg(text));
|
||||
resetWindowTitle();
|
||||
}
|
||||
|
||||
void resetWindowTitle() {
|
||||
if (qobject_cast<QWebView*>(_tabs->currentWidget()))
|
||||
setWindowTitle(trUtf8("[%1] - %2 - SwissBrowser (%3)",
|
||||
"main window title "
|
||||
"%1 = host name "
|
||||
"%2 = page title "
|
||||
"%3 = number of open tabs")
|
||||
.arg((qobject_cast<QWebView*>(_tabs->currentWidget())
|
||||
->url().host()))
|
||||
.arg((qobject_cast<QWebView*>(_tabs->currentWidget())
|
||||
->title()))
|
||||
.arg(_tabs->count()));
|
||||
else
|
||||
setWindowTitle(trUtf8("SwissBrowser", "window title with no tab"));
|
||||
}
|
||||
|
||||
void statusBarMessage(const QString& text) {
|
||||
|
@@ -403,6 +403,16 @@ qt-%5 (%6)
|
||||
openssl-%7 (%9) %10</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>[%1] - %2 - SwissBrowser (%3)</source>
|
||||
<comment>main window title %1 = host name %2 = page title %3 = number of open tabs</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SwissBrowser</source>
|
||||
<comment>window title with no tab</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Certificate</name>
|
||||
@@ -579,10 +589,6 @@ openssl-%7 (%9) %10</source>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><strong>Unknown network error (code: %1).</string></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -591,6 +597,10 @@ openssl-%7 (%9) %10</source>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditBookmarks</name>
|
||||
|
@@ -403,6 +403,16 @@ qt-%5 (%6)
|
||||
openssl-%7 (%9) %10</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>[%1] - %2 - SwissBrowser (%3)</source>
|
||||
<comment>main window title %1 = host name %2 = page title %3 = number of open tabs</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SwissBrowser</source>
|
||||
<comment>window title with no tab</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Certificate</name>
|
||||
@@ -579,10 +589,6 @@ openssl-%7 (%9) %10</source>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><strong>Unknown network error (code: %1).</string></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -591,6 +597,10 @@ openssl-%7 (%9) %10</source>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditBookmarks</name>
|
||||
|
@@ -403,6 +403,16 @@ qt-%5 (%6)
|
||||
openssl-%7 (%9) %10</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>[%1] - %2 - SwissBrowser (%3)</source>
|
||||
<comment>main window title %1 = host name %2 = page title %3 = number of open tabs</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SwissBrowser</source>
|
||||
<comment>window title with no tab</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Certificate</name>
|
||||
@@ -579,10 +589,6 @@ openssl-%7 (%9) %10</source>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><strong>Unknown network error (code: %1).</string></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -591,6 +597,10 @@ openssl-%7 (%9) %10</source>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditBookmarks</name>
|
||||
|
@@ -403,6 +403,16 @@ qt-%5 (%6)
|
||||
openssl-%7 (%9) %10</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>[%1] - %2 - SwissBrowser (%3)</source>
|
||||
<comment>main window title %1 = host name %2 = page title %3 = number of open tabs</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SwissBrowser</source>
|
||||
<comment>window title with no tab</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Certificate</name>
|
||||
@@ -579,10 +589,6 @@ openssl-%7 (%9) %10</source>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><strong>Unknown network error (code: %1).</string></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
@@ -591,6 +597,10 @@ openssl-%7 (%9) %10</source>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditBookmarks</name>
|
||||
|
Reference in New Issue
Block a user