View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009419 | Scribus | Usability | public | 2010-10-21 11:16 | 2012-07-01 20:35 |
Reporter | cezaryece | Assigned To | cezaryece | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Platform | Linux | ||||
Product Version | 1.5.0svn | ||||
Target Version | 1.5.0 | Fixed in Version | 1.5.0svn | ||
Summary | 0009419: Patch for YesToAll button in Contenst/Clear warning | ||||
Description | I prepare patch which add "Yes To All" button for warning box when you clear contents for more than one text frame, so warning appear only once and all selected frames will cleared. | ||||
Additional Information | It is my first patch, so be patient for my uknowledge if something is wrong. Patch is against 15608 rev. | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
scribusdoc.diff (2,791 bytes)
*** trunk/Scribus/scribus/scribusdoc.cpp Thu Oct 21 12:47:10 2010 --- scribusdoc.cpp Thu Oct 21 12:44:41 2010 *************** *** 8362,8367 **** --- 8362,8369 ---- if (selectedItemCount != 0) { PageItem *currItem; + bool ApplyToAll = false; + int t; for (uint i = 0; i < selectedItemCount; ++i) { currItem = itemSelection->itemAt(i); *************** *** 8371,8385 **** ScCore->fileWatcher->removeFile(currItem->Pfile); } else ! if (currItem->asTextFrame() && ScCore->usingGUI()) { if (currItem->itemText.length() != 0 && (currItem->nextInChain() == 0 || currItem->prevInChain() == 0)) { ! int t = ScMessageBox::warning(m_ScMW, CommonStrings::trWarning, tr("Do you really want to clear all your text?"), QMessageBox::Yes, QMessageBox::No | QMessageBox::Default); if (t == QMessageBox::No) continue; } } currItem->clearContents(); --- 8373,8395 ---- ScCore->fileWatcher->removeFile(currItem->Pfile); } else ! if (currItem->asTextFrame() && ScCore->usingGUI() && !ApplyToAll) { if (currItem->itemText.length() != 0 && (currItem->nextInChain() == 0 || currItem->prevInChain() == 0)) { ! if (i >= (selectedItemCount - 1)) ! t = ScMessageBox::warning(m_ScMW, CommonStrings::trWarning, tr("Do you really want to clear all your text?"), QMessageBox::Yes, QMessageBox::No | QMessageBox::Default); + else + t = ScMessageBox::warning(m_ScMW, CommonStrings::trWarning, + tr("Do you really want to clear all your text?"), + QMessageBox::Yes, QMessageBox::No | QMessageBox::Default, QMessageBox::YesToAll); + if (t == QMessageBox::No) continue; + else if (t == QMessageBox::YesToAll) + ApplyToAll = true; } } currItem->clearContents(); |
|
Thanks for the patch. I will test and report. |
|
scribusdoc.cpp.diff (1,459 bytes)
Index: Scribus/scribus/scribusdoc.cpp =================================================================== --- Scribus/scribus/scribusdoc.cpp (wersja 15626) +++ Scribus/scribus/scribusdoc.cpp (kopia robocza) @@ -8362,6 +8362,8 @@ if (selectedItemCount != 0) { PageItem *currItem; + bool userDecide = false; + bool userWantClear = true; for (uint i = 0; i < selectedItemCount; ++i) { currItem = itemSelection->itemAt(i); @@ -8369,21 +8371,29 @@ { if ((ScCore->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PictureIsAvailable)) ScCore->fileWatcher->removeFile(currItem->Pfile); + currItem->clearContents(); } else - if (currItem->asTextFrame() && ScCore->usingGUI()) + if (currItem->asTextFrame()) { + if (ScCore->usingGUI() && (! userDecide)) + { if (currItem->itemText.length() != 0 && (currItem->nextInChain() == 0 || currItem->prevInChain() == 0)) { int t = ScMessageBox::warning(m_ScMW, CommonStrings::trWarning, tr("Do you really want to clear all your text?"), QMessageBox::Yes, QMessageBox::No | QMessageBox::Default); if (t == QMessageBox::No) - continue; + userWantClear = false; + else + userWantClear = true; + userDecide = true; } } + if (userWantClear) currItem->clearContents(); } + } updateFrameItems(); regionsChanged()->update(QRectF()); changed(); |
|
I have made new patch because first one was unusable as I heard. After discusion with a_l_e I have change this patch and now it simply make warning window appear only once when first text frame is reached. "Yes" aply clearing for all selected text frames, "No" skip all selected text frames, but all selected other frames are cleared. I hope this is more sensible, because Scribus not show for which text frame warning appear, so there is no reason to ask for each one. Also I hope diff file will be applicable. |
|
You can change summary of this ticket, now it is not "Yes To All" button. Now it should be "making Contents/Clear warning appearing once" instead. |
|
I don't understand why the Yes to All option was taken away. If you have multiple selected, you might not want to clear them all... |
|
If you don't want to clear all selected frames, what for you select unwanted frames? And what for is warning for each frame if you don't see for which one? |
|
I applied the 'Yes to all' variant. If user use the 'Yes' button in case of multiple selection, he has at least the choice to stop directly in case of error. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-10-21 11:16 | cezaryece | New Issue | |
2010-10-21 11:16 | cezaryece | File Added: scribusdoc.diff | |
2010-10-22 21:07 |
|
Assigned To | => plinnell |
2010-10-22 21:07 |
|
Status | new => assigned |
2010-10-22 21:08 |
|
Note Added: 0024692 | |
2010-10-22 21:08 |
|
Target Version | => 1.5.0svn |
2010-10-23 14:06 | cezaryece | File Added: scribusdoc.cpp.diff | |
2010-10-23 14:13 | cezaryece | Note Added: 0024694 | |
2010-10-23 14:16 | cezaryece | Note Added: 0024695 | |
2010-11-04 17:03 | cbradney | Note Added: 0024806 | |
2010-11-05 07:16 | cezaryece | Note Added: 0024812 | |
2012-06-18 19:25 | cbradney | Assigned To | plinnell => cezaryece |
2012-06-30 14:21 | jghali | Note Added: 0028333 | |
2012-06-30 14:21 | jghali | Status | assigned => resolved |
2012-06-30 14:21 | jghali | Fixed in Version | => 1.5.0svn |
2012-06-30 14:21 | jghali | Resolution | open => fixed |
2012-06-30 14:21 | jghali | Target Version | 1.5.0svn => 1.5.0 |
2012-07-01 20:35 | cbradney | Status | resolved => closed |
2012-07-02 21:24 | jghali | Relationship added | has duplicate 0009803 |