Bug 135872 - "save as" works, "save" does not
Summary: "save as" works, "save" does not
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-18 11:07 UTC by Maciej Pilichowski
Modified: 2006-10-30 15:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
1. (43.58 KB, image/png)
2006-10-27 17:31 UTC, Maciej Pilichowski
Details
2 (42.77 KB, image/png)
2006-10-27 17:32 UTC, Maciej Pilichowski
Details
3 (43.58 KB, image/png)
2006-10-27 17:34 UTC, Maciej Pilichowski
Details
mockup (42.44 KB, image/png)
2006-10-30 14:00 UTC, Maciej Pilichowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2006-10-18 11:07:06 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs

0.12.17.

New dvd project -> add some files -> burn -> no burner detected, no possibility of burning so... -> save. Nothing happens (just dialog closes).

"Save as" from menu --> works.
Comment 1 Sharan Rao 2006-10-24 15:43:28 UTC
The "Save as" option in the menu saves the current project. 
Whereas the Save button in the burn dialog saves the burn settings.
Hope that helps.
Comment 2 Maciej Pilichowski 2006-10-24 16:32:38 UTC
:-) Well, I believe those were intentions, but when I say "nothing happens" --> nothing happens. As you can see above there was no project named, so I assume k3b should ask me about the name, right?

Btw. I am talking about save from burn dialog, not from the menu.
Comment 3 Sebastian Trueg 2006-10-26 10:12:10 UTC
No, just read the toolip for the save button. It is intended to save the settings to the project not the project to a file. Maybe the button should be renamed to avoid confusion.
Any ideas?
Comment 4 Maciej Pilichowski 2006-10-26 14:12:16 UTC
I am confused what it really does, because I can still see no difference close vs. save. And there is no feedback at all (no save dialog either).
Comment 5 Sebastian Trueg 2006-10-26 15:14:21 UTC
sure not. The settings you made in the burn dialog are saved int the current 
project. Try it: open the burn dialog, change a setting, click close, open it 
again and you will see: it is back to default. Then use the save button and 
open the dialog again.
Comment 6 Maciej Pilichowski 2006-10-26 19:16:34 UTC
> Try it: open the burn dialog, change a setting, click close, open it 
> again and you will see: it is back to default. Then use the save button and 
>  open the dialog again.

I tried it before exactly like you describe. 0.12.17 --> save = close.

I turned off "burn on fly" for a test, I clicked save, I clicked burn again, this option was turned on. 
Comment 7 Sebastian Trueg 2006-10-26 20:51:10 UTC
Sorry, but I don't believe that. That is an essential feature of K3b which I 
use regularly (and just tried again) and it always worked.
Comment 8 Maciej Pilichowski 2006-10-27 08:24:49 UTC
> Sorry, but I don't believe that. That is an essential feature of K3b which I 
> use regularly (and just tried again) and it always worked.

Riiight ;-) Burner off, start k3b, new cd project, add any file, burn, "create cd image" is on, turn it off, save, burn again --> voila.

I guess screenshots would not help since I could lie even there...
Comment 9 Sebastian Trueg 2006-10-27 10:00:25 UTC
> Riiight ;-) Burner off, start k3b, new cd project, add any file, burn,
> "create cd image" is on, turn it off, save, burn again --> voila.


ok, now I also tried without a burner and it still works... 
I would love to help you there but I cannot reproduce it...

Could maybe someone else try this?
Comment 10 Christoph Burger-Scheidlin 2006-10-27 12:14:53 UTC
Seems to work here, so just to clarify:
The burn settings are only saved per project, not as global defaults.
What I did:
1) open k3b
2) start new cd project
3) add some files
4) start burn dialog
5) change some settings (like simulate, only create image)
6) click save
7) start burn dialog again
The same settings are still the same.
Even if I save the project and reopen it, the settings are still ok

If I start a _new_ project, the burn settings show up unmodified (i.e. the deafults)
Comment 11 Sebastian Trueg 2006-10-27 12:45:01 UTC
and that is the exact intended behaviour.
Comment 12 Maciej Pilichowski 2006-10-27 15:14:17 UTC
Christoph, Sebastian -- what version do you use? Should I attach images or what? :-)
Comment 13 Christoph Burger-Scheidlin 2006-10-27 15:50:10 UTC
I use 0.12.17. Images might help, maybe we are testing something you are not trying to do.
Comment 14 Maciej Pilichowski 2006-10-27 17:31:50 UTC
Created attachment 18286 [details]
1.

k3b started, new cd, one file added --> burn
Comment 15 Maciej Pilichowski 2006-10-27 17:32:51 UTC
Created attachment 18287 [details]
2

"only create image" unchecked, nothing else, just that one click
Comment 16 Maciej Pilichowski 2006-10-27 17:34:36 UTC
Created attachment 18288 [details]
3

from (2) I clicked save, burn again and you can see this dialog. Compare to (1)
-- they are identical (I didn't save 1.png twice, I deliberately made two
screenshots in case there are some differences I couldn't spot).
Comment 17 Sebastian Trueg 2006-10-27 18:04:44 UTC
now I get it: this is a special case. If there is no burner in 0.12.x k3b 
auto-selectes the image-only checkbox because that is the only useful choice. 
This is not the case in 1.0 anymore due to the new medium-instead-of-device 
selection
Comment 18 Maciej Pilichowski 2006-10-27 21:48:53 UTC
>  now I get it: this is a special case. If there is no burner in 0.12.x k3b 
>  auto-selectes the image-only checkbox because that is the only useful
> choice.

I don't argue, just for the record -- not true. After several changes of changes, I would like save the project and use it later.

Which leads us to the main subject -- "save" :-) My suggestions:
save --> keep changes, keep, OK, keep & close
close --> cancel

Or something like this
( burn )



-- close dialog ---
( keeping changes )
( cancel changes )

So the burn and (current) close/save buttons would be a bit more separated.
Comment 19 Sebastian Trueg 2006-10-28 10:46:36 UTC
I don't get it.
Comment 20 Maciej Pilichowski 2006-10-28 11:46:01 UTC
Which part?
Comment 21 Sebastian Trueg 2006-10-28 11:52:05 UTC
The whole thing. I would love to understand your suggestion but I am a little slow today...
Comment 22 Maciej Pilichowski 2006-10-28 11:58:15 UTC
Quote

"
 ------- Additional Comment #3 From Sebastian Trueg 2006-10-26 10:12 -------  
(...) [the save button] is intended to save the settings to the project not the project to a file. Maybe the button should be renamed to avoid confusion. 
 Any ideas? 
"

Since we clear the thing with non-working "save" button, I get back to your question and answered it. What to do to avoid confusion. The first part is just renaming, the second involves also physical separation of the buttons. I could make a fake screenshot to clarify the latter part.
Comment 23 Sebastian Trueg 2006-10-30 12:22:49 UTC
yes, please. A mockup would be good.
Comment 24 Maciej Pilichowski 2006-10-30 14:00:45 UTC
Created attachment 18328 [details]
mockup

extremely rough idea (sorry for the artistic quality but I don't know gimp too
well)
Comment 25 Sebastian Trueg 2006-10-30 14:14:20 UTC
now I get it.
Comment 26 Sebastian Trueg 2006-10-30 15:01:59 UTC
SVN commit 600421 by trueg:

Better suited button text and icons. It is maybe still a little much (let's face it: the project dialogs
have 6 buttons!) but now it should be a little more obvious than before.

The save button is now called Close while Close has become Cancel. And both have nice tooltips.

BUG: 135872


 M  +27 -12    k3binteractiondialog.cpp  
 M  +9 -5      k3binteractiondialog.h  
 M  +0 -1      misc/k3bblankingdialog.cpp  
 M  +0 -3      misc/k3bdvdformattingdialog.cpp  
 M  +1 -1      projects/k3bdatafileview.cpp  
 M  +19 -3     projects/k3bprojectburndialog.cpp  


--- trunk/extragear/multimedia/k3b/src/k3binteractiondialog.cpp #600420:600421
@@ -25,7 +25,6 @@
 #include <k3btoolbutton.h>
 
 #include <qlabel.h>
-#include <qpushbutton.h>
 #include <qtoolbutton.h>
 #include <qlayout.h>
 #include <qtooltip.h>
@@ -110,7 +109,12 @@
   QHBoxLayout* layout5 = new QHBoxLayout( 0, 0, spacingHint(), "layout5");
 
   if( buttonMask & CANCEL_BUTTON ) {
-    m_buttonCancel = new KPushButton( KStdGuiItem::close(), this, "m_buttonCancel" );
+    m_buttonCancel = new KPushButton( KConfigGroup( k3bcore->config(), "General Options" )
+				      .readBoolEntry( "keep action dialogs open", false ) 
+				      ? KStdGuiItem::close() 
+				      : KStdGuiItem::cancel(), 
+				      this, 
+				      "m_buttonCancel" );
     layout5->addWidget( m_buttonCancel );
   }
   else
@@ -123,8 +127,11 @@
     m_buttonSave = 0;
   if( buttonMask & START_BUTTON ) {
     KGuiItem startItem = KStdGuiItem::ok();
-    startItem.setText( i18n("Start") );
     m_buttonStart = new KPushButton( startItem, this, "m_buttonStart" );
+    // refine the button text
+    setButtonText( START_BUTTON,
+		   i18n("Start"),
+		   i18n("Start the task") );
     QFont fnt( m_buttonStart->font() );
     fnt.setBold(true);
     m_buttonStart->setFont( fnt );
@@ -153,7 +160,7 @@
 void K3bInteractionDialog::show()
 {
   KDialog::show();
-  if( QPushButton* b = getButton( m_defaultButton ) )
+  if( KPushButton* b = getButton( m_defaultButton ) )
     b->setFocus();
 }
 
@@ -303,15 +310,15 @@
   m_defaultButton = button;
 
   // reset all other default buttons
-  if( QPushButton* b = getButton( START_BUTTON ) )
+  if( KPushButton* b = getButton( START_BUTTON ) )
     b->setDefault( true ); 
-  if( QPushButton* b = getButton( SAVE_BUTTON ) )
+  if( KPushButton* b = getButton( SAVE_BUTTON ) )
     b->setDefault( true ); 
-  if( QPushButton* b = getButton( CANCEL_BUTTON ) )
+  if( KPushButton* b = getButton( CANCEL_BUTTON ) )
     b->setDefault( true ); 
 
   // set the selected default
-  if( QPushButton* b = getButton( button ) )
+  if( KPushButton* b = getButton( button ) )
     b->setDefault( true ); 
 }
 
@@ -355,7 +362,7 @@
 }
 
 
-QPushButton* K3bInteractionDialog::getButton( int button )
+KPushButton* K3bInteractionDialog::getButton( int button )
 {
   switch( button ) {
   case START_BUTTON:
@@ -370,12 +377,20 @@
 }
 
 
+void K3bInteractionDialog::setButtonGui( int button,
+					 const KGuiItem& item )
+{
+  if( KPushButton* b = getButton( button ) )
+    b->setGuiItem( item );
+}
+
+
 void K3bInteractionDialog::setButtonText( int button,
 					  const QString& text, 
 					  const QString& tooltip, 
 					  const QString& whatsthis )
 {
-  if( QPushButton* b = getButton( button ) ) {
+  if( KPushButton* b = getButton( button ) ) {
     b->setText( text );
     QToolTip::remove( b );
     QWhatsThis::remove( b );
@@ -387,7 +402,7 @@
 
 void K3bInteractionDialog::setButtonEnabled( int button, bool enabled )
 {
-  if( QPushButton* b = getButton( button ) ) {
+  if( KPushButton* b = getButton( button ) ) {
     b->setEnabled( enabled );
     // make sure the correct button is selected as default again
     setDefaultButton( m_defaultButton );
@@ -397,7 +412,7 @@
 
 void K3bInteractionDialog::setButtonShown( int button, bool shown )
 {
-  if( QPushButton* b = getButton( button ) ) {
+  if( KPushButton* b = getButton( button ) ) {
     b->setShown( shown );
     // make sure the correct button is selected as default again
     setDefaultButton( m_defaultButton );
--- trunk/extragear/multimedia/k3b/src/k3binteractiondialog.h #600420:600421
@@ -21,10 +21,11 @@
 
 class QGridLayout;
 class QLabel;
-class QPushButton;
+class KPushButton;
 class QButton;
 class K3bThemedHeader;
 class KConfigBase;
+class KGuiItem;
 
 
 /**
@@ -148,6 +149,9 @@
 			  const QString& tooltip = QString::null, 
 			  const QString& whatsthis = QString::null );
 
+  void setButtonGui( int button,
+		     const KGuiItem& );
+
   void setButtonText( int button,
 		      const QString& text, 
 		      const QString& tooltip = QString::null, 
@@ -244,12 +248,12 @@
   void initToolTipsAndWhatsThis();
   void saveLastSettings();
 
-  QPushButton* getButton( int );
+  KPushButton* getButton( int );
 
   K3bThemedHeader* m_dialogHeader;
-  QPushButton* m_buttonStart;
-  QPushButton* m_buttonSave;
-  QPushButton* m_buttonCancel;
+  KPushButton* m_buttonStart;
+  KPushButton* m_buttonSave;
+  KPushButton* m_buttonCancel;
   QWidget* m_mainWidget;
 
   QButton* m_buttonK3bDefaults;
--- trunk/extragear/multimedia/k3b/src/misc/k3bblankingdialog.cpp #600420:600421
@@ -78,7 +78,6 @@
   d = new Private();
   d->debugDialog = new K3bDebuggingOutputDialog( this );
 
-  setCancelButtonText( i18n("Close") );
   setupGui();
 
   connect( m_writerSelectionWidget, SIGNAL(writerChanged()), this, SLOT(slotWriterChanged()) );
--- trunk/extragear/multimedia/k3b/src/misc/k3bdvdformattingdialog.cpp #600420:600421
@@ -47,9 +47,6 @@
 			  "DVD Formatting", // config group
 			  modal )
 {
-  setCancelButtonText( i18n("Close") );
-
-
   QWidget* frame = mainWidget();
 
   m_writerSelectionWidget = new K3bWriterSelectionWidget( frame );
--- trunk/extragear/multimedia/k3b/src/projects/k3bdatafileview.cpp #600420:600421
@@ -248,7 +248,7 @@
   m_addParentDir = currentDir();
 
   if( K3bDataDirViewItem* dirViewItem = dynamic_cast<K3bDataDirViewItem*>( itemAt(contentsToViewport(e->pos())) ) ) {
-  // only add to a dir if we drop directly on the name
+    // only add to a dir if we drop directly on the name
     if( header()->sectionAt( e->pos().x() ) == 0 )
       m_addParentDir = dirViewItem->dirItem();
   }
--- trunk/extragear/multimedia/k3b/src/projects/k3bprojectburndialog.cpp #600420:600421
@@ -69,9 +69,17 @@
    */
   setDelayedInitialization( true );
 
-  setSaveButtonText( i18n("Save"), i18n("Save Settings and close"),
-		     i18n("Saves the settings to the project and closes the burn dialog.") );
-  setStartButtonText( i18n("Burn") );
+  setButtonGui( SAVE_BUTTON,
+		KStdGuiItem::close() );
+  setButtonText( SAVE_BUTTON,
+		i18n("Close"), 
+		i18n("Save Settings and close"),
+		i18n("Saves the settings to the project and closes the dialog.") );
+  setButtonGui( CANCEL_BUTTON, KStdGuiItem::cancel() );
+  setButtonText( CANCEL_BUTTON, 
+		 i18n("Cancel"),
+		 i18n("Discard all changes and close"),
+		 i18n("Discards all changes made in the dialog and closes it.") );
 
   m_job = 0;
 }
@@ -141,6 +149,14 @@
     if( m_writerSelectionWidget->writingApp() == K3b::CDRDAO )
       m_writingModeWidget->setSupportedModes( K3b::DAO );
   }
+
+  if( m_checkOnlyCreateImage->isChecked() )
+    setButtonText( START_BUTTON, 
+		   i18n("Start"),
+		   i18n("Start the image creation") );
+  else
+    setButtonText( START_BUTTON, i18n("Burn"),
+		   i18n("Start the burning process") );
 }