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

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 6331
Merged at revision: 6341
Proposed branch: lp:~kalikiana/midori/ctxmenufixes
Merge into: lp:midori
Diff against target: 29 lines (+5/-3)
1 file modified
midori/midori-view.c (+5/-3)
To merge this branch: bzr merge lp:~kalikiana/midori/ctxmenufixes
Reviewer Review Type Date Requested Status
gue5t gue5t Approve
Review via email: mp+179302@code.launchpad.net

Commit message

Update Delete action sensitivity and swap Undo/ Redo

Description of the change

As suggested in the related bug:
The 'Open in New Window' icon is fine here, I see nothing to be improved.
GTK+ upstream has decided to get rid of the input method and unicode menu items, so it seems pointless to me to re-introduce them now.

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

From what I hear, GTK 3.9.8 removes the menu items, but previous GTK3 versions and all GTK2 versions keep it, so if possible I think we should still place the menuitems if possible in those environments. That can be done separately from this change.

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

This pull request should be split into two: one for Midori.URI work and one for the context-menu fixes.

It looks like the activation checks for undo/redo items are reversed: undo checks can_redo and vice-versa.

review: Needs Fixing
lp:~kalikiana/midori/ctxmenufixes updated
6328. By Launchpad Translations on behalf of midori

Launchpad automatic translations update.

6329. By Cris Dywan

Always use Inspect Element and not Inspect Page in the context menu

6330. By Cris Dywan

Swap Undo/ Redo in context menu to match menubar

6331. By Cris Dywan

Update Delete action sensitivity in context menu

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

Sorry for the mess, I re-created the commits.

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

Much better.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-view.c'
2--- midori/midori-view.c 2013-08-09 21:00:42 +0000
3+++ midori/midori-view.c 2013-08-09 21:48:14 +0000
4@@ -2312,9 +2312,9 @@
5 {
6 /* Enforce update of actions - there's no "selection-changed" signal */
7 #ifndef HAVE_WEBKIT2
8+ gtk_action_set_sensitive (gtk_action_group_get_action (actions, "Undo"),
9+ webkit_web_view_can_undo (WEBKIT_WEB_VIEW (view->web_view)));
10 gtk_action_set_sensitive (gtk_action_group_get_action (actions, "Redo"),
11- webkit_web_view_can_undo (WEBKIT_WEB_VIEW (view->web_view)));
12- gtk_action_set_sensitive (gtk_action_group_get_action (actions, "Undo"),
13 webkit_web_view_can_redo (WEBKIT_WEB_VIEW (view->web_view)));
14 gtk_action_set_sensitive (gtk_action_group_get_action (actions, "Cut"),
15 webkit_web_view_can_cut_clipboard (WEBKIT_WEB_VIEW (view->web_view)));
16@@ -2322,10 +2322,12 @@
17 webkit_web_view_can_copy_clipboard (WEBKIT_WEB_VIEW (view->web_view)));
18 gtk_action_set_sensitive (gtk_action_group_get_action (actions, "Paste"),
19 webkit_web_view_can_paste_clipboard (WEBKIT_WEB_VIEW (view->web_view)));
20+ gtk_action_set_sensitive (gtk_action_group_get_action (actions, "Delete"),
21+ webkit_web_view_can_cut_clipboard (WEBKIT_WEB_VIEW (view->web_view)));
22 gtk_action_set_sensitive (gtk_action_group_get_action (actions, "SelectAll"), TRUE);
23 #endif
24+ midori_context_action_add_by_name (menu, "Undo");
25 midori_context_action_add_by_name (menu, "Redo");
26- midori_context_action_add_by_name (menu, "Undo");
27 midori_context_action_add (menu, NULL);
28 midori_context_action_add_by_name (menu, "Cut");
29 midori_context_action_add_by_name (menu, "Copy");

Subscribers

People subscribed via source and target branches

to all changes: