mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-29 18: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
|
||||
*
|
||||
|
|
23
config.c
23
config.c
|
@ -237,17 +237,18 @@ config_load_default(zathura_t* zathura)
|
|||
girara_mouse_event_add(gsession, GDK_BUTTON2_MASK, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_MOTION_NOTIFY, 0, NULL);
|
||||
|
||||
/* define default inputbar commands */
|
||||
girara_inputbar_command_add(gsession, "bmark", NULL, cmd_bookmark_create, NULL, _("Add a bookmark"));
|
||||
girara_inputbar_command_add(gsession, "bdelete", NULL, cmd_bookmark_delete, cc_bookmarks, _("Delete a bookmark"));
|
||||
girara_inputbar_command_add(gsession, "blist", NULL, cmd_bookmark_open, cc_bookmarks, _("List all bookmarks"));
|
||||
girara_inputbar_command_add(gsession, "close", NULL, cmd_close, NULL, _("Close current file"));
|
||||
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, "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)"));
|
||||
girara_inputbar_command_add(gsession, "export", NULL, cmd_export, cc_export, _("Save attachments"));
|
||||
girara_inputbar_command_add(gsession, "bmark", NULL, cmd_bookmark_create, NULL, _("Add a bookmark"));
|
||||
girara_inputbar_command_add(gsession, "bdelete", NULL, cmd_bookmark_delete, cc_bookmarks, _("Delete a bookmark"));
|
||||
girara_inputbar_command_add(gsession, "blist", NULL, cmd_bookmark_open, cc_bookmarks, _("List all bookmarks"));
|
||||
girara_inputbar_command_add(gsession, "close", NULL, cmd_close, NULL, _("Close current file"));
|
||||
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)"));
|
||||
girara_inputbar_command_add(gsession, "export", NULL, cmd_export, cc_export, _("Save attachments"));
|
||||
|
||||
girara_special_command_add(gsession, '/', cmd_search, true, FORWARD, NULL);
|
||||
girara_special_command_add(gsession, '?', cmd_search, true, BACKWARD, NULL);
|
||||
|
|
Loading…
Reference in a new issue