hey everyone ,
We want to create a dialog box to revover files in case of crash and we still don't know how to open the crash-recovery box at the start of inkscape .
thanks for your help .
Hi Younes,
De : younes mesbah <younes.mesbah@...2095...> We want to create a dialog box to revover files in case of crash and we still don't know how to open the crash-recovery box at the start of inkscape .
If I understand correctly, creating a new dialog requires the following steps: 1. Create a new dialog in src/ui/dialogs (you can find inspiration from the existing dialogs).
2. Register your dialog in src/dialogs/dialog-manager.cpp. 3. In src/verbs.cpp, create a new verb (new DialogVerb) and associate it (DialogVerb::perform) with the dialog's registered name to perform the appropriate action.Also include your dialog's header in the verbs.cpp file.
4. If needed, map the new verb to the preferences (SPDesktop::show_dialogs() in src/desktop.cpp). 5. Call the dialog from the appropriate location with dt->_dlg_mgr->showDialog("mydialog"), dt being the current SPDesktop.
But as the dialog needs to be launched (if needed) when Inkscape starts, I'm not sure if the given steps are appropriate in your case, and I don't know where the dialog should be called from (inkscape.cpp?). Note that I'm not an UI expert and the given steps are very likely to be incomplete. Comments and correction by experienced devs are welcome...
Regards, -- Nicolas
participants (2)
-
Nicolas Dufour
-
younes mesbah