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 757228 - [PATCHes] history-dialog.ui: Unbloat.
[PATCHes] history-dialog.ui: Unbloat.
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: History
3.18.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-28 05:04 UTC by Arnaud B.
Modified: 2018-08-03 20:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
history-dialog.ui: Manually unbloat. (20.48 KB, patch)
2015-10-28 05:04 UTC, Arnaud B.
committed Details | Review
EphyHistoryWindow: Use tree_selection. (3.20 KB, patch)
2015-10-28 05:05 UTC, Arnaud B.
committed Details | Review
EphyHistoryWindow: Can copy only one url. (3.33 KB, patch)
2015-10-28 05:06 UTC, Arnaud B.
committed Details | Review
history-dialog.ui: Kill a level of GtkBox. (16.83 KB, patch)
2015-10-28 05:06 UTC, Arnaud B.
committed Details | Review
EphyHistoryWindow: Use liststore directly. (1.03 KB, patch)
2015-10-28 05:07 UTC, Arnaud B.
committed Details | Review
EphyHistoryWindow: End-of-lines tabs. (1.16 KB, patch)
2015-10-28 05:07 UTC, Arnaud B.
committed Details | Review
EphyHistoryWindow: Call response_cb from the UI file. (2.66 KB, patch)
2015-10-28 05:08 UTC, Arnaud B.
committed Details | Review
history-dialog.ui: Use ToolButton. (4.02 KB, patch)
2015-10-28 05:32 UTC, Arnaud B.
none Details | Review
history-dialog.ui: Use GtkGrid when possible. (795 bytes, patch)
2015-10-28 05:36 UTC, Arnaud B.
none Details | Review
Use GActions in the popup menu. (11.82 KB, patch)
2015-10-29 00:06 UTC, Arnaud B.
committed Details | Review
Split selection_changed callback in two functions. (1.87 KB, patch)
2015-10-29 00:06 UTC, Arnaud B.
committed Details | Review
Split button_press callback in two functions. (2.39 KB, patch)
2015-10-29 00:07 UTC, Arnaud B.
committed Details | Review
Use GAction for cleaning history. (3.53 KB, patch)
2015-10-29 00:08 UTC, Arnaud B.
committed Details | Review
Create popup menu from a model. (5.33 KB, patch)
2015-10-29 00:42 UTC, Arnaud B.
committed Details | Review
Define keybindings in UI file. (4.21 KB, patch)
2015-10-29 01:19 UTC, Arnaud B.
needs-work Details | Review
Visual refresh (GtkActionBar, GtkSearchBar). (6.88 KB, patch)
2015-10-29 07:36 UTC, Arnaud B.
needs-work Details | Review
Kill a (now) unneeded level of GtkBox. (11.47 KB, patch)
2015-10-29 07:38 UTC, Arnaud B.
needs-work Details | Review
Don’t unassign/reassign the model to the TreeView. (1.29 KB, patch)
2015-10-29 08:28 UTC, Arnaud B.
needs-work Details | Review
EphyHistoryWindow: Remove unused function. (1.57 KB, patch)
2015-11-01 03:28 UTC, Arnaud B.
committed Details | Review

Description Arnaud B. 2015-10-28 05:04:20 UTC
Created attachment 314268 [details] [review]
history-dialog.ui: Manually unbloat.

Here are some random cleanings around the history dialog.
Comment 1 Arnaud B. 2015-10-28 05:05:23 UTC
Created attachment 314269 [details] [review]
EphyHistoryWindow: Use tree_selection.
Comment 2 Arnaud B. 2015-10-28 05:06:04 UTC
Created attachment 314270 [details] [review]
EphyHistoryWindow: Can copy only one url.
Comment 3 Arnaud B. 2015-10-28 05:06:41 UTC
Created attachment 314271 [details] [review]
history-dialog.ui: Kill a level of GtkBox.
Comment 4 Arnaud B. 2015-10-28 05:07:12 UTC
Created attachment 314272 [details] [review]
EphyHistoryWindow: Use liststore directly.
Comment 5 Arnaud B. 2015-10-28 05:07:44 UTC
Created attachment 314273 [details] [review]
EphyHistoryWindow: End-of-lines tabs.
Comment 6 Arnaud B. 2015-10-28 05:08:27 UTC
Created attachment 314274 [details] [review]
EphyHistoryWindow: Call response_cb from the UI file.
Comment 7 Arnaud B. 2015-10-28 05:32:41 UTC
Created attachment 314275 [details] [review]
history-dialog.ui: Use ToolButton.

I don’t understand the current state of things… Am I missing something?
Comment 8 Arnaud B. 2015-10-28 05:36:19 UTC
Created attachment 314276 [details] [review]
history-dialog.ui: Use GtkGrid when possible.
Comment 9 Michael Catanzaro 2015-10-28 05:49:46 UTC
Review of attachment 314268 [details] [review]:

::: src/resources/history-dialog.ui
@@ +85,2 @@
                         <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="tree_selection"> <!-- TODO use this -->

What's with the new TODO?
Comment 10 Michael Catanzaro 2015-10-28 05:51:43 UTC
Review of attachment 314269 [details] [review]:

Question answered... well I don't see this as being much cleaner than the original code, but it's not worse either, so sure.
Comment 11 Michael Catanzaro 2015-10-28 05:56:58 UTC
Review of attachment 314270 [details] [review]:

Code is fine, but I had to play around a bit with the dialog to see why it's correct, so please leave a more descriptive commit message. We tend to follow https://wiki.gnome.org/Git/CommitMessages much more closely for Epiphany than you do for the games you maintain.

::: src/resources/history-dialog.ui
@@ +227,3 @@
     <property name="visible">True</property>
     <child>
+      <object class="GtkMenuItem">

Thanks for getting rid of the unnecessary ids. That's attention to detail.
Comment 12 Michael Catanzaro 2015-10-28 05:57:47 UTC
Review of attachment 314271 [details] [review]:

I presume this is correct; it's rather tough to review :p
Comment 13 Michael Catanzaro 2015-10-28 06:01:24 UTC
Review of attachment 314272 [details] [review]:

Again, I don't much see the value of such a change, but whatever. If one of the next patches is a commit that makes the dialog suck less, that would be great... I'm rather frustrated with how it reloads itself after every option, and how you can't tell that you've opened a page from history until you close the dialog and scroll to the end of the notebook....

Also, something in this patchset (or maybe in GTK+ master) broke the tooltips on the buttons on the bottom of the dialog. I'm trying to keep an eye out for that.
Comment 14 Michael Catanzaro 2015-10-28 06:01:42 UTC
Review of attachment 314273 [details] [review]:

++
Comment 15 Michael Catanzaro 2015-10-28 06:02:25 UTC
Review of attachment 314274 [details] [review]:

++
Comment 16 Michael Catanzaro 2015-10-28 06:04:10 UTC
Review of attachment 314275 [details] [review]:

My instinct is to say "yay nice cleanup" and mark this accepted, because I don't see anything wrong with it. But please check that this doesn't break the tooltips. I don't see why it would, though....
Comment 17 Michael Catanzaro 2015-10-28 06:05:11 UTC
Review of attachment 314276 [details] [review]:

Sigh... I dunno. I like GtkBox because it's simpler. But I know it's probably going to be removed, and we're going to have to do this eventually....
Comment 18 Michael Catanzaro 2015-10-28 06:06:16 UTC
Review of attachment 314275 [details] [review]:

Actually, this patch can't have broken the tooltips, because I applied the patches from this bug before you posted this one.
Comment 19 Michael Catanzaro 2015-10-28 06:06:48 UTC
Yeah, the tooltips are broken with git master. Probably a GTK+ issue.
Comment 20 Arnaud B. 2015-10-28 07:56:58 UTC
I didn’t pushed the two last patches for now, as I’ve spotted a difference of styling when using ToolButtons (and as I have some more cleanings comming).
Comment 21 Michael Catanzaro 2015-10-28 14:46:01 UTC
Please do change the patch status when you push them, and add a link to the bug at the bottom of the commit message. 'git bz' does this all for you automatically! I've been meaning to make a git-bz package for Fedora, probably time to get around to that....
Comment 22 Arnaud B. 2015-10-29 00:06:18 UTC
Created attachment 314353 [details] [review]
Use GActions in the popup menu.

Here are four patches for using GActions instead of callbacks.

> Please do change the patch status when you push them
Oh, yeah, forgot that. I’ll try to remember to do it.
Comment 23 Arnaud B. 2015-10-29 00:06:53 UTC
Created attachment 314354 [details] [review]
Split selection_changed callback in two functions.
Comment 24 Arnaud B. 2015-10-29 00:07:26 UTC
Created attachment 314355 [details] [review]
Split button_press callback in two functions.
Comment 25 Arnaud B. 2015-10-29 00:08:25 UTC
Created attachment 314356 [details] [review]
Use GAction for cleaning history.
Comment 26 Arnaud B. 2015-10-29 00:42:51 UTC
Created attachment 314357 [details] [review]
Create popup menu from a model.

One more patch.
Comment 27 Arnaud B. 2015-10-29 01:19:55 UTC
Created attachment 314358 [details] [review]
Define keybindings in UI file.

One more patch.
Comment 28 Arnaud B. 2015-10-29 07:36:47 UTC
Created attachment 314365 [details] [review]
Visual refresh (GtkActionBar, GtkSearchBar).

Here is a visual refresh of the dialog, using a GtkSearchBar (always displayed) for placing the GtkSearchEntry (not taking all the width of the dialog anymore), killing the window’s borders according to the HIGs, replacing the old-fashioned GtkToolbar with a GtkActionBar (not animated; I could).
Comment 29 Arnaud B. 2015-10-29 07:38:14 UTC
Created attachment 314366 [details] [review]
Kill a (now) unneeded level of GtkBox.

Nothing to see here, just an update made possible by the previous patch.
Comment 30 Arnaud B. 2015-10-29 08:28:31 UTC
Created attachment 314368 [details] [review]
Don’t unassign/reassign the model to the TreeView.

I don’t understand this thing; can we remove it?
Comment 31 Arnaud B. 2015-10-29 16:50:58 UTC
Note for the commiter: should add:
    update_selection_actions (self->private->action_group, FALSE);
at the end of ephy_history_window_init(), at patch 314354. And rename “open-url” to “open-selection” and “open_url” to “open_selection” in all patches, as that’s what is done there.
Comment 32 Michael Catanzaro 2015-10-30 19:52:07 UTC
Review of attachment 314353 [details] [review]:

A bit unconventional, but I can see this becoming more common.
Comment 33 Michael Catanzaro 2015-10-30 19:52:49 UTC
Review of attachment 314354 [details] [review]:

OK, presuming the split is to allow you to call it elsewhere in a later patch?
Comment 34 Michael Catanzaro 2015-10-30 19:53:22 UTC
Review of attachment 314355 [details] [review]:

I guess this one is worth it regardless.
Comment 35 Michael Catanzaro 2015-10-30 19:54:02 UTC
Review of attachment 314356 [details] [review]:

OK
Comment 36 Michael Catanzaro 2015-10-30 19:55:27 UTC
Review of attachment 314357 [details] [review]:

Great.

Do consider moving the menu to the top of the file, where it's easier to find.
Comment 37 Michael Catanzaro 2015-10-30 19:58:57 UTC
Review of attachment 314358 [details] [review]:

I understand that this patch doesn't change the previous behavior, but we really need to fix it. Why should opening a URL result in it being deleted from history? I noticed this bug a while back and I think we need to fix it.
Comment 38 Michael Catanzaro 2015-10-30 19:59:30 UTC
Review of attachment 314365 [details] [review]:

OK
Comment 39 Michael Catanzaro 2015-10-30 19:59:42 UTC
Review of attachment 314366 [details] [review]:

OK
Comment 40 Michael Catanzaro 2015-10-30 20:00:01 UTC
Review of attachment 314368 [details] [review]:

THANKYOU!
Comment 41 Michael Catanzaro 2015-10-30 20:08:13 UTC
Review of attachment 314368 [details] [review]:

Actually, this last commit broke everything. Now Epiphany hangs forever if you use either of the buttons.
Comment 42 Arnaud B. 2015-11-01 03:28:08 UTC
Created attachment 314570 [details] [review]
EphyHistoryWindow: Remove unused function.
Comment 43 Michael Catanzaro 2015-11-01 13:51:58 UTC
Review of attachment 314570 [details] [review]:

++
Comment 44 Michael Catanzaro 2016-02-27 18:07:22 UTC
Comment on attachment 314365 [details] [review]
Visual refresh (GtkActionBar, GtkSearchBar).

Any plans to return to this?
Comment 45 Michael Catanzaro 2017-03-11 16:27:27 UTC
Comment on attachment 314365 [details] [review]
Visual refresh (GtkActionBar, GtkSearchBar).

It's old and will surely need rebased now.
Comment 46 Michael Catanzaro 2017-03-11 16:27:33 UTC
Comment on attachment 314366 [details] [review]
Kill a (now) unneeded level of GtkBox.

Ditto.
Comment 47 Alexandre Franke 2017-08-12 17:13:50 UTC
Arnaud, we are so close to getting all your changes in. Any chance you can put the finishing touch on the remaining patches, please?
Comment 48 GNOME Infrastructure Team 2018-08-03 20:40:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/281.