Bookmark the current page by DnD

Bug #700069 reported by Daniel Fore on 2011-01-07
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Midori Web Browser
Confirmed
Wishlist
André Auzi

Bug Description

At present time to bookmark a page in the bookmark bar i have to use the bookmark menu or ctrl+d and to choose the appropriate folder.

It would be great to also be able to bookmark the current page by dragging & dropping the favicon or URL text from the url bar to the bookmark bar (like in Firefox)

Related branches

Daniel Fore (danrabbit) on 2011-01-14
Changed in midori:
importance: Undecided → Wishlist
description: updated
Daniel Fore (danrabbit) wrote :

It's worth noting that the current add to bookmarks button does allow you to choose to show in the bookmarks toolbar. That said, this would be much faster.

Assigning to Christian for a decision on whether or not this should be implemented.

Changed in midori:
assignee: nobody → Christian Dywan (kalikiana)
tags: added: bookmarks
tags: added: dnd
Changed in midori:
status: New → Confirmed
Daniel Fore (danrabbit) on 2013-01-29
Changed in midori:
assignee: Christian Dywan (kalikiana) → nobody

André, I saw in a commit message that you planned to add this later on

Changed in midori:
assignee: nobody → André Auzi (aauzi)
André Auzi (aauzi) wrote :

The prototype in lp:~aauzi/midori/fix-1006629, implements bookmark creation by DND from the view tab in the bookmark bar.
Let me know if this is expected behavior, I'll then go ahead and cleanup the implementation.

Did you also implement dnd from the URL Gtk.Entry to the toolbar?

Dragging a tab to the toolbar adds it as a bookmark, but dragging the small globe icon from the URL Entry doesn't work. It shows the plus sign and the toolbar is being highlighted, but it's not being added as bookmark.

Thanks for your work, hopefully the rest is easy to fix

André, building your branch with --enable-granite fails with the following errors:

../katze/katze-arrayaction.c: In Funktion »katze_array_action_item_drag_source_drag_data_get«:
../katze/katze-arrayaction.c:365:24: Fehler: Dereferenzierung eines Zeigers auf unvollständigen Typen
../katze/katze-arrayaction.c: In Funktion »katze_array_action_tool_item_child_drag_source_drag_data_get_cb«:
../katze/katze-arrayaction.c:422:30: Fehler: »GtkWidget« hat kein Element namens »parent«
../katze/katze-arrayaction.c:424:27: Fehler: »GtkWidget« hat kein Element namens »parent«
../katze/katze-arrayaction.c: In Funktion »katze_array_action_tool_item_child_drag_source_drag_data_delete_cb«:
../katze/katze-arrayaction.c:444:30: Fehler: »GtkWidget« hat kein Element namens »parent«
../katze/katze-arrayaction.c:446:27: Fehler: »GtkWidget« hat kein Element namens »parent«
../katze/katze-arrayaction.c: In Funktion »katze_array_action_menu_item_drag_source_drag_data_delete_cb«:
../katze/katze-arrayaction.c:479:26: Fehler: »GtkWidget« hat kein Element namens »parent«
Waf: Leaving directory `/home/alexander/fix-1006629/_build'
Build failed: -> task failed (err #1):
 {task: cc katze-arrayaction.c -> katze-arrayaction_2.o}

Tried to translate it:

../katze/katze-arrayaction.c: In function »katze_array_action_item_drag_source_drag_data_get«:
../katze/katze-arrayaction.c:365:24: Error: Dereferencing of a pointer to uncomplete Type
../katze/katze-arrayaction.c: In function »katze_array_action_tool_item_child_drag_source_drag_data_get_cb«:
../katze/katze-arrayaction.c:422:30: Error: »GtkWidget« has no element named »parent«
../katze/katze-arrayaction.c:424:27: Error: »GtkWidget« has no element named »parent«
../katze/katze-arrayaction.c: In function »katze_array_action_tool_item_child_drag_source_drag_data_delete_cb«:
../katze/katze-arrayaction.c:444:30: Error: »GtkWidget« has no element named »parent«
../katze/katze-arrayaction.c:446:27: Error: »GtkWidget« has no element named »parent«
../katze/katze-arrayaction.c: In function »katze_array_action_menu_item_drag_source_drag_data_delete_cb«:
../katze/katze-arrayaction.c:479:26: Error: »GtkWidget« has no element named »parent«
Waf: Leaving directory `/home/alexander/fix-1006629/_build'
Build failed: -> task failed (err #1):
 {task: cc katze-arrayaction.c -> katze-arrayaction_2.o}

André Auzi (aauzi) wrote :

Thanks for the translation Alexander, my German is a bit "rusty" (in-existent is actually more exact) ;)

And thanks for testing the patch as well.

Unfortunately I don't have a granite development environment on my Fedora laptop.
I think I've understood what's happening though and will see how to solve this as soon as possible.

For the drag of the url entry, I still have an issue to figure out, how to get a suitable title from an uri. As a result, the drop of text, or uri, in the bookmark bar is still implemented as a big TODO.

I guess I can implement it with a title equal to the uri in a first approach.

Maybe use the title of the website that's displayed in the current tab. Or can't you get the title the same way you do it for dragging a tab?

André Auzi (aauzi) wrote :

Ok, I managed to have a feedback of the current tab title in the favicon of the location uri.

As a result you can DND the favicon into the bookmark bar.

I 've decided *to avoid* supporting direct drops of text or uris in the bookmark bar, I believe it's better to have them dropped first either in the current view tab or the address bar.

The prototype in lp:~aauzi/midori/fix-1006629, has been updated and hopefully the compilation issues are solved.

Please let me know for this last point.

Yes, dnd of the favicon works now, but dnd'ing granite's dynamic notebook doesn't work. Maybe it's limitation of the widget?

André Auzi (aauzi) wrote :

No, honestly it's more probably a limitation of the developer.

It would had been a damn luck if I had fixed everything by just reading the code.

In conclusion: I have to find a way to do basic testing with granite.

I already have done additional tests with GTK3 and deplore a lot of GTK warnings I didn't have with GTK2.
They need fixing.

I'll let you know when there is an evolution.

A VM with elementary OS should be enough I think. I'm using one and compiling isn't too slow.

I noticed that a black border appears around the toolbar, independent of which GTK+ theme I'm using. Is that something you can fix, or a theme issue?

Le Sun, 09 Jun 2013 16:24:27 -0000,
Alexander Wilms <email address hidden> a écrit :

> I noticed that a black border appears around the toolbar, independent
> of which GTK+ theme I'm using. Is that something you can fix, or a
> theme issue?
>

It's the highlight effect of the toolbar, it's the toolbar standard
behavior to show that it accepts a drop.

I don't know if it is themable or if it can be avoided.

You should see something very similar around a view tab label if you
drag a bookmark on it.

Okay, I filed a bug for eGTK, maybe DanRabbit knows more

André Auzi (aauzi) wrote :

Thanks to pfor I managed to have a working granite environment in my Fedora box.

The DND from (and to) the dynamic notebook now works.

I believe we now have, with this patch, a full featured "main view" bookmark DND.

The next step would be to "connect" DND from (and to) the bookmarks panel.

This will come after the merge of this branch (lp:~aauzi/midori/fix-1006629), and the branch lp:~aauzi/midori/fix-894143 that deals with multi selection DND in bookmarks panel.

My proposal for this additional step is to:
* add bookmark when dropping the location bar favicon or notebook tab label into the bookmarks panel
* add bookmarks or folders of the bookmarks panel (muti)selection into the bookmarks bar when it's dropped in the bookmarks bar
* remove a bookmarks bar item from the bookmarks bar when it's dropped into the bookmarks panel
* finally delete bookmarks or folders when they're dropped in the bookmarks panel trash bin.

Great, thanks!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers