Use more stock labels

master
Yevgen Muntyan 2006-12-08 03:24:03 -06:00
parent 656c9a026a
commit 53b4993d86
4 changed files with 42 additions and 47 deletions

View File

@ -98,10 +98,9 @@ static MooAppInfo *moo_app_info_new (void);
static MooAppInfo *moo_app_info_copy (const MooAppInfo *info);
static void moo_app_info_free (MooAppInfo *info);
static void install_actions (MooApp *app,
GType type);
static void install_editor_actions (MooApp *app);
static void install_terminal_actions(MooApp *app);
static void install_actions (GType type);
static void install_editor_actions (void);
static void install_terminal_actions(void);
static void moo_app_set_property (GObject *object,
guint prop_id,
@ -423,8 +422,8 @@ moo_app_constructor (GType type,
signal (SIGINT, sigint_handler);
#endif
install_editor_actions (app);
install_terminal_actions (app);
install_editor_actions ();
install_terminal_actions ();
return object;
}
@ -1158,16 +1157,12 @@ moo_app_set_description (MooApp *app,
static void
install_actions (MooApp *app,
GType type)
install_actions (GType type)
{
MooWindowClass *klass = g_type_class_ref (type);
char *_about;
g_return_if_fail (klass != NULL);
_about = g_strdup_printf (Q_("Menu item label|_About %s"), app->priv->info->full_name);
moo_window_class_new_action (klass, "Preferences", NULL,
"display-name", GTK_STOCK_PREFERENCES,
"label", GTK_STOCK_PREFERENCES,
@ -1178,19 +1173,18 @@ install_actions (MooApp *app,
moo_window_class_new_action (klass, "About", NULL,
"display-name", GTK_STOCK_ABOUT,
"label", _about,
"label", GTK_STOCK_ABOUT,
"no-accel", TRUE,
"stock-id", GTK_STOCK_ABOUT,
"closure-callback", moo_app_about_dialog,
NULL);
g_type_class_unref (klass);
g_free (_about);
}
static void
install_editor_actions (MooApp *app)
install_editor_actions (void)
{
#ifdef MOO_BUILD_EDIT
MooWindowClass *klass = g_type_class_ref (MOO_TYPE_EDIT_WINDOW);
@ -1207,7 +1201,7 @@ install_editor_actions (MooApp *app)
"closure-proxy-func", moo_app_get_instance,
NULL);
install_actions (app, MOO_TYPE_EDIT_WINDOW);
install_actions (MOO_TYPE_EDIT_WINDOW);
g_type_class_unref (klass);
#endif /* MOO_BUILD_EDIT */
@ -1232,13 +1226,13 @@ open_in_editor (MooTermWindow *terminal)
static void
install_terminal_actions (MooApp *app)
install_terminal_actions (void)
{
MooWindowClass *klass = g_type_class_ref (MOO_TYPE_TERM_WINDOW);
g_return_if_fail (klass != NULL);
install_actions (app, MOO_TYPE_TERM_WINDOW);
install_actions (MOO_TYPE_TERM_WINDOW);
moo_window_class_new_action (klass, "NewEditor", NULL,
"display-name", "New Editor",
@ -1263,7 +1257,7 @@ install_terminal_actions (MooApp *app)
}
#else /* !(defined(MOO_BUILD_TERM) && defined(MOO_BUILD_EDIT)) */
static void
install_terminal_actions (G_GNUC_UNUSED MooApp *app)
install_terminal_actions (void)
{
}
#endif /* !(defined(MOO_BUILD_TERM) && defined(MOO_BUILD_EDIT)) */

View File

@ -566,47 +566,47 @@ void
_moo_edit_class_init_actions (MooEditClass *klass)
{
moo_edit_class_new_action (klass, "Undo",
"display-name", "Undo",
"label", "_Undo",
"tooltip", "Undo",
"display-name", GTK_STOCK_UNDO,
"label", GTK_STOCK_UNDO,
"tooltip", GTK_STOCK_UNDO,
"stock-id", GTK_STOCK_UNDO,
"closure-signal", "undo",
"condition::sensitive", "can-undo",
NULL);
moo_edit_class_new_action (klass, "Redo",
"display-name", "Redo",
"label", "_Redo",
"tooltip", "Redo",
"display-name", GTK_STOCK_REDO,
"label", GTK_STOCK_REDO,
"tooltip", GTK_STOCK_REDO,
"stock-id", GTK_STOCK_REDO,
"closure-signal", "redo",
"condition::sensitive", "can-redo",
NULL);
moo_edit_class_new_action (klass, "Cut",
"display-name", "Cut",
"display-name", GTK_STOCK_CUT,
"stock-id", GTK_STOCK_CUT,
"closure-signal", "cut-clipboard",
"condition::sensitive", "has-selection",
NULL);
moo_edit_class_new_action (klass, "Copy",
"display-name", "Copy",
"display-name", GTK_STOCK_COPY,
"stock-id", GTK_STOCK_COPY,
"closure-signal", "copy-clipboard",
"condition::sensitive", "has-selection",
NULL);
moo_edit_class_new_action (klass, "Paste",
"display-name", "Paste",
"display-name", GTK_STOCK_PASTE,
"stock-id", GTK_STOCK_PASTE,
"closure-signal", "paste-clipboard",
NULL);
moo_edit_class_new_action (klass, "SelectAll",
"display-name", "Select All",
"label", "Select _All",
"tooltip", "Select all",
"display-name", GTK_STOCK_SELECT_ALL,
"label", GTK_STOCK_SELECT_ALL,
"tooltip", GTK_STOCK_SELECT_ALL,
"stock-id", GTK_STOCK_SELECT_ALL,
"closure-callback", moo_text_view_select_all,
"condition::sensitive", "has-text",

View File

@ -1076,8 +1076,8 @@ init_actions (MooFileView *fileview)
NULL);
action = moo_action_group_add_action (group, "GoBack",
"label", _("Go Back"),
"tooltip", _("Go Back"),
"label", GTK_STOCK_GO_BACK,
"tooltip", GTK_STOCK_GO_BACK,
"stock-id", GTK_STOCK_GO_BACK,
"accel", "<alt>Left",
"force-accel-label", TRUE,
@ -1087,8 +1087,8 @@ init_actions (MooFileView *fileview)
moo_bind_bool_property (action, "sensitive", fileview, "can-go-back", FALSE);
action = moo_action_group_add_action (group, "GoForward",
"label", _("Go Forward"),
"tooltip", _("Go Forward"),
"label", GTK_STOCK_GO_FORWARD,
"tooltip", GTK_STOCK_GO_FORWARD,
"stock-id", GTK_STOCK_GO_FORWARD,
"accel", "<alt>Right",
"force-accel-label", TRUE,
@ -1098,8 +1098,8 @@ init_actions (MooFileView *fileview)
moo_bind_bool_property (action, "sensitive", fileview, "can-go-forward", FALSE);
moo_action_group_add_action (group, "GoHome",
"label", _("Home Folder"),
"tooltip", _("Home Folder"),
"label", GTK_STOCK_HOME,
"tooltip", GTK_STOCK_HOME,
"stock-id", GTK_STOCK_HOME,
"accel", "<alt>Home",
"force-accel-label", TRUE,
@ -1150,8 +1150,8 @@ init_actions (MooFileView *fileview)
_moo_sync_toggle_action (action, fileview, "sort-case-sensitive", FALSE);
action = moo_action_group_add_action (group, "Properties",
"label", _("Properties"),
"tooltip", _("Properties"),
"label", GTK_STOCK_PROPERTIES,
"tooltip", GTK_STOCK_PROPERTIES,
"stock-id", GTK_STOCK_PROPERTIES,
"accel", "<alt>Return",
"force-accel-label", TRUE,
@ -1186,8 +1186,8 @@ init_actions (MooFileView *fileview)
NULL);
action = moo_action_group_add_action (group, "Cut",
"label", _("Cut"),
"tooltip", _("Cut"),
"label", GTK_STOCK_CUT,
"tooltip", GTK_STOCK_CUT,
"stock-id", GTK_STOCK_CUT,
"accel", "<control>X",
"force-accel-label", TRUE,
@ -1197,8 +1197,8 @@ init_actions (MooFileView *fileview)
moo_bind_bool_property (action, "sensitive", fileview, "has-selection", FALSE);
action = moo_action_group_add_action (group, "Copy",
"label", _("Copy"),
"tooltip", _("Copy"),
"label", GTK_STOCK_COPY,
"tooltip", GTK_STOCK_COPY,
"stock-id", GTK_STOCK_COPY,
"force-accel-label", TRUE,
"accel", "<control>C",
@ -1208,8 +1208,8 @@ init_actions (MooFileView *fileview)
moo_bind_bool_property (action, "sensitive", fileview, "has-selection", FALSE);
action = moo_action_group_add_action (group, "Paste",
"label", _("Paste"),
"tooltip", _("Paste"),
"label", GTK_STOCK_PASTE,
"tooltip", GTK_STOCK_PASTE,
"stock-id", GTK_STOCK_PASTE,
"accel", "<control>V",
"force-accel-label", TRUE,

View File

@ -20,6 +20,7 @@
#include "mooutils/mooutils-fs.h"
#include "mooutils/moostock.h"
#include "mooutils/mooprefs.h"
#include "mooutils/moocompat.h"
static void moo_term_window_class_init (MooTermWindowClass *klass);
@ -72,9 +73,9 @@ static void moo_term_window_class_init (MooTermWindowClass *klass)
NULL);
moo_window_class_new_action (window_class, "SelectAll", NULL,
"display-name", "Select All",
"label", "Select _All",
"tooltip", "Select all",
"display-name", GTK_STOCK_SELECT_ALL,
"label", GTK_STOCK_SELECT_ALL,
"tooltip", GTK_STOCK_SELECT_ALL,
"accel", "<alt>A",
"closure-callback", moo_term_select_all,
"closure-proxy-func", moo_term_window_get_term,