Merge lp:~kalikiana/midori/importexportmenu into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Cody Garver
Approved revision: 6178
Merged at revision: 6186
Proposed branch: lp:~kalikiana/midori/importexportmenu
Merge into: lp:midori
Diff against target: 46 lines (+19/-3)
1 file modified
midori/midori-browser.c (+19/-3)
To merge this branch: bzr merge lp:~kalikiana/midori/importexportmenu
Reviewer Review Type Date Requested Status
gue5t gue5t Approve
Review via email: mp+165941@code.launchpad.net

Commit message

Move Import and Export into menu Bookmarks

Description of the change

Move Import and Export into menu Bookmarks

To post a comment you must log in.
Revision history for this message
gue5t gue5t (gue5t) wrote :

It would be nice to have a separator only if there are bookmarks in the menu below the import/export items. Looks fine otherwise.

Revision history for this message
Cris Dywan (kalikiana) wrote :

I looked at it again - you will see "Empty" when there're no bookmarks so I don't agree that the separator is unneeded then, for consistency it makes sense to always be there.

Revision history for this message
gue5t gue5t (gue5t) wrote :

Ah, my mistake. Carry on, I was thinking of old code without "Empty".

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-browser.c'
2--- midori/midori-browser.c 2013-05-21 19:59:59 +0000
3+++ midori/midori-browser.c 2013-05-27 22:21:29 +0000
4@@ -3105,6 +3105,21 @@
5 gtk_container_foreach (GTK_CONTAINER (menu),
6 (GtkCallback)(gtk_widget_destroy), NULL);
7
8+ /* "Import Bookmarks" and "Export Bookmarks" at the top */
9+ if (id == NULL)
10+ {
11+ GtkWidget* menuitem;
12+ menuitem = gtk_action_create_menu_item (_action_by_name (browser, "BookmarksImport"));
13+ gtk_menu_shell_append (menu, menuitem);
14+ gtk_widget_show (menuitem);
15+ menuitem = gtk_action_create_menu_item (_action_by_name (browser, "BookmarksExport"));
16+ gtk_menu_shell_append (menu, menuitem);
17+ gtk_widget_show (menuitem);
18+ menuitem = gtk_separator_menu_item_new ();
19+ gtk_menu_shell_append (menu, menuitem);
20+ gtk_widget_show (menuitem);
21+ }
22+
23 if (katze_array_is_empty (bookmarks))
24 {
25 GtkWidget* menuitem = gtk_image_menu_item_new_with_label (_("Empty"));
26@@ -5697,8 +5712,6 @@
27 "<menuitem action='WindowClose'/>"
28 "<separator/>"
29 "<menuitem action='Print'/>"
30- "<menuitem action='BookmarksImport'/>"
31- "<menuitem action='BookmarksExport'/>"
32 "<separator/>"
33 "<menuitem action='Quit'/>"
34 "</menu>"
35@@ -5761,7 +5774,10 @@
36 "<menuitem action='Search'/>"
37 "<menuitem action='Trash'/>"
38 "</menu>"
39- "<menuitem action='Bookmarks'/>"
40+ "<menu action='Bookmarks'>"
41+ "<menuitem action='BookmarksImport'/>"
42+ "<menuitem action='BookmarksExport'/>"
43+ "</menu>"
44 "<menuitem action='Tools'/>"
45 "<menuitem action='Window'/>"
46 "<menu action='Help'>"

Subscribers

People subscribed via source and target branches

to all changes: