diff --git a/bin/locale/cs_CZ.qm b/bin/locale/cs_CZ.qm index 2886a33a0..b5d3254bf 100644 Binary files a/bin/locale/cs_CZ.qm and b/bin/locale/cs_CZ.qm differ diff --git a/src/3rdparty/fancytabwidget.cpp b/src/3rdparty/fancytabwidget.cpp new file mode 100644 index 000000000..35cc975f0 --- /dev/null +++ b/src/3rdparty/fancytabwidget.cpp @@ -0,0 +1,714 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "fancytabwidget.h" +#include "stylehelper.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Core; +using namespace Internal; + +const int FancyTabBar::m_rounding = 22; +const int FancyTabBar::m_textPadding = 4; + +void FancyTabProxyStyle::drawControl( + ControlElement element, const QStyleOption* option, + QPainter* p, const QWidget* widget) const { + + const QStyleOptionTabV3* v_opt = qstyleoption_cast(option); + + if (element != CE_TabBarTab || !v_opt) { + QProxyStyle::drawControl(element, option, p, widget); + return; + } + + const QRect rect = v_opt->rect; + const bool selected = v_opt->state & State_Selected; + const bool vertical_tabs = v_opt->shape == QTabBar::RoundedWest; + const QString text = v_opt->text; + + if (selected) { + //background + p->save(); + QLinearGradient grad(rect.topLeft(), rect.topRight()); + grad.setColorAt(0, QColor(255, 255, 255, 140)); + grad.setColorAt(1, QColor(255, 255, 255, 210)); + p->fillRect(rect.adjusted(0, 0, 0, -1), grad); + p->restore(); + + //shadows + p->setPen(QColor(0, 0, 0, 110)); + p->drawLine(rect.topLeft() + QPoint(1,-1), rect.topRight() - QPoint(0,1)); + p->drawLine(rect.bottomLeft(), rect.bottomRight()); + p->setPen(QColor(0, 0, 0, 40)); + p->drawLine(rect.topLeft(), rect.bottomLeft()); + + //highlights + p->setPen(QColor(255, 255, 255, 50)); + p->drawLine(rect.topLeft() + QPoint(0, -2), rect.topRight() - QPoint(0,2)); + p->drawLine(rect.bottomLeft() + QPoint(0, 1), rect.bottomRight() + QPoint(0,1)); + p->setPen(QColor(255, 255, 255, 40)); + p->drawLine(rect.topLeft() + QPoint(0, 0), rect.topRight()); + p->drawLine(rect.topRight() + QPoint(0, 1), rect.bottomRight() - QPoint(0, 1)); + p->drawLine(rect.bottomLeft() + QPoint(0,-1), rect.bottomRight()-QPoint(0,1)); + } + + QTransform m; + if (vertical_tabs) { + m = QTransform::fromTranslate(rect.left(), rect.bottom()); + m.rotate(-90); + } else { + m = QTransform::fromTranslate(rect.left(), rect.top()); + } + + const QRect draw_rect(QPoint(0, 0), m.mapRect(rect).size()); + + p->save(); + p->setTransform(m); + + QRect icon_rect(QPoint(8, 0), v_opt->iconSize); + QRect text_rect(icon_rect.topRight() + QPoint(4, 0), draw_rect.size()); + text_rect.setRight(draw_rect.width()); + icon_rect.translate(0, (draw_rect.height() - icon_rect.height()) / 2); + + QFont boldFont(p->font()); + boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize()); + boldFont.setBold(true); + p->setFont(boldFont); + p->setPen(selected ? QColor(255, 255, 255, 160) : QColor(0, 0, 0, 110)); + int textFlags = Qt::AlignHCenter | Qt::AlignVCenter; + p->drawText(text_rect, textFlags, text); + p->setPen(selected ? QColor(60, 60, 60) : Utils::StyleHelper::panelTextColor()); +#ifndef Q_WS_MAC + if (widget) { + const QString fader_key = "tab_" + text + "_fader"; + const QString animation_key = "tab_" + text + "_animation"; + + const QString tab_hover = widget->property("tab_hover").toString(); + int fader = widget->property(fader_key.toUtf8().constData()).toInt(); + QPropertyAnimation* animation = widget->property(animation_key.toUtf8().constData()).value(); + + if (!animation) { + QWidget* mut_widget = const_cast(widget); + fader = 0; + mut_widget->setProperty(fader_key.toUtf8().constData(), fader); + animation = new QPropertyAnimation(mut_widget, fader_key.toUtf8(), mut_widget); + connect(animation, SIGNAL(valueChanged(QVariant)), mut_widget, SLOT(update())); + mut_widget->setProperty(animation_key.toUtf8().constData(), QVariant::fromValue(animation)); + } + + if (text == tab_hover) { + if (animation->state() != QAbstractAnimation::Running && fader != 40) { + animation->stop(); + animation->setDuration(80); + animation->setEndValue(40); + animation->start(); + } + } else { + if (animation->state() != QAbstractAnimation::Running && fader != 0) { + animation->stop(); + animation->setDuration(160); + animation->setEndValue(0); + animation->start(); + } + } + + if (!selected) { + p->save(); + QLinearGradient grad(draw_rect.topLeft(), vertical_tabs ? draw_rect.bottomLeft() : draw_rect.topRight()); + grad.setColorAt(0, Qt::transparent); + grad.setColorAt(0.5, QColor(255, 255, 255, fader)); + grad.setColorAt(1, Qt::transparent); + p->fillRect(draw_rect, grad); + p->setPen(QPen(grad, 1.0)); + p->drawLine(draw_rect.topLeft(), vertical_tabs ? draw_rect.bottomLeft() : draw_rect.topRight()); + p->drawLine(draw_rect.bottomRight(), vertical_tabs ? draw_rect.topRight() : draw_rect.bottomLeft()); + p->restore(); + } + } +#endif + + Utils::StyleHelper::drawIconWithShadow(v_opt->icon, icon_rect, p, QIcon::Normal); + + p->drawText(text_rect.translated(0, -1), textFlags, text); + + p->restore(); +} + +void FancyTabProxyStyle::polish(QWidget* widget) { + if (QString(widget->metaObject()->className()) == "QTabBar") { + widget->setMouseTracking(true); + widget->installEventFilter(this); + } + QProxyStyle::polish(widget); +} + +void FancyTabProxyStyle::polish(QApplication* app) { + QProxyStyle::polish(app); +} + +void FancyTabProxyStyle::polish(QPalette& palette) { + QProxyStyle::polish(palette); +} + +bool FancyTabProxyStyle::eventFilter(QObject* o, QEvent* e) { + QTabBar* bar = qobject_cast(o); + if (bar && (e->type() == QEvent::MouseMove || e->type() == QEvent::Leave)) { + QMouseEvent* event = static_cast(e); + const QString old_hovered_tab = bar->property("tab_hover").toString(); + const QString hovered_tab = e->type() == QEvent::Leave ? QString() : bar->tabText(bar->tabAt(event->pos())); + bar->setProperty("tab_hover", hovered_tab); + + if (old_hovered_tab != hovered_tab) + bar->update(); + } + + return false; +} + +FancyTab::FancyTab(QWidget* tabbar) + : QWidget(tabbar), tabbar(tabbar), m_fader(0) +{ + animator.setPropertyName("fader"); + animator.setTargetObject(this); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); +} + +void FancyTab::fadeIn() +{ + animator.stop(); + animator.setDuration(80); + animator.setEndValue(40); + animator.start(); +} + +void FancyTab::fadeOut() +{ + animator.stop(); + animator.setDuration(160); + animator.setEndValue(0); + animator.start(); +} + +void FancyTab::setFader(float value) +{ + m_fader = value; + tabbar->update(); +} + +FancyTabBar::FancyTabBar(QWidget *parent) + : QWidget(parent) +{ + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); + setStyle(new QWindowsStyle); + setMinimumWidth(qMax(2 * m_rounding, 40)); + setAttribute(Qt::WA_Hover, true); + setFocusPolicy(Qt::NoFocus); + setMouseTracking(true); // Needed for hover events + m_triggerTimer.setSingleShot(true); + + QVBoxLayout* layout = new QVBoxLayout; + layout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding)); + layout->setSpacing(0); + layout->setContentsMargins(0, 0, 0, 0); + setLayout(layout); + + // We use a zerotimer to keep the sidebar responsive + connect(&m_triggerTimer, SIGNAL(timeout()), this, SLOT(emitCurrentIndex())); +} + +FancyTabBar::~FancyTabBar() +{ + delete style(); +} + +QSize FancyTab::sizeHint() const { + QFont boldFont(font()); + boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize()); + boldFont.setBold(true); + QFontMetrics fm(boldFont); + int spacing = 8; + int width = 60 + spacing + 2; + int iconHeight = 32; + QSize ret(width, iconHeight + spacing + fm.height()); + return ret; +} + +QSize FancyTabBar::tabSizeHint(bool minimum) const +{ + QFont boldFont(font()); + boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize()); + boldFont.setBold(true); + QFontMetrics fm(boldFont); + int spacing = 8; + int width = 60 + spacing + 2; + int iconHeight = minimum ? 0 : 32; + return QSize(width, iconHeight + spacing + fm.height()); +} + +void FancyTabBar::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event) + QPainter p(this); + + for (int i = 0; i < count(); ++i) + if (i != currentIndex()) + paintTab(&p, i); + + // paint active tab last, since it overlaps the neighbors + if (currentIndex() != -1) + paintTab(&p, currentIndex()); +} + +void FancyTab::enterEvent(QEvent*) +{ + fadeIn(); +} + +void FancyTab::leaveEvent(QEvent*) +{ + fadeOut(); +} + +QSize FancyTabBar::sizeHint() const +{ + QSize sh = tabSizeHint(); + return QSize(sh.width(), sh.height() * m_tabs.count()); +} + +QSize FancyTabBar::minimumSizeHint() const +{ + QSize sh = tabSizeHint(true); + return QSize(sh.width(), sh.height() * m_tabs.count()); +} + +QRect FancyTabBar::tabRect(int index) const +{ + return m_tabs[index]->geometry(); +} + +QString FancyTabBar::tabToolTip(int index) const { + return m_tabs[index]->toolTip(); +} + +void FancyTabBar::setTabToolTip(int index, const QString& toolTip) { + m_tabs[index]->setToolTip(toolTip); +} + +// This keeps the sidebar responsive since +// we get a repaint before loading the +// mode itself +void FancyTabBar::emitCurrentIndex() +{ + emit currentChanged(m_currentIndex); +} + +void FancyTabBar::mousePressEvent(QMouseEvent *e) +{ + e->accept(); + for (int index = 0; index < m_tabs.count(); ++index) { + if (tabRect(index).contains(e->pos())) { + m_currentIndex = index; + update(); + m_triggerTimer.start(0); + break; + } + } +} + +void FancyTabBar::addTab(const QIcon& icon, const QString& label) { + FancyTab *tab = new FancyTab(this); + tab->icon = icon; + tab->text = label; + m_tabs.append(tab); + qobject_cast(layout())->insertWidget(layout()->count()-1, tab); +} + +void FancyTabBar::addSpacer(int size) { + qobject_cast(layout())->insertSpacerItem(layout()->count()-1, + new QSpacerItem(0, size, QSizePolicy::Fixed, QSizePolicy::Maximum)); +} + +void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const +{ + if (!validIndex(tabIndex)) { + qWarning("invalid index"); + return; + } + painter->save(); + + QRect rect = tabRect(tabIndex); + bool selected = (tabIndex == m_currentIndex); + + if (selected) { + //background + painter->save(); + QLinearGradient grad(rect.topLeft(), rect.topRight()); + grad.setColorAt(0, QColor(255, 255, 255, 140)); + grad.setColorAt(1, QColor(255, 255, 255, 210)); + painter->fillRect(rect.adjusted(0, 0, 0, -1), grad); + painter->restore(); + + //shadows + painter->setPen(QColor(0, 0, 0, 110)); + painter->drawLine(rect.topLeft() + QPoint(1,-1), rect.topRight() - QPoint(0,1)); + painter->drawLine(rect.bottomLeft(), rect.bottomRight()); + painter->setPen(QColor(0, 0, 0, 40)); + painter->drawLine(rect.topLeft(), rect.bottomLeft()); + + //highlights + painter->setPen(QColor(255, 255, 255, 50)); + painter->drawLine(rect.topLeft() + QPoint(0, -2), rect.topRight() - QPoint(0,2)); + painter->drawLine(rect.bottomLeft() + QPoint(0, 1), rect.bottomRight() + QPoint(0,1)); + painter->setPen(QColor(255, 255, 255, 40)); + painter->drawLine(rect.topLeft() + QPoint(0, 0), rect.topRight()); + painter->drawLine(rect.topRight() + QPoint(0, 1), rect.bottomRight() - QPoint(0, 1)); + painter->drawLine(rect.bottomLeft() + QPoint(0,-1), rect.bottomRight()-QPoint(0,1)); + } + + QString tabText(painter->fontMetrics().elidedText(this->tabText(tabIndex), Qt::ElideMiddle, width())); + QRect tabTextRect(tabRect(tabIndex)); + QRect tabIconRect(tabTextRect); + tabIconRect.adjust(+4, +4, -4, -4); + tabTextRect.translate(0, -2); + QFont boldFont(painter->font()); + boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize()); + boldFont.setBold(true); + painter->setFont(boldFont); + painter->setPen(selected ? QColor(255, 255, 255, 160) : QColor(0, 0, 0, 110)); + int textFlags = Qt::AlignCenter | Qt::AlignBottom; + painter->drawText(tabTextRect, textFlags, tabText); + painter->setPen(selected ? QColor(60, 60, 60) : Utils::StyleHelper::panelTextColor()); +#ifndef Q_WS_MAC + if (!selected) { + painter->save(); + int fader = int(m_tabs[tabIndex]->fader()); + QLinearGradient grad(rect.topLeft(), rect.topRight()); + grad.setColorAt(0, Qt::transparent); + grad.setColorAt(0.5, QColor(255, 255, 255, fader)); + grad.setColorAt(1, Qt::transparent); + painter->fillRect(rect, grad); + painter->setPen(QPen(grad, 1.0)); + painter->drawLine(rect.topLeft(), rect.topRight()); + painter->drawLine(rect.bottomLeft(), rect.bottomRight()); + painter->restore(); + } +#endif + + const int textHeight = painter->fontMetrics().height(); + tabIconRect.adjust(0, 4, 0, -textHeight); + Utils::StyleHelper::drawIconWithShadow(tabIcon(tabIndex), tabIconRect, painter, QIcon::Normal); + + painter->translate(0, -1); + painter->drawText(tabTextRect, textFlags, tabText); + painter->restore(); +} + +void FancyTabBar::setCurrentIndex(int index) { + m_currentIndex = index; + update(); + emit currentChanged(m_currentIndex); +} + + +////// +// FancyColorButton +////// + +class FancyColorButton : public QWidget +{ +public: + FancyColorButton(QWidget *parent) + : m_parent(parent) + { + setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); + } + + void mousePressEvent(QMouseEvent *ev) + { + if (ev->modifiers() & Qt::ShiftModifier) + Utils::StyleHelper::setBaseColor(QColorDialog::getColor(Utils::StyleHelper::requestedBaseColor(), m_parent)); + } +private: + QWidget *m_parent; +}; + +////// +// FancyTabWidget +////// + +FancyTabWidget::FancyTabWidget(QWidget* parent) + : QWidget(parent), + mode_(Mode_None), + tab_bar_(NULL), + stack_(new QStackedLayout), + side_widget_(new QWidget), + side_layout_(new QVBoxLayout), + top_layout_(new QVBoxLayout), + use_background_(false), + menu_(NULL), + proxy_style_(new FancyTabProxyStyle) +{ + side_layout_->setSpacing(0); + side_layout_->setMargin(0); + side_layout_->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding)); + + side_widget_->setLayout(side_layout_); + side_widget_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + + top_layout_->setMargin(0); + top_layout_->setSpacing(0); + top_layout_->addLayout(stack_); + + QHBoxLayout* main_layout = new QHBoxLayout; + main_layout->setMargin(0); + main_layout->setSpacing(1); + main_layout->addWidget(side_widget_); + main_layout->addLayout(top_layout_); + setLayout(main_layout); +} + +void FancyTabWidget::AddTab(QWidget* tab, const QIcon& icon, const QString& label) { + stack_->addWidget(tab); + items_ << Item(icon, label); +} + +void FancyTabWidget::AddSpacer(int size) { + items_ << Item(size); +} + +void FancyTabWidget::SetBackgroundPixmap(const QPixmap& pixmap) { + background_pixmap_ = pixmap; + update(); +} + +void FancyTabWidget::paintEvent(QPaintEvent*) { + if (!use_background_) + return; + + QPainter painter(this); + + QRect rect = side_widget_->rect().adjusted(0, 0, 1, 0); + rect = style()->visualRect(layoutDirection(), geometry(), rect); + Utils::StyleHelper::verticalGradient(&painter, rect, rect); + + if (!background_pixmap_.isNull()) { + QRect pixmap_rect(background_pixmap_.rect()); + pixmap_rect.moveTo(rect.topLeft()); + + while (pixmap_rect.top() < rect.bottom()) { + QRect source_rect(pixmap_rect.intersected(rect)); + source_rect.moveTo(0, 0); + painter.drawPixmap(pixmap_rect.topLeft(), background_pixmap_, source_rect); + pixmap_rect.moveTop(pixmap_rect.bottom() - 10); + } + } + + painter.setPen(Utils::StyleHelper::borderColor()); + painter.drawLine(rect.topRight(), rect.bottomRight()); + + QColor light = Utils::StyleHelper::sidebarHighlight(); + painter.setPen(light); + painter.drawLine(rect.bottomLeft(), rect.bottomRight()); +} + +int FancyTabWidget::current_index() const { + return stack_->currentIndex(); +} + +void FancyTabWidget::SetCurrentIndex(int index) { + if (FancyTabBar* bar = qobject_cast(tab_bar_)) { + bar->setCurrentIndex(index); + } else if (QTabBar* bar = qobject_cast(tab_bar_)) { + bar->setCurrentIndex(index); + } else { + stack_->setCurrentIndex(index); + } +} + +void FancyTabWidget::ShowWidget(int index) { + stack_->setCurrentIndex(index); + emit CurrentChanged(index); +} + +void FancyTabWidget::AddBottomWidget(QWidget* widget) { + top_layout_->addWidget(widget); +} + +void FancyTabWidget::SetMode(Mode mode) { + // Remove previous tab bar + delete tab_bar_; + tab_bar_ = NULL; + + use_background_ = false; + + // Create new tab bar + switch (mode) { + case Mode_None: + default: + qDebug() << "Unknown fancy tab mode" << mode; + // fallthrough + + case Mode_LargeSidebar: { + FancyTabBar* bar = new FancyTabBar(this); + side_layout_->insertWidget(0, bar); + tab_bar_ = bar; + + foreach (const Item& item, items_) { + if (item.type_ == Item::Type_Spacer) + bar->addSpacer(item.spacer_size_); + else + bar->addTab(item.tab_icon_, item.tab_label_); + } + + bar->setCurrentIndex(stack_->currentIndex()); + connect(bar, SIGNAL(currentChanged(int)), SLOT(ShowWidget(int))); + + use_background_ = true; + + break; + } + + case Mode_Tabs: + MakeTabBar(QTabBar::RoundedNorth, true, false, false); + break; + + case Mode_IconOnlyTabs: + MakeTabBar(QTabBar::RoundedNorth, false, true, false); + break; + + case Mode_SmallSidebar: + MakeTabBar(QTabBar::RoundedWest, true, true, true); + use_background_ = true; + break; + + case Mode_PlainSidebar: + MakeTabBar(QTabBar::RoundedWest, true, true, false); + break; + } + + tab_bar_->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + + mode_ = mode; + emit ModeChanged(mode); + update(); +} + +void FancyTabWidget::contextMenuEvent(QContextMenuEvent* e) { + Q_UNUSED(e) +// if (!menu_) { +// menu_ = new QMenu(this); + +// QSignalMapper* mapper = new QSignalMapper(this); +// QActionGroup* group = new QActionGroup(this); +// AddMenuItem(mapper, group, tr("Large sidebar"), Mode_LargeSidebar); +// AddMenuItem(mapper, group, tr("Small sidebar"), Mode_SmallSidebar); +// AddMenuItem(mapper, group, tr("Plain sidebar"), Mode_PlainSidebar); +// AddMenuItem(mapper, group, tr("Tabs on top"), Mode_Tabs); +// AddMenuItem(mapper, group, tr("Icons on top"), Mode_IconOnlyTabs); +// menu_->addActions(group->actions()); + +// connect(mapper, SIGNAL(mapped(int)), SLOT(SetMode(int))); +// } + +// menu_->popup(e->globalPos()); +} + +void FancyTabWidget::AddMenuItem(QSignalMapper* mapper, QActionGroup* group, + const QString& text, Mode mode) { + QAction* action = group->addAction(text); + action->setCheckable(true); + mapper->setMapping(action, mode); + connect(action, SIGNAL(triggered()), mapper, SLOT(map())); + + if (mode == mode_) + action->setChecked(true); +} + +void FancyTabWidget::MakeTabBar(QTabBar::Shape shape, bool text, bool icons, + bool fancy) { + QTabBar* bar = new QTabBar(this); + bar->setShape(shape); + bar->setDocumentMode(true); + bar->setUsesScrollButtons(true); + + if (shape == QTabBar::RoundedWest) { + bar->setIconSize(QSize(22, 22)); + } + + if (fancy) { + bar->setStyle(proxy_style_); + } + + if (shape == QTabBar::RoundedNorth) + top_layout_->insertWidget(0, bar); + else + side_layout_->insertWidget(0, bar); + + foreach (const Item& item, items_) { + if (item.type_ != Item::Type_Tab) + continue; + + QString label = item.tab_label_; + if (shape == QTabBar::RoundedWest) { + label = QFontMetrics(font()).elidedText(label, Qt::ElideMiddle, 100); + } + + int tab_id = -1; + if (icons && text) + tab_id = bar->addTab(item.tab_icon_, label); + else if (icons) + tab_id = bar->addTab(item.tab_icon_, QString()); + else if (text) + tab_id = bar->addTab(label); + + bar->setTabToolTip(tab_id, item.tab_label_); + } + + bar->setCurrentIndex(stack_->currentIndex()); + connect(bar, SIGNAL(currentChanged(int)), SLOT(ShowWidget(int))); + tab_bar_ = bar; +} diff --git a/src/3rdparty/fancytabwidget.h b/src/3rdparty/fancytabwidget.h new file mode 100644 index 000000000..1971841e8 --- /dev/null +++ b/src/3rdparty/fancytabwidget.h @@ -0,0 +1,230 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef FANCYTABWIDGET_H +#define FANCYTABWIDGET_H + +#include +#include +#include +#include +#include +#include + +class QActionGroup; +class QMenu; +class QPainter; +class QSignalMapper; +class QStackedLayout; +class QStatusBar; +class QVBoxLayout; + +namespace Core { +namespace Internal { + +class FancyTabProxyStyle : public QProxyStyle { + Q_OBJECT + +public: + void drawControl(ControlElement element, const QStyleOption* option, + QPainter* painter, const QWidget* widget) const; + void polish(QWidget* widget); + void polish(QApplication* app); + void polish(QPalette& palette); + +protected: + bool eventFilter(QObject* o, QEvent* e); +}; + +class FancyTab : public QWidget{ + Q_OBJECT + + Q_PROPERTY(float fader READ fader WRITE setFader) +public: + FancyTab(QWidget *tabbar); + float fader() { return m_fader; } + void setFader(float value); + + QSize sizeHint() const; + + void fadeIn(); + void fadeOut(); + + QIcon icon; + QString text; + +protected: + void enterEvent(QEvent *); + void leaveEvent(QEvent *); + +private: + QPropertyAnimation animator; + QWidget *tabbar; + float m_fader; +}; + +class FancyTabBar : public QWidget +{ + Q_OBJECT + +public: + FancyTabBar(QWidget *parent = 0); + ~FancyTabBar(); + + void paintEvent(QPaintEvent *event); + void paintTab(QPainter *painter, int tabIndex) const; + void mousePressEvent(QMouseEvent *); + bool validIndex(int index) const { return index >= 0 && index < m_tabs.count(); } + + QSize sizeHint() const; + QSize minimumSizeHint() const; + + void addTab(const QIcon &icon, const QString &label); + void addSpacer(int size = 40); + void removeTab(int index) { + FancyTab *tab = m_tabs.takeAt(index); + delete tab; + } + void setCurrentIndex(int index); + int currentIndex() const { return m_currentIndex; } + + void setTabToolTip(int index, const QString& toolTip); + QString tabToolTip(int index) const; + + QIcon tabIcon(int index) const {return m_tabs.at(index)->icon; } + QString tabText(int index) const { return m_tabs.at(index)->text; } + int count() const {return m_tabs.count(); } + QRect tabRect(int index) const; + +signals: + void currentChanged(int); + +public slots: + void emitCurrentIndex(); + +private: + static const int m_rounding; + static const int m_textPadding; + int m_currentIndex; + QList m_tabs; + QTimer m_triggerTimer; + QSize tabSizeHint(bool minimum = false) const; + +}; + +class FancyTabWidget : public QWidget { + Q_OBJECT + +public: + FancyTabWidget(QWidget* parent = 0); + + // Values are persisted - only add to the end + enum Mode { + Mode_None = 0, + + Mode_LargeSidebar = 1, + Mode_SmallSidebar = 2, + Mode_Tabs = 3, + Mode_IconOnlyTabs = 4, + Mode_PlainSidebar = 5, + }; + + struct Item { + Item(const QIcon& icon, const QString& label) + : type_(Type_Tab), tab_label_(label), tab_icon_(icon), spacer_size_(0) {} + Item(int size) : type_(Type_Spacer), spacer_size_(size) {} + + enum Type { + Type_Tab, + Type_Spacer, + }; + + Type type_; + QString tab_label_; + QIcon tab_icon_; + int spacer_size_; + }; + + void AddTab(QWidget *tab, const QIcon &icon, const QString &label); + void AddSpacer(int size = 40); + void SetBackgroundPixmap(const QPixmap& pixmap); + + void AddBottomWidget(QWidget* widget); + + int current_index() const; + Mode mode() const { return mode_; } + +public slots: + void SetCurrentIndex(int index); + void SetMode(Mode mode); + void SetMode(int mode) { SetMode(Mode(mode)); } + +signals: + void CurrentChanged(int index); + void ModeChanged(FancyTabWidget::Mode mode); + +protected: + void paintEvent(QPaintEvent *event); + void contextMenuEvent(QContextMenuEvent* e); + +private slots: + void ShowWidget(int index); + +private: + void MakeTabBar(QTabBar::Shape shape, bool text, bool icons, bool fancy); + void AddMenuItem(QSignalMapper* mapper, QActionGroup* group, + const QString& text, Mode mode); + + Mode mode_; + QList items_; + + QWidget* tab_bar_; + QStackedLayout* stack_; + QPixmap background_pixmap_; + QWidget* side_widget_; + QVBoxLayout* side_layout_; + QVBoxLayout* top_layout_; + + bool use_background_; + + QMenu* menu_; + + FancyTabProxyStyle* proxy_style_; +}; + +} // namespace Internal +} // namespace Core + +Q_DECLARE_METATYPE(QPropertyAnimation*); + +using Core::Internal::FancyTab; +using Core::Internal::FancyTabBar; +using Core::Internal::FancyTabWidget; + +#endif // FANCYTABWIDGET_H diff --git a/src/3rdparty/stylehelper.cpp b/src/3rdparty/stylehelper.cpp new file mode 100644 index 000000000..84035f4cd --- /dev/null +++ b/src/3rdparty/stylehelper.cpp @@ -0,0 +1,241 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "stylehelper.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +// Clamps float color values within (0, 255) +static int clamp(float x) +{ + const int val = x > 255 ? 255 : static_cast(x); + return val < 0 ? 0 : val; +} + +namespace Utils { + +qreal StyleHelper::sidebarFontSize() +{ +#if defined(Q_WS_MAC) + return 10; +#else + return 7.5; +#endif +} + +QColor StyleHelper::panelTextColor(bool lightColored) +{ + if (!lightColored) + return Qt::white; + else + return Qt::black; +} + +// Invalid by default, setBaseColor needs to be called at least once +QColor StyleHelper::m_baseColor; +QColor StyleHelper::m_requestedBaseColor; + +QColor StyleHelper::baseColor(bool lightColored) +{ + if (!lightColored) + return m_baseColor; + else + return m_baseColor.lighter(230); +} + +QColor StyleHelper::highlightColor(bool lightColored) +{ + QColor result = baseColor(lightColored); + if (!lightColored) + result.setHsv(result.hue(), + clamp(result.saturation()), + clamp(result.value() * 1.16)); + else + result.setHsv(result.hue(), + clamp(result.saturation()), + clamp(result.value() * 1.06)); + return result; +} + +QColor StyleHelper::shadowColor(bool lightColored) +{ + QColor result = baseColor(lightColored); + result.setHsv(result.hue(), + clamp(result.saturation() * 1.1), + clamp(result.value() * 0.70)); + return result; +} + +QColor StyleHelper::borderColor(bool lightColored) +{ + QColor result = baseColor(lightColored); + result.setHsv(result.hue(), + result.saturation(), + result.value() / 2); + return result; +} + +// We try to ensure that the actual color used are within +// reasonalbe bounds while generating the actual baseColor +// from the users request. +void StyleHelper::setBaseColor(const QColor &newcolor) +{ + m_requestedBaseColor = newcolor; + + QColor color; + color.setHsv(newcolor.hue(), + newcolor.saturation() * 0.7, + 64 + newcolor.value() / 3); + + if (color.isValid() && color != m_baseColor) { + m_baseColor = color; + foreach (QWidget *w, QApplication::topLevelWidgets()) + w->update(); + } +} + +static void verticalGradientHelper(QPainter *p, const QRect &spanRect, const QRect &rect, bool lightColored) +{ + QColor highlight = StyleHelper::highlightColor(lightColored); + QColor shadow = StyleHelper::shadowColor(lightColored); + QLinearGradient grad(spanRect.topRight(), spanRect.topLeft()); + grad.setColorAt(0, highlight.lighter(117)); + grad.setColorAt(1, shadow.darker(109)); + p->fillRect(rect, grad); + + QColor light(255, 255, 255, 80); + p->setPen(light); + p->drawLine(rect.topRight() - QPoint(1, 0), rect.bottomRight() - QPoint(1, 0)); + QColor dark(0, 0, 0, 90); + p->setPen(dark); + p->drawLine(rect.topLeft(), rect.bottomLeft()); +} + +void StyleHelper::verticalGradient(QPainter *painter, const QRect &spanRect, const QRect &clipRect, bool lightColored) +{ + if (StyleHelper::usePixmapCache()) { + QString key; + QColor keyColor = baseColor(lightColored); + key.sprintf("mh_vertical %d %d %d %d %d", + spanRect.width(), spanRect.height(), clipRect.width(), + clipRect.height(), keyColor.rgb());; + + QPixmap pixmap; + if (!QPixmapCache::find(key, pixmap)) { + pixmap = QPixmap(clipRect.size()); + QPainter p(&pixmap); + QRect rect(0, 0, clipRect.width(), clipRect.height()); + verticalGradientHelper(&p, spanRect, rect, lightColored); + p.end(); + QPixmapCache::insert(key, pixmap); + } + + painter->drawPixmap(clipRect.topLeft(), pixmap); + } else { + verticalGradientHelper(painter, spanRect, clipRect, lightColored); + } +} + +// Draws a cached pixmap with shadow +void StyleHelper::drawIconWithShadow(const QIcon &icon, const QRect &rect, + QPainter *p, QIcon::Mode iconMode, int radius, const QColor &color, const QPoint &offset) +{ + QPixmap cache; + QString pixmapName = QString("icon %0 %1 %2").arg(icon.cacheKey()).arg(iconMode).arg(rect.height()); + + if (!QPixmapCache::find(pixmapName, cache)) { + QPixmap px = icon.pixmap(rect.size()); + cache = QPixmap(px.size() + QSize(radius * 2, radius * 2)); + cache.fill(Qt::transparent); + + QPainter cachePainter(&cache); + if (iconMode == QIcon::Disabled) { + QImage im = px.toImage().convertToFormat(QImage::Format_ARGB32); + for (int y=0; ydrawPixmap(targetRect.topLeft() - offset, cache); +} + +} // namespace Utils diff --git a/src/3rdparty/stylehelper.h b/src/3rdparty/stylehelper.h new file mode 100644 index 000000000..b8a24fb38 --- /dev/null +++ b/src/3rdparty/stylehelper.h @@ -0,0 +1,86 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef STYLEHELPER_H +#define STYLEHELPER_H + +#include +#include + +QT_BEGIN_NAMESPACE +class QPalette; +class QPainter; +class QRect; +// Note, this is exported but in a private header as qtopengl depends on it. +// We should consider adding this as a public helper function. +void qt_blurImage(QPainter *p, QImage &blurImage, qreal radius, bool quality, bool alphaOnly, int transposed = 0); +QT_END_NAMESPACE + +// Helper class holding all custom color values + +namespace Utils { +class StyleHelper +{ +public: + static const unsigned int DEFAULT_BASE_COLOR = 0x666666; + + // Height of the project explorer navigation bar + static qreal sidebarFontSize(); + + // This is our color table, all colors derive from baseColor + static QColor requestedBaseColor() { return m_requestedBaseColor; } + static QColor baseColor(bool lightColored = false); + static QColor panelTextColor(bool lightColored = false); + static QColor highlightColor(bool lightColored = false); + static QColor shadowColor(bool lightColored = false); + static QColor borderColor(bool lightColored = false); + + static QColor sidebarHighlight() { return QColor(255, 255, 255, 40); } + static QColor sidebarShadow() { return QColor(0, 0, 0, 40); } + + // Sets the base color and makes sure all top level widgets are updated + static void setBaseColor(const QColor &color); + + // Gradients used for panels + static void verticalGradient(QPainter *painter, const QRect &spanRect, const QRect &clipRect, bool lightColored = false); + static bool usePixmapCache() { return true; } + + static void drawIconWithShadow(const QIcon &icon, const QRect &rect, QPainter *p, QIcon::Mode iconMode, + int radius = 3, const QColor &color = QColor(0, 0, 0, 130), + const QPoint &offset = QPoint(1, -2)); + +private: + static QColor m_baseColor; + static QColor m_requestedBaseColor; +}; + +} // namespace Utils + +using Utils::StyleHelper; +#endif // STYLEHELPER_H diff --git a/src/QupZilla.pro b/src/QupZilla.pro index 4ad3b0775..aab679a5f 100644 --- a/src/QupZilla.pro +++ b/src/QupZilla.pro @@ -123,7 +123,10 @@ SOURCES += main.cpp\ 3rdparty/squeezelabelv2.cpp \ 3rdparty/squeezelabelv1.cpp \ tools/buttonwithmenu.cpp \ - navigation/locationbarsettings.cpp + navigation/locationbarsettings.cpp \ + other/browsinglibrary.cpp \ + 3rdparty/stylehelper.cpp \ + 3rdparty/fancytabwidget.cpp HEADERS += \ 3rdparty/qtwin.h \ @@ -207,7 +210,10 @@ HEADERS += \ 3rdparty/squeezelabelv2.h \ 3rdparty/squeezelabelv1.h \ tools/buttonwithmenu.h \ - navigation/locationbarsettings.h + navigation/locationbarsettings.h \ + other/browsinglibrary.h \ + 3rdparty/stylehelper.h \ + 3rdparty/fancytabwidget.h FORMS += \ preferences/autofillmanager.ui \ @@ -238,7 +244,8 @@ FORMS += \ desktopnotifications/desktopnotification.ui \ webview/jsconfirm.ui \ webview/jsalert.ui \ - webview/jsprompt.ui + webview/jsprompt.ui \ + other/browsinglibrary.ui RESOURCES += \ data/icons.qrc \ diff --git a/src/app/mainapplication.cpp b/src/app/mainapplication.cpp index 43a99fc51..3612dc842 100644 --- a/src/app/mainapplication.cpp +++ b/src/app/mainapplication.cpp @@ -19,10 +19,9 @@ #include "qupzilla.h" #include "tabwidget.h" #include "bookmarkstoolbar.h" -#include "bookmarksmanager.h" #include "cookiemanager.h" #include "cookiejar.h" -#include "historymanager.h" +#include "browsinglibrary.h" #include "historymodel.h" #include "networkmanager.h" #include "rssmanager.h" @@ -39,9 +38,8 @@ MainApplication::MainApplication(const QList &cmdActions, int &argc, char **argv) : QtSingleApplication("QupZillaWebBrowser", argc, argv) - ,m_bookmarksmanager(0) ,m_cookiemanager(0) - ,m_historymanager(0) + ,m_browsingLibrary(0) ,m_historymodel(0) ,m_websettings(0) ,m_networkmanager(0) @@ -371,11 +369,11 @@ void MainApplication::quitApplication() quit(); } -BookmarksManager* MainApplication::bookmarksManager() +BrowsingLibrary* MainApplication::browsingLibrary() { - if (!m_bookmarksmanager) - m_bookmarksmanager = new BookmarksManager(getWindow()); - return m_bookmarksmanager; + if (!m_browsingLibrary) + m_browsingLibrary = new BrowsingLibrary(getWindow()); + return m_browsingLibrary; } PluginProxy* MainApplication::plugins() @@ -392,13 +390,6 @@ CookieManager* MainApplication::cookieManager() return m_cookiemanager; } -HistoryManager* MainApplication::historyManager() -{ - if (!m_historymanager) - m_historymanager = new HistoryManager(getWindow()); - return m_historymanager; -} - HistoryModel* MainApplication::history() { if (!m_historymodel) diff --git a/src/app/mainapplication.h b/src/app/mainapplication.h index 3d9525cc9..3e0540e07 100644 --- a/src/app/mainapplication.h +++ b/src/app/mainapplication.h @@ -31,9 +31,8 @@ #include "commandlineoptions.h" class QupZilla; -class BookmarksManager; class CookieManager; -class HistoryManager; +class BrowsingLibrary; class HistoryModel; class NetworkManager; class CookieJar; @@ -76,9 +75,8 @@ public: void checkProfile(QString path); QupZilla* getWindow(); - BookmarksManager* bookmarksManager(); CookieManager* cookieManager(); - HistoryManager* historyManager(); + BrowsingLibrary* browsingLibrary(); HistoryModel* history(); QWebSettings* webSettings(); NetworkManager* networkManager(); @@ -113,9 +111,8 @@ private: void translateApp(); void restoreOtherWindows(); - BookmarksManager* m_bookmarksmanager; CookieManager* m_cookiemanager; - HistoryManager* m_historymanager; + BrowsingLibrary* m_browsingLibrary; HistoryModel* m_historymodel; QWebSettings* m_websettings; NetworkManager* m_networkmanager; diff --git a/src/app/qupzilla.cpp b/src/app/qupzilla.cpp index 641836328..af9c4faa6 100644 --- a/src/app/qupzilla.cpp +++ b/src/app/qupzilla.cpp @@ -28,7 +28,6 @@ #include "downloadmanager.h" #include "cookiejar.h" #include "cookiemanager.h" -#include "historymanager.h" #include "bookmarksmanager.h" #include "bookmarkstoolbar.h" #include "clearprivatedata.h" @@ -54,6 +53,7 @@ #include "closedtabsmanager.h" #include "statusbarmessage.h" #include "locationbarsettings.h" +#include "browsinglibrary.h" const QString QupZilla::VERSION = "1.0.0-b3"; //const QString QupZilla::BUILDTIME = QLocale(QLocale::English).toDateTime(__DATE__" "__TIME__, "MMM d yyyy hh:mm:ss").toString("MM/dd/yyyy hh:ss"); @@ -845,17 +845,17 @@ void QupZilla::changeEncoding() void QupZilla::bookmarkPage() { - mApp->bookmarksManager()->addBookmark(weView()); + mApp->browsingLibrary()->bookmarksManager()->addBookmark(weView()); } void QupZilla::addBookmark(const QUrl &url, const QString &title) { - mApp->bookmarksManager()->insertBookmark(url, title); + mApp->browsingLibrary()->bookmarksManager()->insertBookmark(url, title); } void QupZilla::bookmarkAllTabs() { - mApp->bookmarksManager()->insertAllTabs(); + mApp->browsingLibrary()->bookmarksManager()->insertAllTabs(); } void QupZilla::loadActionUrl() @@ -882,26 +882,17 @@ void QupZilla::showCookieManager() void QupZilla::showHistoryManager() { - HistoryManager* m = mApp->historyManager(); - m->refreshTable(); - m->setMainWindow(this); - m->show(); + mApp->browsingLibrary()->showHistory(this); } void QupZilla::showRSSManager() { - RSSManager* m = mApp->rssManager(); - m->refreshTable(); - m->setMainWindow(this); - m->show(); + mApp->browsingLibrary()->showRSS(this); } void QupZilla::showBookmarksManager() { - BookmarksManager* m = mApp->bookmarksManager(); - m->refreshTable(); - m->setMainWindow(this); - m->show(); + mApp->browsingLibrary()->showBookmarks(this); } void QupZilla::showClearPrivateData() diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp index 19423ed6d..ef9593666 100644 --- a/src/bookmarks/bookmarksmanager.cpp +++ b/src/bookmarks/bookmarksmanager.cpp @@ -47,7 +47,6 @@ BookmarksManager::BookmarksManager(QupZilla* mainClass, QWidget* parent) : #endif connect(ui->deleteB, SIGNAL(clicked()), this, SLOT(deleteItem())); - connect(ui->close, SIGNAL(clicked(QAbstractButton*)), this, SLOT(hide())); connect(ui->bookmarksTree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(itemChanged(QTreeWidgetItem*))); connect(ui->addFolder, SIGNAL(clicked()), this, SLOT(addFolder())); connect(ui->bookmarksTree, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenuRequested(const QPoint &))); diff --git a/src/bookmarks/bookmarksmanager.h b/src/bookmarks/bookmarksmanager.h index 41f205bea..439b3fe57 100644 --- a/src/bookmarks/bookmarksmanager.h +++ b/src/bookmarks/bookmarksmanager.h @@ -22,6 +22,7 @@ #include #include #include +#include #include "bookmarksmodel.h" diff --git a/src/bookmarks/bookmarksmanager.ui b/src/bookmarks/bookmarksmanager.ui index 49e60bb19..583ada5ed 100644 --- a/src/bookmarks/bookmarksmanager.ui +++ b/src/bookmarks/bookmarksmanager.ui @@ -14,7 +14,7 @@ Bookmarks - + :/icons/qupzilla.png:/icons/qupzilla.png @@ -41,13 +41,6 @@ - - - - QDialogButtonBox::Close - - - @@ -65,6 +58,19 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -75,7 +81,7 @@ - + diff --git a/src/data/icons.qrc b/src/data/icons.qrc index 1976327da..a7d5685ca 100644 --- a/src/data/icons.qrc +++ b/src/data/icons.qrc @@ -72,5 +72,9 @@ icons/other/adblock.png icons/preferences/stock_dialog-question.png icons/notifications/download.png + icons/other/background.png + icons/other/bighistory.png + icons/other/library-bg-top.png + icons/other/library-bg-top-right.png diff --git a/src/downloads/downloaditem.cpp b/src/downloads/downloaditem.cpp index 5fdad7b90..7d8580eb9 100644 --- a/src/downloads/downloaditem.cpp +++ b/src/downloads/downloaditem.cpp @@ -46,7 +46,6 @@ DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString QFile::remove(fullPath); m_outputFile.setFileName(fullPath); - qDebug() << m_fileName << m_outputFile.fileName(); ui->setupUi(this); setMaximumWidth(525); diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp index 8e4073eab..e83c25ce3 100644 --- a/src/history/historymanager.cpp +++ b/src/history/historymanager.cpp @@ -42,11 +42,9 @@ HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent) : #endif connect(ui->historyTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this, SLOT(itemDoubleClicked(QTreeWidgetItem*))); - connect(ui->close, SIGNAL(clicked(QAbstractButton*)), this, SLOT(hide())); connect(ui->deleteB, SIGNAL(clicked()), this, SLOT(deleteItem())); connect(ui->clearAll, SIGNAL(clicked()), this, SLOT(clearHistory())); // connect(ui->search, SIGNAL(textChanged(QString)), ui->historyTree, SLOT(filterStringWithoutTopItems(QString))); - connect(ui->search, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(search())); connect(ui->historyTree, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenuRequested(const QPoint &))); connect(ui->historyTree, SIGNAL(itemControlClicked(QTreeWidgetItem*)), this, SLOT(itemControlClicked(QTreeWidgetItem*))); @@ -56,7 +54,7 @@ HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent) : //QTimer::singleShot(0, this, SLOT(refreshTable())); - ui->search->setInactiveText(tr("Search")); + ui->historyTree->setFocus(); } QupZilla* HistoryManager::getQupZilla() @@ -225,9 +223,8 @@ void HistoryManager::refreshTable() ui->historyTree->setUpdatesEnabled(true); } -void HistoryManager::search() +void HistoryManager::search(const QString &searchText) { - QString searchText = ui->search->text(); if (searchText.isEmpty()) { refreshTable(); return; diff --git a/src/history/historymanager.h b/src/history/historymanager.h index e0153b19b..c1c63e3d4 100644 --- a/src/history/historymanager.h +++ b/src/history/historymanager.h @@ -41,12 +41,12 @@ public: public slots: void refreshTable(); + void search(const QString &searchText); private slots: void itemDoubleClicked(QTreeWidgetItem* item); void deleteItem(); void clearHistory(); - void search(); void contextMenuRequested(const QPoint &position); void loadInNewTab(); void itemControlClicked(QTreeWidgetItem* item); diff --git a/src/history/historymanager.ui b/src/history/historymanager.ui index 0849ea07a..730d4b8af 100644 --- a/src/history/historymanager.ui +++ b/src/history/historymanager.ui @@ -18,17 +18,7 @@ :/icons/qupzilla.png:/icons/qupzilla.png - - - - Search in history: - - - - - - - + Qt::CustomContextMenu @@ -51,7 +41,7 @@ - + Delete @@ -61,28 +51,29 @@ - + Clear All History - - - - QDialogButtonBox::Close + + + + Qt::Horizontal - + + + 40 + 20 + + + - - LineEdit - QLineEdit -
lineedit.h
-
TreeWidget QTreeWidget diff --git a/src/other/browsinglibrary.cpp b/src/other/browsinglibrary.cpp new file mode 100644 index 000000000..b190c4c12 --- /dev/null +++ b/src/other/browsinglibrary.cpp @@ -0,0 +1,110 @@ +#include "browsinglibrary.h" +#include "ui_browsinglibrary.h" +#include "historymanager.h" +#include "bookmarksmanager.h" +#include "rssmanager.h" +#include "mainapplication.h" + +BrowsingLibrary::BrowsingLibrary(QupZilla* mainClass, QWidget *parent) + : QWidget(parent) + , ui(new Ui::BrowsingLibrary) + , m_historyManager(new HistoryManager(mainClass)) + , m_bookmarksManager(new BookmarksManager(mainClass)) + , m_rssManager(mApp->rssManager()) + , m_historyLoaded(false) + , m_bookmarksLoaded(false) + , m_rssLoaded(false) +{ + ui->setupUi(this); + ui->searchLine->hide(); + + //CENTER on scren + const QRect screen = QApplication::desktop()->screenGeometry(); + const QRect &size = QWidget::geometry(); + QWidget::move( (screen.width()-size.width())/2, (screen.height()-size.height())/2 ); + + ui->tabs->AddTab(m_historyManager, QIcon(":/icons/other/bighistory.png"), tr("History")); + ui->tabs->AddTab(m_bookmarksManager, QIcon(":/icons/other/bigstar.png"), tr("Bookmarks")); + ui->tabs->AddTab(m_rssManager, QIcon(":/icons/other/bigrss.png"), tr("RSS")); + + ui->tabs->SetMode(FancyTabWidget::Mode_LargeSidebar); + ui->tabs->SetBackgroundPixmap(QPixmap(":icons/other/background.png")); + + connect(ui->tabs, SIGNAL(CurrentChanged(int)), this, SLOT(currentIndexChanged(int))); + connect(ui->searchLine, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(search())); +} + +void BrowsingLibrary::currentIndexChanged(int index) +{ + switch (index) { + case 0: + if (!m_historyLoaded) { + m_historyManager->refreshTable(); + m_historyLoaded = true; + } + ui->searchLine->show(); + break; + + case 1: + if (!m_bookmarksLoaded) { + m_bookmarksManager->refreshTable(); + m_bookmarksLoaded = true; + } + ui->searchLine->hide(); + break; + + case 2: + if (!m_rssLoaded) { + m_rssManager->refreshTable(); + m_rssLoaded = true; + } + ui->searchLine->hide(); + break; + + default: + qWarning("BrowsingLibrary::currentIndexChanged() received index out of range!"); + } +} + +void BrowsingLibrary::search() +{ + m_historyManager->search(ui->searchLine->text()); +} + +void BrowsingLibrary::showHistory(QupZilla* mainClass) +{ + ui->tabs->SetCurrentIndex(0); + show(); + m_historyManager->setMainWindow(mainClass); + + if (!m_historyLoaded) { + m_historyManager->refreshTable(); + m_historyLoaded = true; + } +} + +void BrowsingLibrary::showBookmarks(QupZilla* mainClass) +{ + ui->tabs->SetCurrentIndex(1); + show(); + m_bookmarksManager->setMainWindow(mainClass); + + if (!m_bookmarksLoaded) { + m_bookmarksManager->refreshTable(); + m_bookmarksLoaded = true; + } +} + +void BrowsingLibrary::showRSS(QupZilla* mainClass) +{ + ui->tabs->SetCurrentIndex(2); + show(); + m_rssManager->setMainWindow(mainClass); + m_rssManager->refreshTable(); + m_rssLoaded = true; +} + +BrowsingLibrary::~BrowsingLibrary() +{ + delete ui; +} diff --git a/src/other/browsinglibrary.h b/src/other/browsinglibrary.h new file mode 100644 index 000000000..7c9c03fb6 --- /dev/null +++ b/src/other/browsinglibrary.h @@ -0,0 +1,45 @@ +#ifndef LIBRARY_H +#define LIBRARY_H + +#include +#include + +namespace Ui { + class BrowsingLibrary; +} + +class HistoryManager; +class BookmarksManager; +class RSSManager; +class QupZilla; +class BrowsingLibrary : public QWidget +{ + Q_OBJECT + +public: + explicit BrowsingLibrary(QupZilla* mainClass, QWidget *parent = 0); + ~BrowsingLibrary(); + + void showHistory(QupZilla* mainClass); + void showBookmarks(QupZilla* mainClass); + void showRSS(QupZilla* mainClass); + + HistoryManager* historyManager() { return m_historyManager; } + BookmarksManager* bookmarksManager() { return m_bookmarksManager; } + RSSManager* rssManager() { return m_rssManager; } + +private slots: + void currentIndexChanged(int index); + void search(); + +private: + Ui::BrowsingLibrary *ui; + HistoryManager* m_historyManager; + BookmarksManager* m_bookmarksManager; + RSSManager* m_rssManager; + bool m_historyLoaded; + bool m_bookmarksLoaded; + bool m_rssLoaded; +}; + +#endif // LIBRARY_H diff --git a/src/other/browsinglibrary.ui b/src/other/browsinglibrary.ui new file mode 100644 index 000000000..279e32962 --- /dev/null +++ b/src/other/browsinglibrary.ui @@ -0,0 +1,116 @@ + + + BrowsingLibrary + + + + 0 + 0 + 762 + 477 + + + + Library + + + + :/qupzilla.png:/qupzilla.png + + + + 0 + + + 0 + + + + + + + + + 71 + 25 + + + + + 71 + 25 + + + + background: url(':icons/other/library-bg-top.png') no-repeat; + + + + + + + + 16777215 + 25 + + + + background: url(':icons/other/library-bg-top-right.png') repeat; + + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 16777215 + 23 + + + + QLineEdit +{ + background: transparent; border-image: url(:/icons/locationbar/lineedit.png); border-width:4; color:black; +} + + + Search... + + + + + + + + + + + FancyTabWidget + QWidget +
fancytabwidget.h
+ 1 +
+
+ + + + +
diff --git a/src/rss/rssmanager.cpp b/src/rss/rssmanager.cpp index 3b7ab9c80..54c55f31f 100644 --- a/src/rss/rssmanager.cpp +++ b/src/rss/rssmanager.cpp @@ -44,7 +44,6 @@ RSSManager::RSSManager(QupZilla* mainClass, QWidget* parent) : ui->tabWidget->setElideMode(Qt::ElideRight); m_networkManager = new QNetworkAccessManager(); - connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close())); connect(ui->reload, SIGNAL(clicked()), this, SLOT(reloadFeed())); connect(ui->deletebutton, SIGNAL(clicked()), this, SLOT(deleteFeed())); connect(ui->edit, SIGNAL(clicked()), this, SLOT(editFeed())); @@ -66,12 +65,6 @@ void RSSManager::setMainWindow(QupZilla* window) void RSSManager::refreshTable() { QSqlQuery query; - query.exec("SELECT count(id) FROM rss"); - if (!query.next()) - return; - if (query.value(0).toInt() == 0) - return; - ui->tabWidget->clear(); query.exec("SELECT address, title FROM rss"); int i = 0; @@ -101,6 +94,23 @@ void RSSManager::refreshTable() ui->deletebutton->setEnabled(true); ui->reload->setEnabled(true); ui->edit->setEnabled(true); + } else { + ui->deletebutton->setEnabled(false); + ui->reload->setEnabled(false); + ui->edit->setEnabled(false); + + QFrame *frame = new QFrame(); + frame->setStyleSheet("background: white;"); + QVBoxLayout *verticalLayout = new QVBoxLayout(frame); + QLabel *label_2 = new QLabel(frame); + label_2->setPixmap(QPixmap(":/icons/menu/rss.png")); + label_2->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); + verticalLayout->addWidget(label_2); + QLabel *label = new QLabel(frame); + label->setAlignment(Qt::AlignHCenter|Qt::AlignTop); + label->setText(tr("You don't have any RSS Feeds.
\nPlease add some with RSS icon in navigation bar on site which offers feeds.")); + verticalLayout->addWidget(label); + ui->tabWidget->addTab(frame, tr("Empty")); } } @@ -126,12 +136,8 @@ void RSSManager::deleteFeed() query.exec("DELETE FROM rss WHERE address='"+url+"'"); ui->tabWidget->removeTab(ui->tabWidget->currentIndex()); - if (ui->tabWidget->count() == 0) { - ui->deletebutton->setEnabled(false); - ui->reload->setEnabled(false); - ui->edit->setEnabled(false); + if (ui->tabWidget->count() == 0) refreshTable(); - } } void RSSManager::editFeed() diff --git a/src/rss/rssmanager.h b/src/rss/rssmanager.h index e00ccc5e9..6e73820f4 100644 --- a/src/rss/rssmanager.h +++ b/src/rss/rssmanager.h @@ -24,6 +24,7 @@ #include #include #include +#include namespace Ui { class RSSManager; diff --git a/src/rss/rssmanager.ui b/src/rss/rssmanager.ui index a557033df..a96745130 100644 --- a/src/rss/rssmanager.ui +++ b/src/rss/rssmanager.ui @@ -19,7 +19,7 @@ - 0 + 6 @@ -49,48 +49,6 @@ 0 - - - - background: white; - - - QFrame::NoFrame - - - QFrame::Raised - - - - - - - 0 - 0 - - - - :/icons/menu/rss.png - - - Qt::AlignBottom|Qt::AlignHCenter - - - - - - - You don't have any RSS Feeds.<br/> -Please add some with RSS icon in navigation bar on site which offers feeds. - - - Qt::AlignHCenter|Qt::AlignTop - - - - - - @@ -140,13 +98,6 @@ Please add some with RSS icon in navigation bar on site which offers feeds. - - - - QDialogButtonBox::Close - - - diff --git a/src/webview/tabwidget.cpp b/src/webview/tabwidget.cpp index a81215cef..3006c1dc4 100644 --- a/src/webview/tabwidget.cpp +++ b/src/webview/tabwidget.cpp @@ -282,7 +282,7 @@ void TabWidget::closeTab(int index) // disconnect(weView(index), SIGNAL(siteIconChanged()), p_QupZilla->locationBar(), SLOT(siteIconChanged())); // disconnect(weView(index), SIGNAL(showUrl(QUrl)), p_QupZilla->locationBar(), SLOT(showUrl(QUrl))); disconnect(webView, SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int))); - disconnect(webView, SIGNAL(changed()), mApp, SLOT(setChanged())); + disconnect(webView, SIGNAL(changed()), mApp, SLOT(setStateChanged())); disconnect(webView, SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString))); //Save last tab url and history m_closedTabsManager->saveView(webView); diff --git a/translations/cs_CZ.ts b/translations/cs_CZ.ts index 84a0df04f..c4109bd7c 100644 --- a/translations/cs_CZ.ts +++ b/translations/cs_CZ.ts @@ -296,102 +296,102 @@ p, li { white-space: pre-wrap; } Adresa - + Delete Odstranit - + Del Del - + Add Folder Přidat složku - + Add new folder Přidat složku - + Choose name for new bookmark folder: Zvolte jméno pro novou složku: - + New Tab Nový panel - - - - - + + + + + Bookmarks In Menu Záložky v menu - - - - - + + + + + Bookmarks In ToolBar Panel záložek - + Open link in actual &tab Otevřít odkaz v &aktuálním panelu - + Open link in &new tab Otevřít odkaz v novém &panelu - + Move bookmark to &folder Přesunout záložku do &složky - + &Close &Zavřít - - - + + + Unsorted Bookmarks Nesetříděné záložky - + <b>Warning: </b>You already have this page bookmarked! <b>Upozornění: </b>Tuto stránku již máte v záložkách! - + Choose name and location of bookmark. Zvolte jméno a umístění záložky. - + Add New Bookmark Přidat záložku - + Choose folder for bookmarks: Zvolte složku pro záložky: - + Bookmark All Tabs Přidat všechny panely do záložek @@ -572,6 +572,34 @@ p, li { white-space: pre-wrap; } Nesetříděné záložky + + BrowsingLibrary + + + Library + Knihovna + + + + Search... + Hledat... + + + + History + Historie + + + + Bookmarks + Záložky + + + + RSS + RSS + + ClearPrivateData @@ -812,6 +840,34 @@ p, li { white-space: pre-wrap; } konce relace + + Core::Internal::FancyTabWidget + + + Large sidebar + + + + + Small sidebar + + + + + Plain sidebar + + + + + Tabs on top + + + + + Icons on top + + + DownloadItem @@ -825,118 +881,118 @@ p, li { white-space: pre-wrap; } - + Remaining time unavailable Neznámý zbývající čas - + Done - %1 Hotovo - %1 - - + + Cancelled Zrušeno - + few seconds několik sekund - + seconds sekund - + minutes minut - + hours hodin - + Unknown speed Neznámá rychlost - + Unknown size Neznámá velikost - + Remaining %1 - %2 of %3 (%4) Zbývá %1 - %2 z %3 (%4) - + Cancelled - %1 Zrušeno - %1 - + Delete file Smazat soubor - + Do you want to also delete dowloaded file? Chcete také smazat stahovaný soubor? - + Open File Otevřít soubor - + Open Folder Otevřít složku - + Go to Download Page Přejít na stránku stahování - + Copy Download Link Kopírovat stahovaný odkaz - + Cancel downloading Zrušit stahování - + Clear Vyčistit - + Error Chyba - + New tab Nový panel - + Not found Soubor neexistuje - + Sorry, the file %1 was not found! @@ -945,12 +1001,12 @@ p, li { white-space: pre-wrap; } nebyl nalezen! - + Error: Cannot write to file! Chyba: Nelze zapisovat do souboru! - + Error: Chyba: @@ -1062,67 +1118,57 @@ nebyl nalezen! Historie - - Search in history: - Vyhledávat v historii: - - - + Title Titulek - + Url Adresa - + Delete Odstranit - + Del Del - + Clear All History Vymazat celou historii - - Search - Vyhledávání - - - + New Tab Nový panel - + Open link in actual tab Otevřít odkaz v aktuálním panelu - + Open link in new tab Otevřít odkaz v novém panelu - + Close Zavřít - + Confirmation Potvrzení - + Are you sure to delete all history? Opravdu chcete vymazat celou historii? @@ -1211,12 +1257,12 @@ nebyl nalezen! MainApplication - + Last session crashed Poslední relace spadla - + <b>QupZilla crashed :-(</b><br/>Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state? <b>QupZilla spadla :-(</b><br/>Oops, poslední relace QupZilly skončila jejím pádem. Velice se omlouváme. Přejete si obnovit uložený stav? @@ -2332,7 +2378,7 @@ nebyl nalezen! Defaultní - + Start Private Browsing Spustit anonymní prohlížení @@ -2490,48 +2536,48 @@ nebyl nalezen! Předvo&lby - - + + Web Inspector Web Inspektor - + Open file... Otevřít soubor... - + Are you sure you want to turn on private browsing? Jste si jistý že chcete zapnout soukromé prohlížení? - + When private browsing is turned on, some actions concerning your privacy will be disabled: Se zapnutým soukromým prohlížením jsou některé akce týkající se soukromí vypnuty: - + Webpages are not added to the history. Stránky nejsou přidávány do historie. - + New cookies are not stored, but current cookies can be accessed. Nové cookies nejsou přijímány, ale současné cookies jsou zasílány. - + Your session won't be stored. Vaše relace nebude uložena. - + Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened. Než zavřete prohlížeč, stále můžete použít tlačítka Zpět a Vpřed k vrácení se na stránky které jste otevřeli. - + There are still %1 open tabs and your session won't be stored. Are you sure to quit? Ještě je otevřeno %1 panelů a Vaše relace nebude uložena. Opravdu chcete skončit? @@ -2571,69 +2617,69 @@ Prosím přidejte si nějaký kliknutím na RSS ikonku v navigačním řádku.Smazat kanál - + News Novinky - - + + Loading... Načítám... - + Fill title and URL of a feed: Vyplňte titulek a adresu kanálu: - + Feed title: Titulek kanálu: - + Feed URL: Adresa kanálu: - + Edit RSS Feed Upravit kanál - + Open link in actual tab Otevřít odkaz v aktuálním panelu - + Open link in new tab Otevřít odkaz v novém panelu - + Close Zavřít - - + + New Tab Nový panel - + Error in fetching feed Chyba při stahování kanálu - + RSS feed duplicated Duplikovaný kanál - + You already have this feed. Tento kanál již odebíráte. diff --git a/translations/sk_SK.ts b/translations/sk_SK.ts index 90abbeb7c..b9a2d0ae9 100644 --- a/translations/sk_SK.ts +++ b/translations/sk_SK.ts @@ -300,102 +300,102 @@ p, li { white-space: pre-wrap; } Adresa - + Delete Odstrániť - + Del Del - + Add Folder Pridať zložku - + Add new folder Pridať novú zložku - + Choose name for new bookmark folder: Zvoľte meno pre novú zložku: - + New Tab Nový panel - - - - - + + + + + Bookmarks In Menu Záložky v menu - - - - - + + + + + Bookmarks In ToolBar Panel záložiek - + Open link in actual &tab Otvoriť odkaz v &aktuálnom panely - + Open link in &new tab Otvoriť odkaz na &novom panely - + Move bookmark to &folder Presunúť záložku do &zložky - + &Close &Zavrieť - - - + + + Unsorted Bookmarks Nezotriedené záložky - + <b>Warning: </b>You already have this page bookmarked! <b>Upozornenie: </b>Túto stránku máte už v záložkách! - + Choose name and location of bookmark. Zvoľte meno a umiestnenie záložky. - + Add New Bookmark Pridať záložku - + Choose folder for bookmarks: Zvoľte zložku pre záložku: - + Bookmark All Tabs Pridať všetky panely do záložiek @@ -576,6 +576,34 @@ p, li { white-space: pre-wrap; } Nezotriedené záložky + + BrowsingLibrary + + + Library + + + + + Search... + Hľadať... + + + + History + História + + + + Bookmarks + Záložky + + + + RSS + + + ClearPrivateData @@ -815,6 +843,34 @@ p, li { white-space: pre-wrap; } Konca relácie + + Core::Internal::FancyTabWidget + + + Large sidebar + + + + + Small sidebar + + + + + Plain sidebar + + + + + Tabs on top + + + + + Icons on top + + + DownloadItem @@ -828,118 +884,118 @@ p, li { white-space: pre-wrap; } - + Remaining time unavailable Neznámy zostávajúci čas - + Done - %1 Dokončené - %1 - - + + Cancelled Zrušené - + few seconds pár sekúnd - + seconds sekúnd - + minutes minút - + hours hodín - + Unknown speed Neznáma rýchslosť - + Unknown size Neznáma veľkosť - + Remaining %1 - %2 of %3 (%4) Zostáva %1 - %2 z %3 (%4) - + Cancelled - %1 Zrušene - %1 - + Delete file Vymazať súbor - + Do you want to also delete dowloaded file? Chcete zmazať sťahovaný súbor? - + Open File Otvoriť súbor - + Open Folder Otvoriť priečinok - + Go to Download Page Prejsť k sťahovanie stránke - + Copy Download Link Kopírovať sťahovaný odkaz - + Cancel downloading Zrušiť sťahovanie - + Clear Vyčistiť - + Error Chyba - + New tab Nový panel - + Not found Súbor neexistuje - + Sorry, the file %1 was not found! @@ -948,12 +1004,12 @@ p, li { white-space: pre-wrap; } nebol nájdený! - + Error: Cannot write to file! Chyba: Nejde zapisovať do súboru! - + Error: Chyba: @@ -1065,67 +1121,57 @@ p, li { white-space: pre-wrap; } História - - Search in history: - Hľadať v histórii: - - - + Title Názov - + Url Adresa - + Delete Vymazať - + Del Del - + Clear All History Vymazať celú históriu - - Search - Hľadať - - - + New Tab Nový panel - + Open link in actual tab Otvoriť odkaz v aktuálnom panely - + Open link in new tab Otvoriť odkaz na novom panely - + Close Zavrieť - + Confirmation Potvrdenie - + Are you sure to delete all history? Skutočne chcete vymazať celú históriu? @@ -1213,12 +1259,12 @@ p, li { white-space: pre-wrap; } MainApplication - + Last session crashed Posledná relácia spadla - + <b>QupZilla crashed :-(</b><br/>Oops, last session of QupZilla ends with its crash. We are very sorry. Would you try to restore saved state? <b>QupZilla spadla :-(</b><br/>Oops, posledná relácia QupZilly skončila chybou. Prepáčte. Chcete obnoviť uložený stav? @@ -2334,7 +2380,7 @@ p, li { white-space: pre-wrap; } Základné - + Start Private Browsing Spustiť anonymné prehliadanie @@ -2491,48 +2537,48 @@ p, li { white-space: pre-wrap; } Pr&edvoľby - - + + Web Inspector Web inšpektor - + Open file... Otvoriť súbor... - + Are you sure you want to turn on private browsing? Ste si istý, že chcete zapnúť súkromné prehliadanie? - + When private browsing is turned on, some actions concerning your privacy will be disabled: So zapnutým súkromným prehliadaním sú niektoré akcie týkajúce sa súkromia vypnuté: - + Webpages are not added to the history. Stránky nie sú pridávané do histórie. - + New cookies are not stored, but current cookies can be accessed. Nové cookies nie sú prijímané, ale súčasné cookies sú zasielané. - + Your session won't be stored. Vaša relácia nebude uložená. - + Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened. Dokiaľ nezavriete prehliadač, tak stále môžete používať tlačidla Späť a Dopredu k vráteniu sa na stránky, ktoré ste mali otvorené. - + There are still %1 open tabs and your session won't be stored. Are you sure to quit? Stále sú otvorené %1 panely a Vaša relácia nebude uložená. Skutočne chcete skončiť? @@ -2572,69 +2618,69 @@ Prosím pridajte si nejaký kliknutím na RSS ikonku v navigačnom riadku.Zmazať kanál - + News Novinky - - + + Loading... Nahrávam... - + Fill title and URL of a feed: Vyplnte názov a adresu kanálu: - + Feed title: Názov kanálu: - + Feed URL: Adresa kanálu: - + Edit RSS Feed Upraviť RSS - + Open link in actual tab Otvoriť odkaz v aktuálnom panely - + Open link in new tab Otvoriť odkaz na novom panely - + Close Zavrieť - - + + New Tab Nový panel - + Error in fetching feed Chyba pri sťahovaní kanálu - + RSS feed duplicated Duplikovaný kanál - + You already have this feed. Tento kanál už odoberáte.