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 757669 - [PATCHes] EphyBookmarkProperties: Use template.
[PATCHes] EphyBookmarkProperties: Use template.
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Bookmarks
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-06 07:43 UTC by Arnaud B.
Modified: 2015-11-21 00:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
EphyBookmarkProperties: Make final class. (13.70 KB, patch)
2015-11-06 07:43 UTC, Arnaud B.
committed Details | Review
EphyBookmarkProperties: Use template. (21.08 KB, patch)
2015-11-06 07:44 UTC, Arnaud B.
committed Details | Review
EphyTopicsEntry: Make final class. (14.46 KB, patch)
2015-11-06 08:01 UTC, Arnaud B.
none Details | Review
EphyTopicsEntry: Make final class. (14.62 KB, patch)
2015-11-06 08:24 UTC, Arnaud B.
committed Details | Review
EphyTopicsPalette: Make final class. (11.86 KB, patch)
2015-11-06 08:24 UTC, Arnaud B.
committed Details | Review
EphyTopicsPalette: Move UI stuff in EphyBookmarkProperties. (16.19 KB, patch)
2015-11-07 08:40 UTC, Arnaud B.
none Details | Review
EphyTopicsPalette: Inherit from GtkListStore, not from GtkTreeView. (13.52 KB, patch)
2015-11-07 08:40 UTC, Arnaud B.
none Details | Review
EphyTopicsPalette: Move UI stuff in EphyBookmarkProperties. (15.83 KB, patch)
2015-11-07 08:52 UTC, Arnaud B.
none Details | Review
EphyTopicsPalette: Inherit from GtkListStore, not from GtkTreeView. (13.52 KB, patch)
2015-11-07 16:50 UTC, Arnaud B.
none Details | Review
EphyTopicsPalette: Move UI stuff in EphyBookmarkProperties. (16.91 KB, patch)
2015-11-08 06:59 UTC, Arnaud B.
committed Details | Review
EphyTopicsPalette: Inherit from GtkListStore, not from GtkTreeView. (12.76 KB, patch)
2015-11-08 06:59 UTC, Arnaud B.
committed Details | Review
ephy-topics-entry.h: Remove unused function declaration. (1.02 KB, patch)
2015-11-13 21:08 UTC, Arnaud B.
committed Details | Review

Description Arnaud B. 2015-11-06 07:43:46 UTC
Created attachment 314961 [details] [review]
EphyBookmarkProperties: Make final class.

Here are a few patch to move the UI stuff of the EphyBookmarkProperties’ class in an UI file.
Comment 1 Arnaud B. 2015-11-06 07:44:25 UTC
Created attachment 314962 [details] [review]
EphyBookmarkProperties: Use template.
Comment 2 Arnaud B. 2015-11-06 08:01:33 UTC
Created attachment 314964 [details] [review]
EphyTopicsEntry: Make final class.
Comment 3 Arnaud B. 2015-11-06 08:24:17 UTC
Created attachment 314965 [details] [review]
EphyTopicsEntry: Make final class.

Forgot a cleanup.
Comment 4 Arnaud B. 2015-11-06 08:24:56 UTC
Created attachment 314966 [details] [review]
EphyTopicsPalette: Make final class.
Comment 5 Michael Catanzaro 2015-11-06 21:55:20 UTC
Review of attachment 314962 [details] [review]:

Impressive cleanup

::: src/Makefile.am
@@ +105,3 @@
 RESOURCE_FILES = \
 	resources/about.css			  \
+	resources/bookmark-properties.ui		\

Use one fewer tab character

::: src/bookmarks/ephy-bookmark-properties.c
@@ +307,1 @@
 	object = G_OBJECT_CLASS (ephy_bookmark_properties_parent_class)->constructor (type,

We should get rid of constructor overrides wherever possible, but init is too soon to do this sort of work; it's kind of obvious, so you should remove this comment. I bet you can override constructed instead. It would be educational to try this in a follow-up patch, if you want.

Object construction is a bit of a complicated mess, but as a general rule, whenever you're tempted to override constructor, you can probably override constructed instead. I've never needed constructor in new code.

Details: https://developer.gnome.org/gobject/unstable/chapter-gobject.html#gobject-instantiation

@@ +432,1 @@
+	object_class->constructor  = ephy_bookmark_properties_constructor;

Don't line them up. (Have I really not noticed so far that you've been doing this? :)
Comment 6 Arnaud B. 2015-11-07 08:40:01 UTC
Created attachment 315029 [details] [review]
EphyTopicsPalette: Move UI stuff in EphyBookmarkProperties.
Comment 7 Arnaud B. 2015-11-07 08:40:36 UTC
Created attachment 315030 [details] [review]
EphyTopicsPalette: Inherit from GtkListStore, not from GtkTreeView.
Comment 8 Arnaud B. 2015-11-07 08:52:35 UTC
Created attachment 315031 [details] [review]
EphyTopicsPalette: Move UI stuff in EphyBookmarkProperties.

Oops, forgot to clean the UI file.
Comment 9 Michael Catanzaro 2015-11-07 14:37:01 UTC
(In reply to Arnaud B. from comment #7)
> Created attachment 315030 [details] [review] [review]
> EphyTopicsPalette: Inherit from GtkListStore, not from GtkTreeView.

Dunno why, but the patch doesn't apply anymore, even though there were definitely no changes to these files... try rebasing I guess.
Comment 10 Arnaud B. 2015-11-07 15:55:56 UTC
315030 is the logical end of 315029/315031, try applying the latter first.
Comment 11 Arnaud B. 2015-11-07 16:50:35 UTC
Created attachment 315057 [details] [review]
EphyTopicsPalette: Inherit from GtkListStore, not from GtkTreeView.

Just for reordering.
Comment 12 Michael Catanzaro 2015-11-07 17:28:10 UTC
It's too hard to evaluate the changes in these last patches, since the dialog is quite broken currently by GTK+ theme changes, both with and without your patches. I can't see any of the checkboxes in the bookmarks properties dialog, only the checkmarks themselves (with and without the patches).
Comment 13 Arnaud B. 2015-11-08 06:59:06 UTC
Created attachment 315068 [details] [review]
EphyTopicsPalette: Move UI stuff in EphyBookmarkProperties.

Rebuilt against master.
Comment 14 Arnaud B. 2015-11-08 06:59:57 UTC
Created attachment 315069 [details] [review]
EphyTopicsPalette: Inherit from GtkListStore, not from GtkTreeView.

Rebuilt against master.
Comment 15 Arnaud B. 2015-11-13 21:08:37 UTC
Created attachment 315433 [details] [review]
ephy-topics-entry.h: Remove unused function declaration.
Comment 16 Michael Catanzaro 2015-11-20 14:53:37 UTC
Review of attachment 315068 [details] [review]:

::: src/bookmarks/ephy-bookmark-properties.c
@@ +288,3 @@
+
+	/* Protect against toggling separators. */
+	if (topic == NULL) return;

Put the return on the next line, please.

::: src/bookmarks/ephy-topics-palette.h
@@ +39,3 @@
+	COLUMN_SELECTED,
+	COLUMNS
+};

This shouldn't be in the header file. We don't want it visible to other files.
Comment 17 Michael Catanzaro 2015-11-20 14:53:37 UTC
Review of attachment 315068 [details] [review]:

::: src/bookmarks/ephy-bookmark-properties.c
@@ +288,3 @@
+
+	/* Protect against toggling separators. */
+	if (topic == NULL) return;

Put the return on the next line, please.

::: src/bookmarks/ephy-topics-palette.h
@@ +39,3 @@
+	COLUMN_SELECTED,
+	COLUMNS
+};

This shouldn't be in the header file. We don't want it visible to other files.
Comment 18 Michael Catanzaro 2015-11-20 14:59:14 UTC
Review of attachment 315069 [details] [review]:

OK

Keep in mind Allan's design calls for removing the bookmarks dialog and properties dialog, so this is probably not a good area to focus further time.
Comment 19 Michael Catanzaro 2015-11-20 14:59:24 UTC
Review of attachment 315433 [details] [review]:

OK
Comment 20 Arnaud B. 2015-11-21 00:32:55 UTC
Comment on attachment 315068 [details] [review]
EphyTopicsPalette: Move UI stuff in EphyBookmarkProperties.

As the enum *is* shared between two files, I’ve renamed its members before commiting.