Skip to content
Snippets Groups Projects
Commit 36e63e98 authored by Matěj Laitl's avatar Matěj Laitl
Browse files

OrganizeCollectionDialog: hide complex options behind a button

In commit 7c780bf5, Ralf addressed bug 283361 by only showing the preview
table when the screen is large enough, which I believe went too far.

This is a bit different approach, the file scheme and other options are
hidden behind the Options button when the dialog is shown, making it much
more cleaner. The rationale is that the user usually sets up the options
once, not every time (and beginner users may be happy with the default
schema right away).

BUG: 327201
FIXED-IN: 2.9
parent f6492f5b
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,8 @@ VERSION 2.9-Beta 1
compilers currently supported by KDE.
BUGFIXES:
* Always show preview in Organize Files dialog, hide complicated options behind
a button. (BR 327201)
* Fix sound glitch with fade-out on pause and GStreamer. (BR 323729)
* Fix a bug in Organize Collection functionality that could lead to assertion failures
later on. (BR 322474)
......
......@@ -180,17 +180,18 @@ OrganizeCollectionDialog::OrganizeCollectionDialog( const Meta::TrackList &track
ui->optionsWidget->setRegexpText( AmarokConfig::replacementRegexp() );
ui->optionsWidget->setReplaceText( AmarokConfig::replacementString() );
// save some space if the screensize is too small (BR: 283361)
const QRect screenRect = QApplication::desktop()->screenGeometry();
if( screenRect.height() < 800 )
ui->previewTableWidget->hide();
ui->previewTableWidget->horizontalHeader()->setResizeMode( QHeaderView::ResizeToContents );
ui->conflictLabel->setText("");
QPalette p = ui->conflictLabel->palette();
KColorScheme::adjustForeground( p, KColorScheme::NegativeText ); // TODO this isn't working, the color is still normal
ui->conflictLabel->setPalette( p );
// only show the options when the Options button is checked
connect( ui->optionsButton, SIGNAL(toggled(bool)), ui->organizeCollectionWidget, SLOT(setVisible(bool)) );
connect( ui->optionsButton, SIGNAL(toggled(bool)), ui->optionsWidget, SLOT(setVisible(bool)) );
ui->organizeCollectionWidget->hide();
ui->optionsWidget->hide();
// to show the conflict error
connect( ui->overwriteCheck, SIGNAL(stateChanged(int)),
SLOT(slotUpdatePreview()) );
......
......@@ -25,21 +25,12 @@
<layout class="QHBoxLayout" name="horizontalLayout_1">
<item>
<widget class="QLabel" name="folderLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Base directory under which to put files</string>
</property>
<property name="text">
<string>C&amp;ollection Folder:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="buddy">
<cstring>folderCombo</cstring>
</property>
......@@ -61,6 +52,28 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="optionsButton">
<property name="toolTip">
<string>&lt;html&gt;Show/hide additional controls to speficy destination track paths based on their metadata.&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;Show/hide additional controls to speficy destination track paths based on their metadata.&lt;/html&gt;</string>
</property>
<property name="text">
<string>Options</string>
</property>
<property name="icon">
<iconset theme="arrow-down"/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
......@@ -119,32 +132,16 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="conflictLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="conflictLabel"/>
</item>
<item>
<spacer name="spacer2_2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>150</width>
<width>40</width>
<height>20</height>
</size>
</property>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment