Commit ca85083e authored by Paolo Borelli's avatar Paolo Borelli Committed by Ignacio Casal Quinteiro

Make fullscreen a toggle

parent fb4f102f
......@@ -92,17 +92,23 @@ _gedit_cmd_view_toggle_bottom_panel (GSimpleAction *action,
void
_gedit_cmd_view_toggle_fullscreen_mode (GSimpleAction *action,
GVariant *parameter,
GVariant *state,
gpointer user_data)
{
GeditWindow *window = GEDIT_WINDOW (user_data);
gedit_debug (DEBUG_COMMANDS);
if (_gedit_window_is_fullscreen (window))
_gedit_window_unfullscreen (window);
else
if (g_variant_get_boolean (state))
{
_gedit_window_fullscreen (window);
}
else
{
_gedit_window_unfullscreen (window);
}
g_simple_action_set_state (action, state);
}
void
......
......@@ -137,7 +137,7 @@ void _gedit_cmd_view_toggle_bottom_panel (GSimpleAction *action,
GVariant *state,
gpointer user_data);
void _gedit_cmd_view_toggle_fullscreen_mode (GSimpleAction *action,
GVariant *parameter,
GVariant *state,
gpointer user_data);
void _gedit_cmd_view_leave_fullscreen_mode (GSimpleAction *action,
GVariant *parameter,
......
......@@ -3208,7 +3208,7 @@ static GActionEntry win_entries[] = {
{ "close", _gedit_cmd_file_close },
{ "side_panel", activate_toggle, NULL, "false", _gedit_cmd_view_toggle_side_panel },
{ "bottom_panel", activate_toggle, NULL, "false", _gedit_cmd_view_toggle_bottom_panel },
{ "fullscreen", _gedit_cmd_view_toggle_fullscreen_mode },
{ "fullscreen", activate_toggle, NULL, "false", _gedit_cmd_view_toggle_fullscreen_mode },
{ "leave_fullscreen", _gedit_cmd_view_leave_fullscreen_mode },
{ "find", _gedit_cmd_search_find },
{ "find_next", _gedit_cmd_search_find_next },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment