[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Kate, again
From:       Mantia Andras <amantia () freemail ! hu>
Date:       2002-05-31 12:26:05
[Download RAW message or body]

Hi,

 I'm still fighting with the kate/ktexteditor integration into Quanta. The 
problem now is that I still use the guiFactory()->addClient method to 
integrate the editor's menus and actions into the maint window and now if I 
switch between the views (different files), the shortcuts (eg. CTRL-F for 
search) are valid for the last opened file. If I use the search function from 
the menu, it is valid for the current file. Every time when I switch between 
the tabs of the QTabWidget (between the files), the following code gets 
executed:

  if (view->oldWrite != 0L)
  {
    view->oldWrite->writeConfig(config);
    guiFactory()->removeClient(view->oldWrite->view());
  }
  guiFactory()->addClient(dynamic_cast<Document *>(w)->view());
  dynamic_cast<Document *>(w)->readConfig(config);

  view->write()->view()->resize(view->writeTab->size().width()-5, 
view->writeTab->size().height()-35);
  view->oldWrite = view->write();
//view() returns a KTextEditor::View*

This removing/adding, etc. is just to avoid duplicate additions of the menus 
and to have the right instance of the editor menus for the current file (and 
to keep the configuration between them consistent). But it seems that it is 
not enough for the shorcuts. Any idea to solve this (or in other) way? I 
don't want to put the actions and the menus in the main app. rc file, to 
avoid unnecessary and duplicate code.

Cheers,
Andras

This e-mail was scanned by RAV AntiVirus!

-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. \
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti \
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat \
                de virusi.
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. \
Please be aware that there is a risk involved whenever opening e-mail attachments to \
your computer and that MobiFon is not responsible for any damages caused by viruses.

 
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic