Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » QTF editor feature request + patch
QTF editor feature request + patch [message #27155] |
Mon, 28 June 2010 22:30 |
|
Hello Mirek,
When creating some app, I often change my mind about what should the widgets, dialogues etc. say to the user. The QTF is a great tool to write good looking messages, but it could be even better
Now, if you want to edit already existing text, you have to: copy it, press alt+Q, paste it, do the editing, close the dialog and replace previous text with the new one from clipboard.
I think it would make sense to shorten this to: select text, press Alt+Q, do the editing, close dialog. That is cutting two unnecessary key strokes
The code would be something like:void Ide::Qtf()
{
QtfDlg dlg;
LoadFromGlobal(dlg, "QTF-designer");
int l,h;
bool sel=editor.GetSelection(l,h);
if(sel){
dlg.text<<=(~editor).ToString().Mid(l,h-l);
dlg.copy.SetLabel("Apply and close");
}
dlg.Run();
if(sel){
editor.Remove(l,h-l);
editor.Insert(l,(~dlg.text).ToString());
}
StoreToGlobal(dlg, "QTF-designer");
}
What do you think about it?
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Wed Apr 24 13:16:40 CEST 2024
Total time taken to generate the page: 0.02191 seconds
|