Oops, sorry, (now I understand why they tell in techbase to attach the patch first).
On Tue, Mar 10, 2009 at 12:47 AM, Shantanu Tushar Jha <jhahon...@gmail.com>wrote: > I had to attach the patch here, somehow I can't update the diff on > reviewboard to that particular request. > I've added that If the user selects "Show Files Matching" or "Hide Files > Matching", the MIME types automatically get selected. > Please review, is it ok to commit? > > > On Mon, Mar 9, 2009 at 10:40 AM, Shantanu Tushar Jha > <jhahon...@gmail.com>wrote: > >> If we have every file-type selected on default for "Show files matching", >> that will be fine, but I'm not sure if deselecting all file types for "Hide >> files matching" would work, because if the user enters some filter, say >> "foo*" even then foo will be displayed, because its not selected in the MIME >> types (the file will if hidden if it satisfies both the conditions). So, >> should I make the MIME types enabled by default in both cases, or any better >> idea? >> >> P.S. I could not leave a comment at reviewboard, because due to some >> reason, its not showing be logged in on this particular page. >> >> >> On Mon, Mar 9, 2009 at 3:03 AM, Matthias Fuchs <ma...@gmx.net> wrote: >> >>> >>> >>> > On 2009-03-08 12:29:21, Chani wrote: >>> > > the patch itself looks fine, but... isn't there a way we can make the >>> UI better so that there's no need for a tooltip at all? >>> >>> One way to avoid unwanted behavior without changing the ui would be to >>> have every file-type selected on default for "Show files matching" and >>> having none selected for "Hide files matching". >>> >>> Imo that way it would be more clear how filtering works. >>> >>> >>> - Matthias >>> >>> >>> ----------------------------------------------------------- >>> This is an automatically generated e-mail. To reply, visit: >>> http://reviewboard.kde.org/r/262/#review413 >>> ----------------------------------------------------------- >>> >>> >>> On 2009-03-08 09:58:46, Shantanu Tushar Jha wrote: >>> > >>> > ----------------------------------------------------------- >>> > This is an automatically generated e-mail. To reply, visit: >>> > http://reviewboard.kde.org/r/262/ >>> > ----------------------------------------------------------- >>> > >>> > (Updated 2009-03-08 09:58:46) >>> > >>> > >>> > Review request for Plasma. >>> > >>> > >>> > Summary >>> > ------- >>> > >>> > This changes the UI for the configuration page "Filter" for the applet >>> folderview. As seen in the bug 186283, files are only displayed if they >>> match both the pattern and the MIME type. But there is no obvious indication >>> to this behavior in the interface. >>> > Added a label "Can't see files?" which has a tooltip explaining the >>> above behavior. (screenshot attached) >>> > Please review, and if found helpful, commit it, as I don't have a svn >>> account. >>> > >>> > >>> > This addresses bug 186283. >>> > https://bugs.kde.org/show_bug.cgi?id=186283 >>> > >>> > >>> > Diffs >>> > ----- >>> > >>> > >>> trunk/KDE/kdebase/apps/plasma/applets/folderview/folderviewFilterConfig.ui >>> 936718 >>> > >>> > Diff: http://reviewboard.kde.org/r/262/diff >>> > >>> > >>> > Testing >>> > ------- >>> > >>> > On latest svn trunk build. >>> > >>> > >>> > Screenshots >>> > ----------- >>> > >>> > Filter config page >>> > http://reviewboard.kde.org/r/262/s/52/ >>> > >>> > >>> > Thanks, >>> > >>> > Shantanu >>> > >>> > >>> >>> >> >> >> -- >> Shantanu Tushar >> http://www.shantanutushar.com >> > > > > -- > Shantanu Tushar > http://www.shantanutushar.com > -- Shantanu Tushar http://www.shantanutushar.com
Index: folderviewFilterConfig.ui =================================================================== --- folderviewFilterConfig.ui (revision 937361) +++ folderviewFilterConfig.ui (working copy) @@ -1,7 +1,8 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>folderviewFilterConfig</class> - <widget class="QWidget" name="folderviewFilterConfig" > - <property name="geometry" > + <widget class="QWidget" name="folderviewFilterConfig"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> @@ -9,137 +10,163 @@ <height>375</height> </rect> </property> - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize" > + <property name="minimumSize"> <size> <width>500</width> <height>0</height> </size> </property> - <layout class="QVBoxLayout" name="verticalLayout_2" > + <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <widget class="QComboBox" name="filterType" > + <widget class="QComboBox" name="filterType"> + <property name="toolTip"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you have selected "Show Files Matching" or "Hide Files Matching", only the files matching BOTH the conditions will be shown or hidden respectively.</p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For example, if you have "*" as your pattern, but have nothing selected in the MIME types, no files will be shown.</p></body></html></string> + </property> + <property name="whatsThis"> + <string/> + </property> <item> - <property name="text" > + <property name="text"> <string>Show All Files</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Show Files Matching</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Hide Files Matching</string> </property> </item> </widget> </item> <item> - <widget class="QFrame" name="fileFilters" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QFrame" name="fileFilters"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>10</verstretch> </sizepolicy> </property> - <property name="frameShape" > + <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> - <property name="frameShadow" > + <property name="frameShadow"> <enum>QFrame::Plain</enum> </property> - <property name="lineWidth" > + <property name="lineWidth"> <number>0</number> </property> - <layout class="QGridLayout" name="gridLayout_3" > - <property name="margin" > + <layout class="QGridLayout" name="gridLayout_3"> + <property name="margin"> <number>0</number> </property> - <property name="spacing" > + <property name="spacing"> <number>0</number> </property> - <item row="0" column="1" > - <layout class="QGridLayout" name="mimeTypeLayout" > - <property name="horizontalSpacing" > + <item row="0" column="1"> + <layout class="QGridLayout" name="mimeTypeLayout"> + <property name="horizontalSpacing"> <number>0</number> </property> - <property name="verticalSpacing" > + <property name="verticalSpacing"> <number>4</number> </property> - <property name="margin" > + <property name="margin"> <number>0</number> </property> - <item row="5" column="0" > - <layout class="QHBoxLayout" name="horizontalLayout" > - <property name="spacing" > + <item row="5" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> <number>0</number> </property> - <property name="margin" > + <property name="margin"> <number>0</number> </property> <item> - <widget class="QListView" name="filterFilesList" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <widget class="QListView" name="filterFilesList"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="selectionMode" > + <property name="selectionMode"> <enum>QAbstractItemView::NoSelection</enum> </property> - <property name="flow" > + <property name="flow"> <enum>QListView::TopToBottom</enum> </property> - <property name="uniformItemSizes" > + <property name="uniformItemSizes"> <bool>true</bool> </property> </widget> </item> <item> - <layout class="QVBoxLayout" name="verticalLayout" > - <property name="spacing" > + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> <number>4</number> </property> - <property name="leftMargin" > + <property name="leftMargin"> <number>4</number> </property> - <property name="topMargin" > + <property name="topMargin"> <number>0</number> </property> - <property name="rightMargin" > + <property name="rightMargin"> <number>0</number> </property> - <property name="bottomMargin" > + <property name="bottomMargin"> <number>0</number> </property> <item> - <widget class="QPushButton" name="selectAll" > - <property name="text" > + <widget class="QPushButton" name="selectAll"> + <property name="text"> <string>Select All</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="deselectAll" > - <property name="text" > + <widget class="QPushButton" name="deselectAll"> + <property name="text"> <string>Deselect All</string> </property> </widget> </item> <item> - <spacer name="verticalSpacer" > - <property name="orientation" > + <widget class="QLabel" name="label"> + <property name="toolTip"> + <string>Note that if you have selected "Show Files Matching" or "Hide Files Matching", +only the files matching BOTH the conditions will be shown or hidden respectively. +For example, if you have "*" as your pattern, but have nothing selected in the MIME types, no files will be shown.</string> + </property> + <property name="text"> + <string><a href="null">Can't See Files?</a></string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> @@ -151,54 +178,54 @@ </item> </layout> </item> - <item row="3" column="0" > - <widget class="KLineEdit" name="searchMimetype" > - <property name="clickMessage" > + <item row="3" column="0"> + <widget class="KLineEdit" name="searchMimetype"> + <property name="clickMessage"> <string>Search file type</string> </property> - <property name="showClearButton" stdset="0" > + <property name="showClearButton" stdset="0"> <bool>true</bool> </property> </widget> </item> - <item row="2" column="0" > - <widget class="QLabel" name="fileTypesLabel" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="fileTypesLabel"> + <property name="text"> <string>File types:</string> </property> </widget> </item> - <item row="0" column="0" > - <widget class="QLabel" name="fileNameLabel" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="fileNameLabel"> + <property name="text"> <string>File name pattern:</string> </property> </widget> </item> - <item row="1" column="0" > - <widget class="KLineEdit" name="filterFilesPattern" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Expanding" > + <item row="1" column="0"> + <widget class="KLineEdit" name="filterFilesPattern"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="toolTip" > + <property name="toolTip"> <string>Space-separated list of extensions, e.g. *.txt *.od*</string> </property> - <property name="whatsThis" > + <property name="whatsThis"> <string>Space-separated list of extensions, e.g. *.txt *.od* to display only office- and text-files</string> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> </property> - <property name="urlDropsEnabled" > + <property name="urlDropsEnabled"> <bool>false</bool> </property> - <property name="clickMessage" > + <property name="clickMessage"> <string>Pattern filter</string> </property> - <property name="showClearButton" stdset="0" > + <property name="showClearButton" stdset="0"> <bool>true</bool> </property> </widget> @@ -218,7 +245,7 @@ </customwidget> </customwidgets> <includes> - <include location="global" >KDE/KUrlRequester</include> + <include location="global">KDE/KUrlRequester</include> </includes> <resources/> <connections/> Index: folderview.cpp =================================================================== --- folderview.cpp (revision 937361) +++ folderview.cpp (working copy) @@ -1353,6 +1353,12 @@ uiFilter.filterFilesList->setEnabled(index != 0); uiFilter.selectAll->setEnabled(index != 0); uiFilter.deselectAll->setEnabled(index != 0); + if (index != 0) { + for (int i = 0; i < uiFilter.filterFilesList->model()->rowCount(); i++) { + const QModelIndex index = uiFilter.filterFilesList->model()->index(i, 0); + uiFilter.filterFilesList->model()->setData(index, Qt::Checked, Qt::CheckStateRole); + } + } } void FolderView::selectUnselectAll()
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel