GNOME Bugzilla – Bug 673683
tests: add ephy-shell-test
Last modified: 2012-06-14 23:42:06 UTC
Work in progress. Some small fixes attached.
Created attachment 211533 [details] [review] tests: add ephy-shell-test
Created attachment 211534 [details] [review] ephy-shell: add a comment in EphyNewTabFlags
Created attachment 211535 [details] [review] ephy-shell: EPHY_NEW_TAB_DONT_SHOW_WINDOW means no realize If the user passed EPHY_NEW_TAB_DONT_SHOW_WINDOW do not call gtk_widget_realize and gtk_widget_grab_focus on the returned EphyEmbed since this is most likely against the intentions of EPHY_NEW_TAB_DONT_SHOW_WINDOW.
Review of attachment 211533 [details] [review]: ::: tests/Makefile.am @@ +132,3 @@ +test_ephy_shell_SOURCES = \ + $(top_builddir)/src/epiphany-resources.c \ + $(top_builddir)/src/epiphany-resources.h \ Ugh. I suppose you get errors if you don't do this? I think we should have a shell-like object that can be instantiated without the resources, ie, make it know nothing of the browser UI. Otherwise this is pretty big hack I'd say.
Review of attachment 211534 [details] [review]: Eh, LOL? I'd say either document this for real or don't but this ... :P
Review of attachment 211535 [details] [review]: This makes sense.
Comment on attachment 211535 [details] [review] ephy-shell: EPHY_NEW_TAB_DONT_SHOW_WINDOW means no realize Done. Waiting for comments re: the test. Attachment 211535 [details] pushed as b072cc7 - ephy-shell: EPHY_NEW_TAB_DONT_SHOW_WINDOW means no realize
Created attachment 215089 [details] [review] ephy-shell: document EphyNewTabFlags Real documentation :)
Created attachment 215090 [details] [review] tests: add ephy-shell-test This should cover the main API uses of EphyShell. After working on this, I believe we can simplify ephy-shell.c a bit. At least so it is much more readable for new comers, or our own forgetful selves.
Review of attachment 215089 [details] [review]: ::: src/ephy-shell.h @@ +61,3 @@ + * @EPHY_NEW_TAB_DONT_SHOW_WINDOW: do not show the window where the new + * tab is attached, allows to use EphyShell without triggering + * EphyWindow dependencies. Hrm, well, this only does not show the window (as the flag says!), but the dependencies are still needed right? Not sure what you mean exactly.
Review of attachment 215090 [details] [review]: OK!
(In reply to comment #10) > Review of attachment 215089 [details] [review]: > > ::: src/ephy-shell.h > @@ +61,3 @@ > + * @EPHY_NEW_TAB_DONT_SHOW_WINDOW: do not show the window where the new > + * tab is attached, allows to use EphyShell without triggering > + * EphyWindow dependencies. > > Hrm, well, this only does not show the window (as the flag says!), but the > dependencies are still needed right? Not sure what you mean exactly. I might have confused this with the resource files dependency. I will try to remember during the day. Otherwise I guess the comment can be simplified, without the part after the comma.
I removed the confusing part about dependencies in the documentation patch. Also, I pushed a small debug nitpick for e-history-service so when opening the db fails, the filename is also printed. Hope this is ok. I needed that to find out that e-file-helpers now needs ENSURE_EXISTS... Epiphany was trying to create a new db in /tmp/path/something/ but only /tmp/path/ existed, hence it was failing because sqlite does not create the directory path, only the file. Attachment 215089 [details] pushed as b333648 - ephy-shell: document EphyNewTabFlags Attachment 215090 [details] pushed as 820a1e5 - tests: add ephy-shell-test