Bug 105126 - Find dialog loses focus when string is not found or search wraps around
Summary: Find dialog loses focus when string is not found or search wraps around
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-05 02:55 UTC by Fredrik Fornwall
Modified: 2005-05-08 07:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Prevent that the Find dialog loses focus (1.25 KB, patch)
2005-05-05 02:56 UTC, Fredrik Fornwall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Fornwall 2005-05-05 02:55:05 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809) 
OS:                Linux

When using the "Find in History..." feature from the keyboard and a search matches no string or a search wraps around, the Find dialog loses focus.

The reason for this happening is that the message box shown uses the main window instead of the Find dialog as its parent.

How to reproduce:
Use the "Find in History..." search and enter a string, then repeatedly press enter on the keyboard. When a message box showing "End of history reached. Continue from the beginning?" or "Search string 'xxx' not found." is shown, press enter once again to close the message box.

Expected behaviour:
The focus should return to the Find dialog.

Actual behaviour:
The Find dialog loses focus to the main window.
Comment 1 Fredrik Fornwall 2005-05-05 02:56:18 UTC
Created attachment 10905 [details]
Prevent that the Find dialog loses focus
Comment 2 Kurt Hindenburg 2005-05-08 07:04:31 UTC
SVN commit 410615 by hindenburg:

Fix find dialog's focus.  Thanks for patch!

BUG: 105126



 M  +3 -3      trunk/KDE/kdebase/konsole/konsole/konsole.cpp  


--- trunk/KDE/kdebase/konsole/konsole/konsole.cpp #410614:410615
@@ -3704,7 +3704,7 @@
   else
     if (m_find_found) {
       if (forward) {
-        if ( KMessageBox::questionYesNo( this,
+        if ( KMessageBox::questionYesNo( m_finddialog,
              i18n("End of history reached.\n" "Continue from the beginning?"),
   	     i18n("Find") ) == KMessageBox::Yes ) {
           m_find_first = true;
@@ -3712,7 +3712,7 @@
         }
       }
       else {
-        if ( KMessageBox::questionYesNo( this,
+        if ( KMessageBox::questionYesNo( m_finddialog,
              i18n("Beginning of history reached.\n" "Continue from the end?"),
   	     i18n("Find") ) == KMessageBox::Yes ) {
           m_find_first = true;
@@ -3721,7 +3721,7 @@
       }
     }
   else
-    KMessageBox::information( this,
+    KMessageBox::information( m_finddialog,
     	i18n( "Search string '%1' not found." ).arg(KStringHandler::csqueeze(m_find_pattern)),
 	i18n( "Find" ) );
 }