[Github-comments] [geany] Open files session files after entering main loop (#924)

Jiří Techet notifications at xxxxx
Wed Mar 2 14:15:04 UTC 2016


> Is the initialisation complete when the signal is emitted or not?

Yes, it is completed (the same way as before).

Maybe I was a bit unclear about what I meant in the very first message in the pull request - sorry for that.

> If it is, fine, but then why can it cause problems with some plugins?

The signal itself doesn't cause any problems - if plugins use something like

```
g_signal_connect(geany_object, "geany-startup-complete", on_startup_complete, NULL);
```

everything is fine. However if plugins don't use geany-startup-complete and rely on the fact that the initialization is completed before entering the main loop, which was the case before this patch, e.g. using

```
g_idle_add(on_startup_complete, NULL);
```

when loaded, then things will break because startup won't be completed at this point.

> If it is required that plugins do nothing (or nothing using the idle loop, or a timer?) until this signal then that needs to be documented, though I would argue that it would be better to fix it so plugins > need not worry.

Plugins can do anything they wish in the idle call (idle loop will already be running at that point), they just shouldn't assume initialization is finished (the missing part at this point will be document/project opening).

I could move plugin initialization inside on_startup_complete() but I'd have to move more things there and I'm slightly worried I might break more things on the way. 

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/924#issuecomment-191252467
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160302/df67e212/attachment.html>


More information about the Github-comments mailing list