Commit 3908c70e authored by Moritz Lipp's avatar Moritz Lipp

Implemented cmd_quit

parent dccac158
......@@ -4,6 +4,7 @@
#include <glib/gi18n.h>
#include "commands.h"
#include "shortcuts.h"
#include "bookmarks.h"
#include "database.h"
#include "document.h"
......@@ -209,6 +210,14 @@ cmd_open(girara_session_t* session, girara_list_t* argument_list)
return true;
}
bool
cmd_quit(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
sc_quit(session, NULL, NULL, 0);
return true;
}
bool
cmd_print(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
......
......@@ -78,6 +78,15 @@ bool cmd_open(girara_session_t* session, girara_list_t* argument_list);
*/
bool cmd_print(girara_session_t* session, girara_list_t* argument_list);
/**
* Close zathura
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occured
*/
bool cmd_quit(girara_session_t* session, girara_list_t* argument_list);
/**
* Save the current file
*
......
......@@ -244,6 +244,7 @@ config_load_default(zathura_t* zathura)
girara_inputbar_command_add(gsession, "info", NULL, cmd_info, NULL, _("Show file information"));
girara_inputbar_command_add(gsession, "help", NULL, cmd_help, NULL, _("Show help"));
girara_inputbar_command_add(gsession, "open", "o", cmd_open, cc_open, _("Open document"));
girara_inputbar_command_add(gsession, "quit", "q", cmd_quit, NULL, _("Close zathura"));
girara_inputbar_command_add(gsession, "print", NULL, cmd_print, NULL, _("Print document"));
girara_inputbar_command_add(gsession, "write", NULL, cmd_save, cc_write, _("Save document"));
girara_inputbar_command_add(gsession, "write!", NULL, cmd_savef, cc_write, _("Save document (and force overwriting)"));
......
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