[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/krdc
From: Tony Neal Murray <murraytony () gmail ! com>
Date: 2010-09-14 0:40:30
Message-ID: 20100914004030.04C3DAC88C () svn ! kde ! org
[Download RAW message or body]
SVN commit 1175043 by murrant:
Fix the focus problem by re-ordering the widget creation.
Disable selections on the connection list.
BUG: 249789
M +15 -15 mainwindow.cpp
--- trunk/KDE/kdenetwork/krdc/mainwindow.cpp #1175042:1175043
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2007 - 2010 Urs Wolfer <uwolfer @ kde.org>
-** Copyright (C) 2009 Tony Murray <murraytony @ gmail.com>
+** Copyright (C) 2009 - 2010 Tony Murray <murraytony @ gmail.com>
**
** This file is part of KDE.
**
@@ -1106,21 +1106,31 @@
{
QGroupBox *remoteDesktopsGroupWidget = new QGroupBox(m_newConnectionWidget);
QVBoxLayout *remoteDesktopsGroupLayout = new \
QVBoxLayout(remoteDesktopsGroupWidget);
- QHBoxLayout *filterLayout = new QHBoxLayout;
+
+ // set up the filter input field
+ QHBoxLayout *filterLayout = new QHBoxLayout(remoteDesktopsGroupWidget);
+ QLabel *filterLabel = new QLabel(i18nc("Verb, to remove items that don't \
match", "Filter"), remoteDesktopsGroupWidget); + KLineEdit *filterLineEdit = \
new KLineEdit(remoteDesktopsGroupWidget); + \
filterLineEdit->setClickMessage(i18n("Type here to filter the connection list.")); + \
filterLineEdit->setClearButtonShown(true); + connect(filterLineEdit, \
SIGNAL(textChanged(const QString &)), SLOT(updateFilter(const QString &))); + \
filterLayout->addWidget(filterLabel); + \
filterLayout->addWidget(filterLineEdit); + \
remoteDesktopsGroupLayout->addLayout(filterLayout); +
m_newConnectionTableView = new QTableView(remoteDesktopsGroupWidget);
m_newConnectionTableView->setModel(m_remoteDesktopsModelProxy);
// set up the view so it looks nice
m_newConnectionTableView->setItemDelegate(new \
ConnectionDelegate(m_newConnectionTableView)); \
m_newConnectionTableView->setShowGrid(false); + \
m_newConnectionTableView->setSelectionMode(QAbstractItemView::NoSelection); \
m_newConnectionTableView->verticalHeader()->hide();
m_newConnectionTableView->verticalHeader()->setDefaultSectionSize(
m_newConnectionTableView->fontMetrics().height() + 3);
m_newConnectionTableView->horizontalHeader()->setStretchLastSection(true);
-// m_newConnectionTableView->resizeColumnsToContents(); // not needed when \
resize mode is ResizeToContents
m_newConnectionTableView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
m_newConnectionTableView->setAlternatingRowColors(true);
-
// set up sorting and actions (double click open, right click custom menu)
m_newConnectionTableView->setSortingEnabled(true);
m_newConnectionTableView->sortByColumn(Settings::connectionListSortColumn(), \
Qt::SortOrder(Settings::connectionListSortOrder())); @@ -1130,18 +1140,8 @@
SLOT(openFromRemoteDesktopsModel(const QModelIndex &)));
m_newConnectionTableView->setContextMenuPolicy(Qt::CustomContextMenu);
connect(m_newConnectionTableView, \
SIGNAL(customContextMenuRequested(QPoint)), SLOT(showConnectionContextMenu(QPoint))); \
+ remoteDesktopsGroupLayout->addWidget(m_newConnectionTableView);
- // set up the filter input field
- QLabel *filterLabel = new QLabel(i18nc("Verb, to remove items that don't \
match", "Filter"), remoteDesktopsGroupWidget);
- KLineEdit *filterLineEdit = new KLineEdit(remoteDesktopsGroupWidget);
- filterLineEdit->setClickMessage(i18n("Type here to filter the connection \
list."));
- filterLineEdit->setClearButtonShown(true);
- connect(filterLineEdit, SIGNAL(textChanged(const QString &)), \
SLOT(updateFilter(const QString &)));
- filterLayout->addWidget(filterLabel);
- filterLayout->addWidget(filterLineEdit);
-
- remoteDesktopsGroupLayout->addLayout(filterLayout);
- remoteDesktopsGroupLayout->addWidget(m_newConnectionTableView);
startLayout->addWidget(remoteDesktopsGroupWidget);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic