| Summary: | Please remove "create data cd" from context menus by default | ||
|---|---|---|---|
| Product: | [Applications] k3b | Reporter: | Andrew Kohlsmith <akohlsmith-kde> |
| Component: | general | Assignee: | Sebastian Trueg <trueg> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Andrew Kohlsmith
2005-11-15 14:29:35 UTC
SVN commit 607365 by trueg:
* Audio project not modified after loading anymore (this was caused by
stupid QListViewItem::paintCell which actually calls setText,
apperantly to initialize the column info.)
* Fixed K3bMixedDoc::isModified
* Made the konqueror service menus configurable (i.e. one can disable
them)
* Added a first run dialog which asks if the konqi service menus should
be anabled or not.
BUGS: 116423, 95113
M +0 -2 libk3b/projects/audiocd/k3baudiodoc.cpp
M +1 -1 libk3b/projects/k3bdoc.h
M +8 -2 libk3b/projects/mixedcd/k3bmixeddoc.cpp
M +1 -0 libk3b/projects/mixedcd/k3bmixeddoc.h
M +1 -1 src/Makefile.am
M +3 -0 src/k3bapplication.cpp
A src/k3bfirstrun.cpp [License: GPL (v2+)]
A src/k3bfirstrun.h [License: GPL (v2+)]
M +2 -0 src/k3bprojectmanager.cpp
A src/k3bservicemenuinstaller.cpp [License: GPL (v2+)]
A src/k3bservicemenuinstaller.h [License: GPL (v2+)]
M +3 -2 src/k3bstatusbarmanager.cpp
M +5 -4 src/konqi/Makefile.am
M +19 -8 src/option/base_k3bmiscoptiontab.ui
M +10 -0 src/option/k3bmiscoptiontab.cpp
M +5 -1 src/projects/k3baudiodatasourceviewitem.cpp
M +12 -3 src/projects/k3baudiotrackviewitem.cpp
--- trunk/extragear/multimedia/k3b/libk3b/projects/audiocd/k3baudiodoc.cpp #607364:607365
@@ -37,7 +37,6 @@
#include <qdir.h>
#include <qdom.h>
#include <qdatetime.h>
-#include <qtimer.h>
#include <qtextstream.h>
#include <qsemaphore.h>
@@ -974,7 +973,6 @@
{
kdDebug() << "(K3bAudioDoc::slotTrackChanged " << track << endl;
setModified( true );
- emit changed();
// if the track is empty now we simply delete it
if( track->firstSource() )
emit trackChanged(track);
--- trunk/extragear/multimedia/k3b/libk3b/projects/k3bdoc.h #607364:607365
@@ -99,7 +99,7 @@
/**
* sets the modified flag for the document after a modifying action on the view connected to the document.
*/
- void setModified( bool m = true );
+ virtual void setModified( bool m = true );
/**
* returns if the document is modified or not. Use this to determine
--- trunk/extragear/multimedia/k3b/libk3b/projects/mixedcd/k3bmixeddoc.cpp #607364:607365
@@ -72,6 +72,13 @@
}
+void K3bMixedDoc::setModified( bool m )
+{
+ m_audioDoc->setModified( m );
+ m_dataDoc->setModified( m );
+}
+
+
bool K3bMixedDoc::isModified() const
{
return ( m_audioDoc->isModified() || m_dataDoc->isModified() );
@@ -198,8 +205,7 @@
}
mixedElem.appendChild( mixedTypeElem );
- m_audioDoc->setModified( false );
- m_dataDoc->setModified( false );
+ setModified( false );
return true;
}
--- trunk/extragear/multimedia/k3b/libk3b/projects/mixedcd/k3bmixeddoc.h #607364:607365
@@ -42,6 +42,7 @@
bool newDocument();
+ void setModified( bool m = true );
bool isModified() const;
KIO::filesize_t size() const;
--- trunk/extragear/multimedia/k3b/src/Makefile.am #607364:607365
@@ -23,7 +23,7 @@
k3bwidgetshoweffect.cpp k3bmediaselectiondialog.cpp k3bdiskinfoview.cpp \
k3bpassivepopup.cpp k3btimeoutwidget.cpp k3bminibutton.cpp \
k3bthemedheader.cpp k3bthemedlabel.cpp k3blsofwrapper.cpp \
- k3blsofwrapperdialog.cpp
+ k3blsofwrapperdialog.cpp k3bservicemenuinstaller.cpp k3bfirstrun.cpp
k3b_LDADD = ./option/liboption.la ./rip/librip.la \
./projects/libprojects.la ../libk3bdevice/libk3bdevice.la \
--- trunk/extragear/multimedia/k3b/src/k3bapplication.cpp #607364:607365
@@ -25,6 +25,7 @@
#include "k3bmediacache.h"
#include "k3bpassivepopup.h"
#include "k3blsofwrapperdialog.h"
+#include "k3bfirstrun.h"
#include <k3bcore.h>
#include <k3bdevicemanager.h>
@@ -142,6 +143,8 @@
emit initializationDone();
+ K3bFirstRun::run( m_mainWindow );
+
if( K3bSystemProblemDialog::readCheckSystemConfig() ) {
emit initializationInfo( i18n("Checking System") );
K3bSystemProblemDialog::checkSystem( m_mainWindow );
--- trunk/extragear/multimedia/k3b/src/k3bprojectmanager.cpp #607364:607365
@@ -560,6 +560,8 @@
// FIXME: find a better way to tell everyone (especially the projecttabwidget)
// that the doc is not changed
emit projectSaved( newDoc );
+
+ kdDebug() << "(K3bProjectManager) loading project done." << endl;
}
else {
delete newDoc;
--- trunk/extragear/multimedia/k3b/src/k3bstatusbarmanager.cpp #607364:607365
@@ -24,6 +24,7 @@
#include <k3baudiodoc.h>
#include <k3bdatadoc.h>
#include <k3bmixeddoc.h>
+#include <k3bvcddoc.h>
#include <k3bdiritem.h>
#include <kiconloader.h>
@@ -193,8 +194,8 @@
}
case K3bDoc::VCD: {
- K3bDataDoc* dataDoc = static_cast<K3bDataDoc*>( doc );
- m_labelProjectInfo->setText( i18n("Video CD (%1)").arg(dataDocStats(dataDoc)) );
+ K3bVcdDoc* vcdDoc = static_cast<K3bVcdDoc*>( doc );
+ m_labelProjectInfo->setText( i18n("Video CD (1 track)", "Video CD (%n tracks)", vcdDoc->numOfTracks() ) );
break;
}
--- trunk/extragear/multimedia/k3b/src/konqi/Makefile.am #607364:607365
@@ -1,13 +1,14 @@
-
-konqservice_DATA = k3b_create_data_cd.desktop \
+k3bservice_DATA = k3b_create_data_cd.desktop \
k3b_create_data_dvd.desktop \
k3b_create_audio_cd.desktop \
k3b_create_video_cd.desktop \
k3b_write_bin_image.desktop \
- k3b_write_iso_image.desktop \
- k3b_audiocd_rip.desktop \
+ k3b_write_iso_image.desktop
+
+konqservice_DATA = k3b_audiocd_rip.desktop \
k3b_videodvd_rip.desktop \
k3b_cd_copy.desktop \
k3b_dvd_copy.desktop
+k3bservicedir = $(kde_datadir)/k3b/servicemenus
konqservicedir = $(kde_datadir)/konqueror/servicemenus
--- trunk/extragear/multimedia/k3b/src/option/base_k3bmiscoptiontab.ui #607364:607365
@@ -4,13 +4,8 @@
<property name="name">
<cstring>base_K3bMiscOptionTab</cstring>
</property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>467</width>
- <height>392</height>
- </rect>
+ <property name="caption">
+ <string>base_K3bMiscOptionTab</string>
</property>
<vbox>
<property name="name">
@@ -192,6 +187,22 @@
<string><p>If this option is checked K3b will not close action dialogs such as the CD Copy dialog after the process has been finished. It will be kept open to start a new process like copying another CD.</string>
</property>
</widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_checkKonqiIntegration</cstring>
+ </property>
+ <property name="text">
+ <string>Enable Konqueror integration</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enable integration of K3b actions into Konqueror menus</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string><p>K3b can integrate itself into Konqueror. This integration allows to start K3b from the context menu in the file manager.
+<p>A typical example is: in order to burn a folder to a data CD one clicks on the folder using the right mouse button. In the appearing context menu one selects "Create Data CD with K3b..." and a new K3b project containing the folder is created.
+<p><em>Konqueror integration is not enabled by default to prevent unwanted cluttering of the Konqueror menus.</em></string>
+ </property>
+ </widget>
</vbox>
</widget>
<spacer>
@@ -207,7 +218,7 @@
<property name="sizeHint">
<size>
<width>31</width>
- <height>20</height>
+ <height>0</height>
</size>
</property>
</spacer>
--- trunk/extragear/multimedia/k3b/src/option/k3bmiscoptiontab.cpp #607364:607365
@@ -20,6 +20,7 @@
#include <k3baudiooutputplugin.h>
#include <k3baudioserver.h>
#include <k3bcore.h>
+#include <k3bservicemenuinstaller.h>
#include <qcheckbox.h>
#include <qfileinfo.h>
@@ -78,6 +79,9 @@
m_comboAudioOutputSystem->setCurrentItem( c->readEntry( "Audio Output System", "arts" ), false );
m_buttonConfigureAudioOutput->setEnabled( m_comboAudioOutputSystem->count() > 0 );
+
+ K3bServiceInstaller si;
+ m_checkKonqiIntegration->setChecked( si.allInstalled() );
}
@@ -142,6 +146,12 @@
K3bAudioServer::instance()->setOutputMethod( m_comboAudioOutputSystem->currentText().local8Bit() );
}
+ K3bServiceInstaller si;
+ if( m_checkKonqiIntegration->isChecked() )
+ si.install( this );
+ else
+ si.remove( this );
+
return true;
}
--- trunk/extragear/multimedia/k3b/src/projects/k3baudiodatasourceviewitem.cpp #607364:607365
@@ -69,11 +69,15 @@
void K3bAudioDataSourceViewItem::setText( int col, const QString& text )
{
+ //
+ // See K3bAudioTrackViewItem::setText for an explanation why we have to check if
+ // the value really changed
+ //
if( col == 4 ) {
if( K3bAudioZeroData* zero = dynamic_cast<K3bAudioZeroData*>( source() ) ) {
bool ok;
K3b::Msf f = K3b::Msf::fromString( text, &ok );
- if( ok )
+ if( ok && f != zero->length() )
zero->setLength( f );
}
}
--- trunk/extragear/multimedia/k3b/src/projects/k3baudiotrackviewitem.cpp #607364:607365
@@ -112,7 +112,7 @@
case 0:
return QString::number( m_track->trackNumber() ).rightJustify( 2, ' ' );
case 1:
- return m_track->artist();
+ return m_track->performer();
case 2:
return m_track->title();
case 3:
@@ -134,13 +134,22 @@
void K3bAudioTrackViewItem::setText( int col, const QString& text )
{
+ //
+ // Stupid QListViewItem actually calls setText in paintCell. Thus, once a new item
+ // is created setText is called and in turn the doc is marked as modified since
+ // we call setArtist or setPerformer here! :(
+ //
+ // Quick fix: check if the field actually changed
+ //
if( col == 1 ) {
// this is the cd-text artist field
- m_track->setArtist( text );
+ if( text != m_track->performer() )
+ m_track->setPerformer( text );
}
else if( col == 2 ) {
// this is the cd-text title field
- m_track->setTitle( text );
+ if( text != m_track->title() )
+ m_track->setTitle( text );
}
KListViewItem::setText( col, text );
|