Re: [Patch] Keyboard accelerators for actions



On Mi, 08.04.2009 10:37, Alexander Larsson wrote:

>Looks good. Commiting.

Thanks. Does that also apply to the other patch for allowing keyboard
accelerators for Nautilus scripts (reattached to this mail)?

Reasoning from the gtk+ documentation of gtk_action_group_add_action:
------------
Note that this function does not set up the accel path of the action,
which can lead to problems if a user tries to modify the accelerator of
a menuitem associated with the action. Therefore you must either set
the accel path yourself with gtk_action_set_accel_path(), or use
gtk_action_group_add_action_with_accel (..., NULL).
------------

Holger
From c078b2c05bf26a6093113209a80db8bb73edc4c2 Mon Sep 17 00:00:00 2001
From: Holger Berndt <berndth gmx de>
Date: Sat, 28 Mar 2009 18:17:52 +0100
Subject: [PATCH] allow setting shortcuts for scripts

---
 src/file-manager/fm-directory-view.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index a20adb3..6875035 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -5136,8 +5136,8 @@ add_script_to_scripts_menus (FMDirectoryView *directory_view,
 			       launch_parameters, 
 			       (GClosureNotify)script_launch_parameters_free, 0);
 	
-	gtk_action_group_add_action (directory_view->details->scripts_action_group,
-				     action);
+	gtk_action_group_add_action_with_accel (directory_view->details->scripts_action_group,
+				     action, NULL);
 	g_object_unref (action);
 	
 	ui_manager = nautilus_window_info_get_ui_manager (directory_view->details->window);
-- 
1.5.6.3

Attachment: signature.asc
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]