xed/pluma/pluma-ui.h

180 lines
7.5 KiB
C
Raw Normal View History

2011-11-07 13:46:58 -06:00
/*
2011-11-07 16:52:18 -06:00
* pluma-ui.h
* This file is part of pluma
2011-11-07 13:46:58 -06:00
*
* Copyright (C) 2005 - Paolo Maggi
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
2012-11-18 19:54:49 -06:00
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
2011-11-07 13:46:58 -06:00
*/
/*
2011-11-07 16:52:18 -06:00
* Modified by the pluma Team, 2005. See the AUTHORS file for a
* list of people on the pluma Team.
2011-11-07 13:46:58 -06:00
* See the ChangeLog files for a list of changes.
*
* $Id$
*/
2011-11-07 16:52:18 -06:00
#ifndef __PLUMA_UI_H__
#define __PLUMA_UI_H__
2011-11-07 13:46:58 -06:00
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtk/gtk.h>
2011-11-07 16:52:18 -06:00
#include "pluma-commands.h"
2011-11-07 13:46:58 -06:00
G_BEGIN_DECLS
2011-11-07 16:52:18 -06:00
static const GtkActionEntry pluma_always_sensitive_menu_entries[] =
2011-11-07 13:46:58 -06:00
{
/* Toplevel */
{ "File", NULL, N_("_File") },
{ "Edit", NULL, N_("_Edit") },
{ "View", NULL, N_("_View") },
{ "Search", NULL, N_("_Search") },
{ "Tools", NULL, N_("_Tools") },
{ "Documents", NULL, N_("_Documents") },
{ "Help", NULL, N_("_Help") },
/* File menu */
{ "FileNew", GTK_STOCK_NEW, NULL, "<control>N",
2011-11-07 16:52:18 -06:00
N_("Create a new document"), G_CALLBACK (_pluma_cmd_file_new) },
2011-11-07 13:46:58 -06:00
{ "FileOpen", GTK_STOCK_OPEN, N_("_Open..."), "<control>O",
2011-11-07 16:52:18 -06:00
N_("Open a file"), G_CALLBACK (_pluma_cmd_file_open) },
2011-11-07 13:46:58 -06:00
/* Edit menu */
{ "EditPreferences", GTK_STOCK_PREFERENCES, N_("Pr_eferences"), NULL,
2011-11-07 16:52:18 -06:00
N_("Configure the application"), G_CALLBACK (_pluma_cmd_edit_preferences) },
2011-11-07 13:46:58 -06:00
/* Help menu */
{"HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1",
2011-11-07 16:52:18 -06:00
N_("Open the pluma manual"), G_CALLBACK (_pluma_cmd_help_contents) },
2011-11-07 13:46:58 -06:00
{ "HelpAbout", GTK_STOCK_ABOUT, NULL, NULL,
2011-11-07 16:52:18 -06:00
N_("About this application"), G_CALLBACK (_pluma_cmd_help_about) },
2011-11-07 13:46:58 -06:00
/* Fullscreen toolbar */
{ "LeaveFullscreen", GTK_STOCK_LEAVE_FULLSCREEN, NULL,
NULL, N_("Leave fullscreen mode"),
2011-11-07 16:52:18 -06:00
G_CALLBACK (_pluma_cmd_view_leave_fullscreen_mode) }
2011-11-07 13:46:58 -06:00
};
2011-11-07 16:52:18 -06:00
static const GtkActionEntry pluma_menu_entries[] =
2011-11-07 13:46:58 -06:00
{
/* File menu */
{ "FileSave", GTK_STOCK_SAVE, NULL, "<control>S",
2011-11-07 16:52:18 -06:00
N_("Save the current file"), G_CALLBACK (_pluma_cmd_file_save) },
2011-11-07 13:46:58 -06:00
{ "FileSaveAs", GTK_STOCK_SAVE_AS, N_("Save _As..."), "<shift><control>S",
2011-11-07 16:52:18 -06:00
N_("Save the current file with a different name"), G_CALLBACK (_pluma_cmd_file_save_as) },
2011-11-07 13:46:58 -06:00
{ "FileRevert", GTK_STOCK_REVERT_TO_SAVED, NULL, NULL,
2011-11-07 16:52:18 -06:00
N_("Revert to a saved version of the file"), G_CALLBACK (_pluma_cmd_file_revert) },
2011-11-07 13:46:58 -06:00
{ "FilePrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Previe_w"),"<control><shift>P",
2011-11-07 16:52:18 -06:00
N_("Print preview"), G_CALLBACK (_pluma_cmd_file_print_preview) },
2011-11-07 13:46:58 -06:00
{ "FilePrint", GTK_STOCK_PRINT, N_("_Print..."), "<control>P",
2011-11-07 16:52:18 -06:00
N_("Print the current page"), G_CALLBACK (_pluma_cmd_file_print) },
2011-11-07 13:46:58 -06:00
/* Edit menu */
{ "EditUndo", GTK_STOCK_UNDO, NULL, "<control>Z",
2011-11-07 16:52:18 -06:00
N_("Undo the last action"), G_CALLBACK (_pluma_cmd_edit_undo) },
2011-11-07 13:46:58 -06:00
{ "EditRedo", GTK_STOCK_REDO, NULL, "<shift><control>Z",
2011-11-07 16:52:18 -06:00
N_("Redo the last undone action"), G_CALLBACK (_pluma_cmd_edit_redo) },
2011-11-07 13:46:58 -06:00
{ "EditCut", GTK_STOCK_CUT, NULL, "<control>X",
2011-11-07 16:52:18 -06:00
N_("Cut the selection"), G_CALLBACK (_pluma_cmd_edit_cut) },
2011-11-07 13:46:58 -06:00
{ "EditCopy", GTK_STOCK_COPY, NULL, "<control>C",
2011-11-07 16:52:18 -06:00
N_("Copy the selection"), G_CALLBACK (_pluma_cmd_edit_copy) },
2011-11-07 13:46:58 -06:00
{ "EditPaste", GTK_STOCK_PASTE, NULL, "<control>V",
2011-11-07 16:52:18 -06:00
N_("Paste the clipboard"), G_CALLBACK (_pluma_cmd_edit_paste) },
2011-11-07 13:46:58 -06:00
{ "EditDelete", GTK_STOCK_DELETE, NULL, NULL,
2011-11-07 16:52:18 -06:00
N_("Delete the selected text"), G_CALLBACK (_pluma_cmd_edit_delete) },
2011-11-07 13:46:58 -06:00
{ "EditSelectAll", GTK_STOCK_SELECT_ALL, N_("Select _All"), "<control>A",
2011-11-07 16:52:18 -06:00
N_("Select the entire document"), G_CALLBACK (_pluma_cmd_edit_select_all) },
2011-11-07 13:46:58 -06:00
/* View menu */
{ "ViewHighlightMode", NULL, N_("_Highlight Mode") },
/* Search menu */
{ "SearchFind", GTK_STOCK_FIND, N_("_Find..."), "<control>F",
2011-11-07 16:52:18 -06:00
N_("Search for text"), G_CALLBACK (_pluma_cmd_search_find) },
2011-11-07 13:46:58 -06:00
{ "SearchFindNext", NULL, N_("Find Ne_xt"), "<control>G",
2011-11-07 16:52:18 -06:00
N_("Search forwards for the same text"), G_CALLBACK (_pluma_cmd_search_find_next) },
2011-11-07 13:46:58 -06:00
{ "SearchFindPrevious", NULL, N_("Find Pre_vious"), "<shift><control>G",
2011-11-07 16:52:18 -06:00
N_("Search backwards for the same text"), G_CALLBACK (_pluma_cmd_search_find_prev) },
2011-11-07 13:46:58 -06:00
{ "SearchReplace", GTK_STOCK_FIND_AND_REPLACE, N_("_Replace..."), "<control>H",
2011-11-07 16:52:18 -06:00
N_("Search for and replace text"), G_CALLBACK (_pluma_cmd_search_replace) },
2011-11-07 13:46:58 -06:00
{ "SearchClearHighlight", NULL, N_("_Clear Highlight"), "<shift><control>K",
2011-11-07 16:52:18 -06:00
N_("Clear highlighting of search matches"), G_CALLBACK (_pluma_cmd_search_clear_highlight) },
2011-11-07 13:46:58 -06:00
{ "SearchGoToLine", GTK_STOCK_JUMP_TO, N_("Go to _Line..."), "<control>I",
2011-11-07 16:52:18 -06:00
N_("Go to a specific line"), G_CALLBACK (_pluma_cmd_search_goto_line) },
2011-11-07 13:46:58 -06:00
{ "SearchIncrementalSearch", GTK_STOCK_FIND, N_("_Incremental Search..."), "<control>K",
2011-11-07 16:52:18 -06:00
N_("Incrementally search for text"), G_CALLBACK (_pluma_cmd_search_incremental_search) },
2011-11-07 13:46:58 -06:00
/* Documents menu */
{ "FileSaveAll", GTK_STOCK_SAVE, N_("_Save All"), "<shift><control>L",
2011-11-07 16:52:18 -06:00
N_("Save all open files"), G_CALLBACK (_pluma_cmd_file_save_all) },
2011-11-07 13:46:58 -06:00
{ "FileCloseAll", GTK_STOCK_CLOSE, N_("_Close All"), "<shift><control>W",
2011-11-07 16:52:18 -06:00
N_("Close all open files"), G_CALLBACK (_pluma_cmd_file_close_all) },
2011-11-07 13:46:58 -06:00
{ "DocumentsPreviousDocument", NULL, N_("_Previous Document"), "<alt><control>Page_Up",
2011-11-07 16:52:18 -06:00
N_("Activate previous document"), G_CALLBACK (_pluma_cmd_documents_previous_document) },
2011-11-07 13:46:58 -06:00
{ "DocumentsNextDocument", NULL, N_("_Next Document"), "<alt><control>Page_Down",
2011-11-07 16:52:18 -06:00
N_("Activate next document"), G_CALLBACK (_pluma_cmd_documents_next_document) },
2011-11-07 13:46:58 -06:00
{ "DocumentsMoveToNewWindow", NULL, N_("_Move to New Window"), NULL,
2011-11-07 16:52:18 -06:00
N_("Move the current document to a new window"), G_CALLBACK (_pluma_cmd_documents_move_to_new_window) }
2011-11-07 13:46:58 -06:00
};
/* separate group, needs to be sensitive on OS X even when there are no tabs */
2011-11-07 16:52:18 -06:00
static const GtkActionEntry pluma_close_menu_entries[] =
2011-11-07 13:46:58 -06:00
{
{ "FileClose", GTK_STOCK_CLOSE, NULL, "<control>W",
2011-11-07 16:52:18 -06:00
N_("Close the current file"), G_CALLBACK (_pluma_cmd_file_close) }
2011-11-07 13:46:58 -06:00
};
/* separate group, should be sensitive even when there are no tabs */
2011-11-07 16:52:18 -06:00
static const GtkActionEntry pluma_quit_menu_entries[] =
2011-11-07 13:46:58 -06:00
{
{ "FileQuit", GTK_STOCK_QUIT, NULL, "<control>Q",
2011-11-07 16:52:18 -06:00
N_("Quit the program"), G_CALLBACK (_pluma_cmd_file_quit) }
2011-11-07 13:46:58 -06:00
};
2011-11-07 16:52:18 -06:00
static const GtkToggleActionEntry pluma_always_sensitive_toggle_menu_entries[] =
2011-11-07 13:46:58 -06:00
{
{ "ViewToolbar", NULL, N_("_Toolbar"), NULL,
N_("Show or hide the toolbar in the current window"),
2011-11-07 16:52:18 -06:00
G_CALLBACK (_pluma_cmd_view_show_toolbar), TRUE },
2011-11-07 13:46:58 -06:00
{ "ViewStatusbar", NULL, N_("_Statusbar"), NULL,
N_("Show or hide the statusbar in the current window"),
2011-11-07 16:52:18 -06:00
G_CALLBACK (_pluma_cmd_view_show_statusbar), TRUE },
2011-11-07 13:46:58 -06:00
{ "ViewFullscreen", GTK_STOCK_FULLSCREEN, NULL, "F11",
N_("Edit text in fullscreen"),
2011-11-07 16:52:18 -06:00
G_CALLBACK (_pluma_cmd_view_toggle_fullscreen_mode), FALSE }
2011-11-07 13:46:58 -06:00
};
/* separate group, should be always sensitive except when there are no panes */
2011-11-07 16:52:18 -06:00
static const GtkToggleActionEntry pluma_panes_toggle_menu_entries[] =
2011-11-07 13:46:58 -06:00
{
{ "ViewSidePane", NULL, N_("Side _Pane"), "F9",
N_("Show or hide the side pane in the current window"),
2011-11-07 16:52:18 -06:00
G_CALLBACK (_pluma_cmd_view_show_side_pane), FALSE },
2011-11-07 13:46:58 -06:00
{ "ViewBottomPane", NULL, N_("_Bottom Pane"), "<control>F9",
N_("Show or hide the bottom pane in the current window"),
2011-11-07 16:52:18 -06:00
G_CALLBACK (_pluma_cmd_view_show_bottom_pane), FALSE }
2011-11-07 13:46:58 -06:00
};
G_END_DECLS
2011-11-07 16:52:18 -06:00
#endif /* __PLUMA_UI_H__ */