From 1a29a1a5f0a49b46ba42eafc1b27b28e602b6a95 Mon Sep 17 00:00:00 2001 From: Garden Gnome Date: Fri, 1 Jun 2012 13:57:40 +0100 Subject: [PATCH] added toggle-recording-action --- data/org.pantheon.desktop.gala.gschema.xml | 5 +++++ src/Main.vala | 7 +++++++ src/Settings.vala | 1 + 3 files changed, 13 insertions(+) diff --git a/data/org.pantheon.desktop.gala.gschema.xml b/data/org.pantheon.desktop.gala.gschema.xml index 40c0694d..625a2374 100644 --- a/data/org.pantheon.desktop.gala.gschema.xml +++ b/data/org.pantheon.desktop.gala.gschema.xml @@ -31,6 +31,11 @@ Panel main menu action Sets the command to run when the panel-main-menu keybinding is pressed + + '' + + + 'elementary' diff --git a/src/Main.vala b/src/Main.vala index 5155357f..274542ab 100644 --- a/src/Main.vala +++ b/src/Main.vala @@ -73,6 +73,13 @@ namespace Gala Settings.get_default().panel_main_menu_action); } catch (Error e) { warning (e.message); } }); + + KeyBinding.set_custom_handler ("toggle-recording", () => { + try { + Process.spawn_command_line_async ( + Settings.get_default().toggle_recording_action); + } catch (Error e) { warning (e.message); } + }); KeyBinding.set_custom_handler ("switch-windows", winswitcher.handle_switch_windows); KeyBinding.set_custom_handler ("switch-windows-backward", winswitcher.handle_switch_windows); diff --git a/src/Settings.vala b/src/Settings.vala index e9db7e9a..0847ccfe 100644 --- a/src/Settings.vala +++ b/src/Settings.vala @@ -25,6 +25,7 @@ namespace Gala public bool enable_animations { get; set; } public string panel_main_menu_action { get; set; } public string theme { get; set; } + public string toggle_recording_action { get; set; } public bool use_gnome_defaults { get; set; } public bool enable_manager_corner { get; set; }