After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641734 - Split EphySession
Split EphySession
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 641737 (view as bug list)
Depends on:
Blocks: 681782 685631
 
 
Reported: 2011-02-07 15:43 UTC by Alexandre Mazari
Modified: 2012-10-08 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move windows handling code from EphySession to EphyShell (24.78 KB, patch)
2012-08-13 08:48 UTC, Carlos Garcia Campos
none Details | Review
Updated patch (25.26 KB, patch)
2012-08-14 07:36 UTC, Carlos Garcia Campos
none Details | Review
Patch updated to current git master (21.64 KB, patch)
2012-09-03 10:18 UTC, Carlos Garcia Campos
none Details | Review
Updated to current git master (23.36 KB, patch)
2012-09-27 09:26 UTC, Carlos Garcia Campos
reviewed Details | Review
Updated patch (23.38 KB, patch)
2012-10-08 09:14 UTC, Carlos Garcia Campos
committed Details | Review

Description Alexandre Mazari 2011-02-07 15:43:20 UTC
EphySession currently has several unrelated responsibilities
- session-mananger client
- command queue handling
- browsing session de/serialization
- browser session resuming (logic and ui)
- shutdown confirmation ui

In order to make the code easier to follow and better segmented, and avoid state leaks and the associated potential side-effects, those concerns should be taken care of by separate components.
Comment 1 Xan Lopez 2012-08-03 23:04:57 UTC
*** Bug 641737 has been marked as a duplicate of this bug. ***
Comment 2 Carlos Garcia Campos 2012-08-13 08:48:18 UTC
Created attachment 220975 [details] [review]
Move windows handling code from EphySession to EphyShell
Comment 3 Xan Lopez 2012-08-13 14:53:32 UTC
(In reply to comment #2)
> Created an attachment (id=220975) [details] [review]
> Move windows handling code from EphySession to EphyShell

The patch does not explain why it does this.
Comment 4 Carlos Garcia Campos 2012-08-14 07:36:01 UTC
Created attachment 221100 [details] [review]
Updated patch

Explain why in commit message.
Comment 5 Carlos Garcia Campos 2012-09-03 10:18:41 UTC
Created attachment 223271 [details] [review]
Patch updated to current git master

Tool windows are not tracked anymore by the session.
Comment 6 Carlos Garcia Campos 2012-09-27 09:26:41 UTC
Created attachment 225249 [details] [review]
Updated to current git master

Updated for the ephy_session_close_all_windows change
Comment 7 Xan Lopez 2012-10-06 21:30:11 UTC
Review of attachment 225249 [details] [review]:

I like where this goes in general, just some comments. The commit message mentions tool windows, that's obsolete now.

::: src/ephy-session.c
@@ +67,3 @@
 #define SESSION_STATE		"type:session_state"
 
+G_DEFINE_TYPE (EphySession, ephy_session, G_TYPE_OBJECT)

Cool, no more extensions in tree!

::: src/ephy-shell.h
@@ +184,3 @@
+guint           ephy_shell_get_n_windows                (EphyShell *shell);
+
+EphyWindow     *ephy_shell_get_active_window            (EphyShell *shell);

I don't think having all these methods makes sense. get_active_window and get_windows should be enough. has_windows just means whether get_windows is not NULL, and get_n_windows is trivial to implement on top of it? At the very least, if we really really want them, do them in future patches.
Comment 8 Xan Lopez 2012-10-06 21:56:36 UTC
Uh, EphyLockdown is still an extension, so we need to fix that too. Filed in bug #685631.
Comment 9 Carlos Garcia Campos 2012-10-08 09:01:58 UTC
(In reply to comment #7)
> Review of attachment 225249 [details] [review]:

I've just noticed that I was not in the CC and I had missed the review :-P Thanks for looking at it.

> I like where this goes in general, just some comments. The commit message
> mentions tool windows, that's obsolete now.

Oh, right.

> ::: src/ephy-session.c
> @@ +67,3 @@
>  #define SESSION_STATE        "type:session_state"
> 
> +G_DEFINE_TYPE (EphySession, ephy_session, G_TYPE_OBJECT)
> 
> Cool, no more extensions in tree!

Yes :-)

> ::: src/ephy-shell.h
> @@ +184,3 @@
> +guint           ephy_shell_get_n_windows                (EphyShell *shell);
> +
> +EphyWindow     *ephy_shell_get_active_window            (EphyShell *shell);
> 
> I don't think having all these methods makes sense. get_active_window and
> get_windows should be enough. has_windows just means whether get_windows is not
> NULL, and get_n_windows is trivial to implement on top of it? At the very
> least, if we really really want them, do them in future patches.

These are convenient methods to be able to know whether there are windows and how many without having to copy the list, I agree that has_windows can be get_n_windows() > 0, so I'll remove has_windows()
Comment 10 Carlos Garcia Campos 2012-10-08 09:14:32 UTC
Created attachment 226021 [details] [review]
Updated patch

Rebased to current git master and addressed review comments.
Comment 11 Xan Lopez 2012-10-08 12:14:48 UTC
Review of attachment 226021 [details] [review]:

OK.
Comment 12 Carlos Garcia Campos 2012-10-08 13:30:46 UTC
Comment on attachment 226021 [details] [review]
Updated patch

Thanks!