[totem] save-file: Add missing keyboard shortcuts
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] save-file: Add missing keyboard shortcuts
- Date: Fri, 10 May 2013 16:15:09 +0000 (UTC)
commit e8fbde8aa204b99cf2463b7f1ea8c5c330637941
Author: Bastien Nocera <hadess hadess net>
Date: Fri May 10 16:39:43 2013 +0200
save-file: Add missing keyboard shortcuts
src/plugins/save-file/totem-save-file.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/save-file/totem-save-file.c b/src/plugins/save-file/totem-save-file.c
index 28148ef..c7558f7 100644
--- a/src/plugins/save-file/totem-save-file.c
+++ b/src/plugins/save-file/totem-save-file.c
@@ -240,6 +240,7 @@ impl_activate (PeasActivatable *plugin)
TotemSaveFilePlugin *pi = TOTEM_SAVE_FILE_PLUGIN (plugin);
TotemSaveFilePluginPrivate *priv = pi->priv;
GMenu *menu;
+ GMenuItem *item;
char *path;
char *mrl;
@@ -269,10 +270,21 @@ impl_activate (PeasActivatable *plugin)
g_signal_connect (G_OBJECT (priv->action), "activate",
G_CALLBACK (totem_save_file_plugin_copy), plugin);
g_action_map_add_action (G_ACTION_MAP (priv->totem), G_ACTION (priv->action));
+ gtk_application_add_accelerator (GTK_APPLICATION (priv->totem),
+ "<Primary>S",
+ "app.save-as",
+ NULL);
+ /* FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=695917
+ gtk_application_add_accelerator (GTK_APPLICATION (priv->totem),
+ "Save",
+ "app.save-as",
+ NULL); */
/* add UI */
menu = totem_object_get_menu_section (priv->totem, "save-placeholder");
- g_menu_append (G_MENU (menu), _("Save a Copy..."), "app.save-as");
+ item = g_menu_item_new (_("Save a Copy..."), "app.save-as");
+ g_menu_item_set_attribute (item, "accel", "s", "<Primary>s");
+ g_menu_append_item (G_MENU (menu), item);
mrl = totem_object_get_current_mrl (priv->totem);
totem_save_file_file_opened (priv->totem, mrl, pi);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]