Bug 76832 - Search only works when Show Messages is on at startup
Summary: Search only works when Show Messages is on at startup
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.2.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-05 15:41 UTC by osavill
Modified: 2004-04-06 18:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description osavill 2004-03-05 15:41:29 UTC
Version:           3.2.1 (using KDE 3.2 BRANCH >= 20040204, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
OS:          Linux (i686) release 2.4.25-0.pre6.2mdk

If Quanta is started with no Message pane then the Search function does not work, i.e. no dialog is produced.

Press the Show Messages button
   - now the dialog appears, and searches the editing pane

Press the Preview button
   - the search applies to the Message pane (is this correct behaviour ?)

Press the Show Messages button again
   - the Message Pane disappears, the Search dialog still appears and now searches the main editing pane.
Comment 1 András Manţia 2004-03-05 21:06:56 UTC
I can't reproduce it. :-( Even if I hide the Message pane (View->Show 
Messages), the search dialog appears and I can search in the file. After the 
preview if I invoke the search, it searches the rendered text (like in 
Konqueror).

Comment 2 András Manţia 2004-04-06 17:45:56 UTC
OK, I can reproduce now. You forgot to tell me that your preview was 
configured to appear at the bottom...

Comment 3 András Manţia 2004-04-06 18:21:10 UTC
CVS commit by amantia: 

Fix search problems when Preview is set to appear in the bottom area.

CCMAIL: 76832-done@bugs.kde.org


  M +24 -12    quanta.cpp   1.414.2.18


--- quanta/quanta/quanta.cpp  #1.414.2.17:1.414.2.18
@@ -3770,8 +3770,12 @@ void QuantaApp::slotFind()
   KAction *a = 0L;
   int id = 0;
+  QWidget *w = focusWidget();
+  if (m_htmlPart->view() == w || m_htmlPartDoc->view() == w)
+  {
   QWidgetStack *s = widgetStackOfHtmlPart();
   if (s)
     id = s->id(s->visibleWidget());
-  if (id == 0 && m_view->writeExists())
+  }
+  if (id <= 0 && m_view->writeExists())
   {
     a = m_view->write()->view()->actionCollection()->action("edit_find");
@@ -3793,8 +3797,12 @@ void QuantaApp::slotFindAgain ()
   KAction *a = 0L;
   int id = 0;
+  QWidget *w = focusWidget();
+  if (m_htmlPart->view() == w || m_htmlPartDoc->view() == w)
+  {
   QWidgetStack *s = widgetStackOfHtmlPart();
   if (s)
     id = s->id(s->visibleWidget());
-  if (id == 0 && m_view->writeExists())
+  }
+  if (id <= 0 && m_view->writeExists())
   {
     a = m_view->write()->view()->actionCollection()->action("edit_find_next");
@@ -3816,8 +3824,12 @@ void QuantaApp::slotFindAgainB ()
   KAction *a = 0L;
   int id = 0;
+  QWidget *w = focusWidget();
+  if (m_htmlPart->view() == w || m_htmlPartDoc->view() == w)
+  {
   QWidgetStack *s = widgetStackOfHtmlPart();
   if (s)
     id = s->id(s->visibleWidget());
-  if (id == 0 && m_view->writeExists())
+  }
+  if (id <= 0 && m_view->writeExists())
   {
     a = m_view->write()->view()->actionCollection()->action("edit_find_prev");