Bug 159276

Summary: Give warning on "Select All" in non-text select mode
Product: [Applications] okular Reporter: Jack Phelan <jack.phelan>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: wishlist CC: bradh, giecrilj
Priority: NOR    
Version: 0.6.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.4

Description Jack Phelan 2008-03-14 01:21:13 UTC
Version:           0.6.1 (using 4.0.2 (KDE 4.0.2), Kubuntu packages)
Compiler:          gcc
OS:                Linux (i686) release 2.6.22-14-generic

As it stands, hitting "Select All" when in any mode but text selection does absolutely nothing, and can seem as if it is not working. My "wish" is that a message is displayed saying "you need to be in text-selection mode for this to work" OR it automatically switches to text-selection mode (that being what the user is trying to do).
Comment 1 Brad Hards 2008-12-01 04:49:06 UTC
We can't really add a warning, but automatically switching to text selection mode might be possible.

--- okular/ui/pageview.cpp      (revision 891032)
+++ okular/ui/pageview.cpp      (working copy)
@@ -718,9 +718,20 @@

 void PageView::selectAll()
 {
-    if ( d->mouseMode != MouseTextSelect )
-        return;
+    if ( d->mouseMode != MouseTextSelect ) {
+        d->aMouseTextSelect->setChecked( true );
+        d->mouseMode = MouseTextSelect;
+
+        // We can add this after the string freeze is lifted
+        // d->messageWindow->display( i18n( "Selecting all text" ), PageViewMessage::Info, -1 );

+        // force hiding of annotator toolbar
+        if ( d->annotator )
+        {
+            d->annotator->setEnabled( false );
+        }
+    }
+
     QVector< PageViewItem * >::const_iterator it = d->items.constBegin(), itEnd = d->items.constEnd();
     for ( ; it < itEnd; ++it )
     {

There might be a case for considering this to be a bug, rather than a feature.
Comment 2 Pino Toscano 2011-01-29 00:08:48 UTC
*** Bug 264691 has been marked as a duplicate of this bug. ***
Comment 3 Christopher Yeleighton 2011-01-29 12:33:58 UTC
It does not work in any mode for me.
Comment 4 Albert Astals Cid 2013-05-20 16:17:12 UTC
Git commit 4e05cc2526aaa86ae9c0fb3cd276945b88164cda by Albert Astals Cid.
Committed on 20/05/2013 at 18:15.
Pushed by aacid into branch 'KDE/4.10'.

Fix wrong check

Parker messed up the logic that force it to be in text selection mode
to be on non text selecion mode when doing an unrelated change.

As the "bug" as showed we can selectAll in non text selection mode as well
so remove the check altogether
Related: bug 319554
FIXED-IN: 4.10.4

M  +0    -3    ui/pageview.cpp

http://commits.kde.org/okular/4e05cc2526aaa86ae9c0fb3cd276945b88164cda