Commit 9c27ab49 authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Implemented sc_toggle_fullscreen

parent dbb304af
......@@ -68,7 +68,6 @@ config_load_default(void)
girara_shortcut_add(Zathura.UI.session, 0, GDK_space, NULL, sc_scroll, NORMAL, FULL_DOWN, NULL);
girara_shortcut_add(Zathura.UI.session, 0, GDK_n, NULL, sc_search, NORMAL, FORWARD, NULL);
girara_shortcut_add(Zathura.UI.session, 0, GDK_N, NULL, sc_search, NORMAL, BACKWARD, NULL);
girara_shortcut_add(Zathura.UI.session, 0, GDK_0, NULL, sc_switch_goto_mode, NORMAL, 0, NULL);
girara_shortcut_add(Zathura.UI.session, 0, GDK_Tab, NULL, sc_toggle_index, NORMAL | INDEX, 0, NULL);
girara_shortcut_add(Zathura.UI.session, GDK_CONTROL_MASK, GDK_m, NULL, sc_toggle_inputbar, NORMAL, 0, NULL);
girara_shortcut_add(Zathura.UI.session, 0, GDK_F5, NULL, sc_toggle_fullscreen, NORMAL | FULLSCREEN, 0, NULL);
......
......@@ -193,12 +193,6 @@ sc_search(girara_session_t* session, girara_argument_t* argument, unsigned int t
return false;
}
bool
sc_switch_goto_mode(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_navigate_index(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
......@@ -220,6 +214,20 @@ sc_toggle_inputbar(girara_session_t* session, girara_argument_t* argument, unsig
bool
sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
if (session == NULL) {
return false;
}
static bool fullscreen = false;
if (fullscreen) {
gtk_window_unfullscreen(GTK_WINDOW(session->gtk.window));
} else {
gtk_window_fullscreen(GTK_WINDOW(session->gtk.window));
}
fullscreen = fullscreen ? false : true;
return false;
}
......
......@@ -135,16 +135,6 @@ bool sc_scroll(girara_session_t* session, girara_argument_t* argument, unsigned
*/
bool sc_search(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Switch go to mode (numeric, labels)
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_switch_goto_mode(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Navigate through the index of the document
*
......
Supports Markdown
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