Don't show "Show menubar" action on Mac OS. Closes #129

- "SuperMenu" button won't be visible on Mac too
   * there is no need to show it as Menu will always be visible
- also made little improvement in Mac theme
- updated Portuguese translation
remotes/origin/falkon
nowrep 14 years ago
parent 00f6262afc
commit 79caefb8aa
  1. BIN
      bin/locale/pt_PT.qm
  2. 6
      bin/themes/mac/main.css
  3. 77
      src/app/qupzilla.cpp
  4. 4
      src/app/qupzilla.h
  5. 4
      src/navigation/locationbar.cpp
  6. 9
      src/network/qupzillaschemehandler.cpp
  7. 2
      src/plugins/webpluginfactory.cpp
  8. 20
      translations/pt_PT.ts

Binary file not shown.

@ -116,8 +116,7 @@
border-width:4;
color:black;
padding-left: 35px;
padding-bottom: 1px;
padding-top: 0px;
padding-top: -2px;
qproperty-fixedheight: 23;
}
@ -194,8 +193,7 @@
border-image: url(images/lineedit-bg.png);
border-width: 4;
padding-left: 35px;
padding-bottom: 1px;
padding-top: 0px;
padding-top: -2px;
color:black;
qproperty-fixedheight: 23;
}

@ -189,14 +189,11 @@ void QupZilla::postLaunch()
}
}
if (m_tabWidget->getTabBar()->normalTabsCount() <= 0 &&
m_startBehaviour != Qz::BW_OtherRestoredWindow) {
if (m_tabWidget->getTabBar()->normalTabsCount() <= 0 && m_startBehaviour != Qz::BW_OtherRestoredWindow) {
//Something went really wrong .. add one tab
m_tabWidget->addView(m_homepage);
}
aboutToShowHistoryMenu(false);
aboutToHideHistoryMenu();
aboutToShowBookmarksMenu();
setUpdatesEnabled(true);
@ -330,9 +327,6 @@ void QupZilla::setupMenu()
m_menuTools = new QMenu(tr("&Tools"));
m_menuHelp = new QMenu(tr("&Help"));
m_menuBookmarks = new Menu(tr("&Bookmarks"));
m_menuHistory = new Menu(tr("Hi&story"));
connect(m_menuHistory, SIGNAL(aboutToShow()), this, SLOT(aboutToShowHistoryMenu()));
connect(m_menuHistory, SIGNAL(aboutToHide()), this, SLOT(aboutToHideHistoryMenu()));
connect(m_menuBookmarks, SIGNAL(aboutToShow()), this, SLOT(aboutToShowBookmarksMenu()));
connect(m_menuBookmarks, SIGNAL(menuMiddleClicked(Menu*)), this, SLOT(loadFolderBookmarks(Menu*)));
connect(m_menuHelp, SIGNAL(aboutToShow()), this, SLOT(aboutToShowHelpMenu()));
@ -393,9 +387,11 @@ void QupZilla::setupMenu()
m_actionShowStatusbar = new QAction(tr("Sta&tus Bar"), this);
m_actionShowStatusbar->setCheckable(true);
connect(m_actionShowStatusbar, SIGNAL(triggered(bool)), this, SLOT(showStatusbar()));
#ifndef Q_WS_MAC
m_actionShowMenubar = new QAction(tr("&Menu Bar"), this);
m_actionShowMenubar->setCheckable(true);
connect(m_actionShowMenubar, SIGNAL(triggered(bool)), this, SLOT(showMenubar()));
#endif
m_actionShowFullScreen = new QAction(tr("&Fullscreen"), this);
m_actionShowFullScreen->setCheckable(true);
m_actionShowFullScreen->setShortcut(QKeySequence("F11"));
@ -421,7 +417,9 @@ void QupZilla::setupMenu()
connect(m_actionShowHistorySideBar, SIGNAL(triggered()), this, SLOT(showHistorySideBar()));
QMenu* toolbarsMenu = new QMenu(tr("Toolbars"));
#ifndef Q_WS_MAC
toolbarsMenu->addAction(m_actionShowMenubar);
#endif
toolbarsMenu->addAction(m_actionShowToolbar);
toolbarsMenu->addAction(m_actionShowBookmarksToolbar);
QMenu* sidebarsMenu = new QMenu(tr("Sidebars"));
@ -447,12 +445,14 @@ void QupZilla::setupMenu()
connect(m_menuView, SIGNAL(aboutToShow()), this, SLOT(aboutToShowViewMenu()));
connect(m_menuView, SIGNAL(aboutToHide()), this, SLOT(aboutToHideViewMenu()));
menuBar()->addMenu(m_menuHistory);
menuBar()->addMenu(m_menuBookmarks);
menuBar()->addMenu(m_menuTools);
menuBar()->addMenu(m_menuHelp);
menuBar()->setContextMenuPolicy(Qt::CustomContextMenu);
m_menuHistory = new Menu(tr("Hi&story"));
m_menuHistory->addAction(IconProvider::standardIcon(QStyle::SP_ArrowBack), tr("&Back"), this, SLOT(goBack()))->setShortcut(QKeySequence("Ctrl+Left"));
m_menuHistory->addAction(IconProvider::standardIcon(QStyle::SP_ArrowForward), tr("&Forward"), this, SLOT(goNext()))->setShortcut(QKeySequence("Ctrl+Right"));
m_menuHistory->addAction(IconProvider::fromTheme("go-home"), tr("&Home"), this, SLOT(goHome()))->setShortcut(QKeySequence("Alt+Home"));
m_menuHistory->addAction(QIcon(":/icons/menu/history.png"), tr("Show &All History"), this, SLOT(showHistoryManager()))->setShortcut(QKeySequence("Ctrl+Shift+H"));
m_menuHistory->addSeparator();
connect(m_menuHistory, SIGNAL(aboutToShow()), this, SLOT(aboutToShowHistoryMenu()));
connect(m_menuHistory, SIGNAL(aboutToHide()), this, SLOT(aboutToHideHistoryMenu()));
m_menuClosedTabs = new QMenu(tr("Closed Tabs"));
connect(m_menuClosedTabs, SIGNAL(aboutToShow()), this, SLOT(aboutToShowClosedTabsMenu()));
@ -463,6 +463,17 @@ void QupZilla::setupMenu()
m_menuHistoryMost = new Menu(tr("Most Visited"), m_menuHistory);
connect(m_menuHistoryMost, SIGNAL(aboutToShow()), this, SLOT(aboutToShowHistoryMostMenu()));
m_menuHistory->addMenu(m_menuHistoryRecent);
m_menuHistory->addMenu(m_menuHistoryMost);
m_menuHistory->addMenu(m_menuClosedTabs);
menuBar()->addMenu(m_menuHistory);
menuBar()->addMenu(m_menuBookmarks);
menuBar()->addMenu(m_menuTools);
menuBar()->addMenu(m_menuHelp);
menuBar()->setContextMenuPolicy(Qt::CustomContextMenu);
aboutToShowToolsMenu();
aboutToShowHelpMenu();
@ -494,6 +505,7 @@ void QupZilla::setupMenu()
addAction(action);
}
#ifndef Q_WS_MAC
m_superMenu->addMenu(m_menuFile);
m_superMenu->addMenu(m_menuEdit);
m_superMenu->addMenu(m_menuView);
@ -501,6 +513,7 @@ void QupZilla::setupMenu()
m_superMenu->addMenu(m_menuBookmarks);
m_superMenu->addMenu(m_menuTools);
m_superMenu->addMenu(m_menuHelp);
#endif
}
void QupZilla::loadSettings()
@ -540,7 +553,9 @@ void QupZilla::loadSettings()
m_navigationBar->setVisible(showNavigationToolbar);
menuBar()->setVisible(showMenuBar);
#ifndef Q_WS_MAC
m_navigationBar->buttonSuperMenu()->setVisible(!showMenuBar);
#endif
m_navigationBar->buttonHome()->setVisible(showHomeIcon);
m_navigationBar->buttonBack()->setVisible(showBackForwardIcons);
m_navigationBar->buttonNext()->setVisible(showBackForwardIcons);
@ -734,48 +749,18 @@ void QupZilla::aboutToShowBookmarksMenu()
m_menuBookmarksAction->setVisible(m_bookmarksToolbar->isVisible());
}
void QupZilla::aboutToShowHistoryMenu(bool loadHistory)
void QupZilla::aboutToShowHistoryMenu()
{
if (!weView()) {
return;
}
if (!m_historyMenuChanged) {
if (!m_menuHistory || m_menuHistory->actions().count() < 3) {
return;
}
m_menuHistory->actions().at(0)->setEnabled(WebHistoryWrapper::canGoBack(weView()->history()));
m_menuHistory->actions().at(1)->setEnabled(WebHistoryWrapper::canGoForward(weView()->history()));
return;
}
m_historyMenuChanged = false;
if (!loadHistory) {
m_historyMenuChanged = true;
}
m_menuHistory->clear();
m_menuHistory->addAction(IconProvider::standardIcon(QStyle::SP_ArrowBack), tr("&Back"), this, SLOT(goBack()))->setShortcut(QKeySequence("Ctrl+Left"));
m_menuHistory->addAction(IconProvider::standardIcon(QStyle::SP_ArrowForward), tr("&Forward"), this, SLOT(goNext()))->setShortcut(QKeySequence("Ctrl+Right"));
m_menuHistory->addAction(IconProvider::fromTheme("go-home"), tr("&Home"), this, SLOT(goHome()))->setShortcut(QKeySequence("Alt+Home"));
m_menuHistory->actions().at(0)->setEnabled(WebHistoryWrapper::canGoBack(weView()->history()));
m_menuHistory->actions().at(1)->setEnabled(WebHistoryWrapper::canGoForward(weView()->history()));
m_menuHistory->addAction(QIcon(":/icons/menu/history.png"), tr("Show &All History"), this, SLOT(showHistoryManager()))->setShortcut(QKeySequence("Ctrl+Shift+H"));
m_menuHistory->addSeparator();
m_menuHistory->addMenu(m_menuHistoryRecent);
m_menuHistory->addMenu(m_menuHistoryMost);
m_menuHistory->addMenu(m_menuClosedTabs);
}
void QupZilla::aboutToHideHistoryMenu()
{
if (!m_menuHistory || m_menuHistory->actions().count() < 3) {
return;
}
m_menuHistory->actions().at(0)->setEnabled(true);
m_menuHistory->actions().at(1)->setEnabled(true);
}
@ -902,7 +887,9 @@ void QupZilla::aboutToShowViewMenu()
}
m_actionShowToolbar->setChecked(m_navigationBar->isVisible());
#ifndef Q_WS_MAC
m_actionShowMenubar->setChecked(menuBar()->isVisible());
#endif
m_actionShowStatusbar->setChecked(statusBar()->isVisible());
m_actionShowBookmarksToolbar->setChecked(m_bookmarksToolbar->isVisible());
@ -1260,6 +1247,7 @@ void QupZilla::showNavigationToolbar()
void QupZilla::showMenubar()
{
#ifndef Q_WS_MAC
if (!m_navigationBar->isVisible() && !m_actionShowMenubar->isChecked()) {
showNavigationToolbar();
}
@ -1269,6 +1257,7 @@ void QupZilla::showMenubar()
Settings settings;
settings.setValue("Browser-View-Settings/showMenubar", menuBar()->isVisible());
#endif
}
void QupZilla::showStatusbar()

@ -154,7 +154,7 @@ private slots:
void aboutToShowFileMenu();
void aboutToHideFileMenu();
void aboutToShowHistoryMenu(bool loadHistory = true);
void aboutToShowHistoryMenu();
void aboutToHideHistoryMenu();
void aboutToShowClosedTabsMenu();
void aboutToShowBookmarksMenu();
@ -251,7 +251,9 @@ private:
QAction* m_actionShowToolbar;
QAction* m_actionShowBookmarksToolbar;
QAction* m_actionShowStatusbar;
#ifndef Q_WS_MAC
QAction* m_actionShowMenubar;
#endif
QAction* m_actionShowFullScreen;
QAction* m_actionShowBookmarksSideBar;
QAction* m_actionShowHistorySideBar;

@ -350,6 +350,10 @@ void LocationBar::focusOutEvent(QFocusEvent* e)
setCursorPosition(0);
hideGoButton();
if (text().trimmed().isEmpty()) {
clear();
}
}
void LocationBar::mouseDoubleClickEvent(QMouseEvent* event)

@ -23,14 +23,9 @@
#include "speeddial.h"
#include "pluginproxy.h"
QString authorString(const QString &name, const QString &mail)
{
return QString("%1 &lt;<a href=\"mailto:%2\">%2</a>&gt;").arg(name, mail);
}
QString authorString(const char* name, const QString &mail)
{
return authorString(QString::fromUtf8(name), mail);
return QString("%1 &lt;<a href=\"mailto:%2\">%2</a>&gt;").arg(QString::fromUtf8(name), mail);
}
QupZillaSchemeHandler::QupZillaSchemeHandler()
@ -202,7 +197,7 @@ QString QupZillaSchemeReply::aboutPage()
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Plugins"), mApp->PLUGINSDIR) +
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Translations"), mApp->TRANSLATIONSDIR));
aPage.replace("%MAIN-DEVELOPER%", tr("Main developer"));
aPage.replace("%MAIN-DEVELOPER-TEXT%", authorString(QupZilla::AUTHOR, "nowrep@gmail.com"));
aPage.replace("%MAIN-DEVELOPER-TEXT%", authorString(QupZilla::AUTHOR.toUtf8(), "nowrep@gmail.com"));
aPage.replace("%CONTRIBUTORS%", tr("Contributors"));
aPage.replace("%CONTRIBUTORS-TEXT%",
authorString("Mladen Pejaković", "pejakm@gmail.com") + "<br/>" +

@ -99,7 +99,7 @@ QList<QWebPluginFactory::Plugin> WebPluginFactory::plugins() const
QWebPluginFactory::Plugin plugin;
QWebPluginFactory::MimeType mimeType;
mimeType.fileExtensions << QLatin1String("swf");
mimeType.fileExtensions << "swf";
mimeType.name = "application/x-shockwave-flash";
plugin.name = "ClickToFlashPlugin";

@ -597,7 +597,7 @@
<message>
<location filename="../src/bookmarks/bookmarksmanager.cpp" line="240"/>
<source>Open link in current &amp;tab</source>
<translation type="unfinished"></translation>
<translation>Abrir ligação no separador a&amp;tual</translation>
</message>
<message>
<location filename="../src/bookmarks/bookmarksmanager.cpp" line="241"/>
@ -684,7 +684,7 @@
<message>
<location filename="../src/sidebar/bookmarkssidebar.cpp" line="110"/>
<source>Open link in current &amp;tab</source>
<translation type="unfinished"></translation>
<translation>Abrir ligação no separador a&amp;tual</translation>
</message>
<message>
<location filename="../src/sidebar/bookmarkssidebar.cpp" line="111"/>
@ -977,7 +977,7 @@
<message>
<location filename="../src/other/clearprivatedata.ui" line="111"/>
<source>Earlier Today</source>
<translation type="unfinished"></translation>
<translation>Hoje</translation>
</message>
<message>
<source>Later Today</source>
@ -1526,7 +1526,7 @@ não foi encontrado!</translation>
<message>
<location filename="../src/history/historymanager.cpp" line="101"/>
<source>Open link in current tab</source>
<translation type="unfinished"></translation>
<translation>Abrir ligação no separador atual</translation>
</message>
<message>
<location filename="../src/history/historymanager.cpp" line="102"/>
@ -1663,7 +1663,7 @@ não foi encontrado!</translation>
<message>
<location filename="../src/sidebar/historysidebar.cpp" line="95"/>
<source>Open link in current tab</source>
<translation type="unfinished"></translation>
<translation>Abrir ligação no separador atual</translation>
</message>
<message>
<location filename="../src/sidebar/historysidebar.cpp" line="96"/>
@ -2337,7 +2337,7 @@ não foi encontrado!</translation>
<location filename="../src/preferences/preferences.ui" line="258"/>
<location filename="../src/preferences/preferences.ui" line="406"/>
<source>Use current</source>
<translation type="unfinished"></translation>
<translation>Utilizar atual</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="446"/>
@ -2357,7 +2357,7 @@ não foi encontrado!</translation>
<message>
<location filename="../src/preferences/preferences.ui" line="743"/>
<source>Open new tabs after active tab</source>
<translation type="unfinished"></translation>
<translation>Abrir separadores após o atual</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="780"/>
@ -3747,7 +3747,7 @@ Adicione as fontes com o ícone RSS existente na barra de navegação, nas pági
<message>
<location filename="../src/rss/rssmanager.cpp" line="234"/>
<source>Open link in current tab</source>
<translation type="unfinished"></translation>
<translation>Abrir ligação no separador atual</translation>
</message>
<message>
<source>Open link in actual tab</source>
@ -4928,12 +4928,12 @@ Após adicionar ou remover os caminhos dos certificados, tem que reiniciar o Qup
<message>
<location filename="../src/navigation/websearchbar.cpp" line="199"/>
<source>Paste And &amp;Search</source>
<translation type="unfinished"></translation>
<translation>Colar e pr&amp;ocurar</translation>
</message>
<message>
<location filename="../src/navigation/websearchbar.cpp" line="205"/>
<source>Clear All</source>
<translation type="unfinished">Apagar tudo</translation>
<translation>Apagar tudo</translation>
</message>
</context>
<context>

Loading…
Cancel
Save