mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-30 14:44:55 +01:00
Implemented cmd_quit
This commit is contained in:
parent
dccac1580b
commit
3908c70eec
3 changed files with 30 additions and 11 deletions
|
@ -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
|
||||
*
|
||||
|
|
1
config.c
1
config.c
|
@ -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)"));
|
||||
|
|
Loading…
Reference in a new issue