diff options
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/rsswidget.cpp | 26 | ||||
-rw-r--r-- | src/urlbar/urlresolver.cpp | 4 |
2 files changed, 22 insertions, 8 deletions
diff --git a/src/urlbar/rsswidget.cpp b/src/urlbar/rsswidget.cpp index 395d7bab..35095c07 100644 --- a/src/urlbar/rsswidget.cpp +++ b/src/urlbar/rsswidget.cpp @@ -56,26 +56,35 @@ RSSWidget::RSSWidget(const QMap< KUrl, QString > &map, QWidget *parent) , m_map(map) { setAttribute(Qt::WA_DeleteOnClose); - setFixedWidth(250); + + setMinimumWidth(200); setFrameStyle(Panel); QFormLayout *layout = new QFormLayout(this); setLayout(layout); + QLabel *title = new QLabel(this); + title->setText(i18n("<h4>Subscribe to RSS Feeds</h4>")); + layout->addRow(title); + + // Agregators QLabel *agregator = new QLabel(this); agregator->setText(i18n("Aggregator:")); m_agregators = new KComboBox(this); - m_agregators->addItem(KIcon("application-rss+xml"), QString("Akregator")); + m_agregators->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + + m_agregators->addItem(KIcon("akregator"), QString("Akregator")); m_agregators->addItem(Application::icon(KUrl("http://google.com/reader")), i18n("Google Reader")); layout->addRow(agregator, m_agregators); - + // Feeds List QLabel *feed = new QLabel(this); feed->setText(i18n("Feed:")); m_feeds = new KComboBox(this); + m_feeds->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); foreach(const QString &title, m_map) { @@ -84,13 +93,16 @@ RSSWidget::RSSWidget(const QMap< KUrl, QString > &map, QWidget *parent) layout->addRow(feed, m_feeds); - - QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); - buttonBox->button(QDialogButtonBox::Ok)->setText(i18n("Add Feed")); + // Buttons + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel, Qt::Horizontal, this); + + QPushButton *addFeed = new QPushButton(KIcon("list-add"), i18n("Add Feed"), buttonBox); + buttonBox->addButton(addFeed, QDialogButtonBox::AcceptRole); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); - layout->addWidget(buttonBox); + layout->addRow(buttonBox); } diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index 4313d569..21e3fe9c 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -76,6 +76,8 @@ UrlResolver::UrlResolver(const QString &typedUrl) QString protocol = "^(http://|https://|file://|ftp://)"; + QString local = "^/"; + QString ipv4 = "^0*([1-9]?\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.0*([1-9]?\\d|1\\d\\d|2[0-4]\\d|25[0-5])"\ "\\.0*([1-9]?\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.0*([1-9]?\\d|1\\d\\d|2[0-4]\\d|25[0-5])"; @@ -89,7 +91,7 @@ UrlResolver::UrlResolver(const QString &typedUrl) "y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|"\ "pro)"; - _browseRegexp = QRegExp("(" + protocol + ")|(" + address + ")|(" + ipv6 + ")|(" + ipv4 +")"); + _browseRegexp = QRegExp("(" + protocol + ")|(" + local + ")|(" + address + ")|(" + ipv6 + ")|(" + ipv4 +")"); } } |