mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Add a "toggle_recording" keybinding
Add a keybinding (defaulting to <Control><Shift><Alt>r) to record a screencast of the session. This isn't hooked up to anything in metacity itself, but a plugin can connect to a signal on MetaScreen. keybindings.c all-keybindings.h: Add the keybinding screen.c: Add a ::toggle-recording signal http://bugzilla.gnome.org/show_bug.cgi?id=575290
This commit is contained in:
parent
fb7b820187
commit
4253ff8e12
@ -2853,6 +2853,17 @@ handle_panel (MetaDisplay *display,
|
||||
meta_error_trap_pop (display, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_recording (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
g_signal_emit_by_name (screen, "toggle-recording");
|
||||
}
|
||||
|
||||
static void
|
||||
handle_activate_window_menu (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
|
@ -77,6 +77,7 @@ enum
|
||||
enum
|
||||
{
|
||||
RESTACKED,
|
||||
TOGGLE_RECORDING,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@ -153,6 +154,15 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
1, G_MAXINT, 1,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
screen_signals[TOGGLE_RECORDING] =
|
||||
g_signal_new ("toggle-recording",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_N_WORKSPACES,
|
||||
pspec);
|
||||
|
@ -195,6 +195,8 @@ keybind (panel_main_menu, handle_panel,
|
||||
keybind (panel_run_dialog, handle_panel,
|
||||
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Alt>F2",
|
||||
_("Show the panel's \"Run Application\" dialog box"))
|
||||
keybind (toggle_recording, handle_toggle_recording, 0, 0, "<Control><Shift><Alt>r",
|
||||
_("Start or stop recording the session"))
|
||||
|
||||
/* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
|
||||
* at some point.) The description is NULL here because the stanza is
|
||||
|
Loading…
Reference in New Issue
Block a user